Compare commits

..

264 commits

Author SHA1 Message Date
Zed A. Shaw
0afaa20c1d Improved the code so it uses ai::EntityAI and it now will find healing when it gets low. Has a bug where it stalls when finding healing and gets into combat. 2025-09-07 23:56:24 -04:00
Zed A. Shaw
7207d53885 Autowalker now figures out there's an enemy near when first entering a level. 2025-09-06 22:50:20 -04:00
Zed A. Shaw
ed33a36bca Autowalker now will grab healing when they need it and can grab it. 2025-09-06 00:02:42 -04:00
Zed A. Shaw
29ab9721af Now they AI will heal when they can, but not yet go get itesm before/during combat. 2025-09-05 23:48:59 -04:00
Zed A. Shaw
a2192e25eb AI can now walk to where healing items are and pick them up to use. 2025-09-05 23:20:45 -04:00
Zed A. Shaw
fe37aa11df Accidental crash when you click on an empty inventory. 2025-09-05 11:56:36 -04:00
Zed A. Shaw
f03a3a31a8 Autowalker now walks more accurately to locations, fights enemies, and also picks up loot drops and healing items _only_. 2025-09-04 23:40:36 -04:00
Zed A. Shaw
40b2d7f45d Bring over various autowalker improvements. 2025-09-04 12:23:43 -04:00
Zed A. Shaw
9c5bad5959 This fixes the bug where you get 'stuck' while moving and passing an enemy. Need to sort out why this fixes it though. Closes #30. 2025-09-04 11:48:12 -04:00
Zed A. Shaw
ba5fc73127 Disable collecting items for now. 2025-09-04 11:46:51 -04:00
Zed A. Shaw
ca3b04b895 Invalid test, should be enemy. 2025-09-03 11:28:29 -04:00
Zed A. Shaw
0c8cb197c2 Fix the map opening and closing all the time. 2025-09-02 13:56:19 -04:00
Zed A. Shaw
a11e7de14e Fix up the spatialmap to have an occupied_by method which checks if a square is occupied and returns what is there. 2025-09-02 12:46:05 -04:00
Zed A. Shaw
759f93cae0 Autowalker now correctly faces enemies to fight them. 2025-09-02 11:31:01 -04:00
Zed A. Shaw
9faad5f263 FINALLY figured out how to rotate to face a square, thanks to all the help from Twitch chat. I need to study Trig. 2025-09-02 02:26:08 -04:00
Zed A. Shaw
d822cb3438 Have a way to detect the best rotation but it's still off a bit. Seems to choose wrong in simple situations. Look in System::shortest_rotate. 2025-09-01 01:37:03 -04:00
Zed A. Shaw
f98cc543f6 Autowalker now paths reliably and can attack enemies by facing them. Just need to make it fight diagonally. 2025-08-31 00:47:21 -04:00
Zed A. Shaw
4365aa4bfc Now added a System::multi_path which can target to multiple entities. 2025-08-31 00:39:35 -04:00
Zed A. Shaw
fc678c6b42 Pathing in either diagonal or simple motion works. 2025-08-31 00:17:47 -04:00
Zed A. Shaw
e92fd2b6f3 Needed to rewrite the pathing to get this to work. I actually had been using a purposefully broken pathing algorithm from when I was making random maps. 2025-08-30 10:48:52 -04:00
Zed A. Shaw
c894f6e094 Initial part of the rewrite for the autowalker to fix the pathing and aiming issues. 2025-08-26 00:55:27 -04:00
Zed A. Shaw
63eaea3536 rewrite game_level::player_position to be more efficient. 2025-08-26 00:46:58 -04:00
Zed A. Shaw
4a2d8770d9 Cleaned up how the camera is configured so that it can be easily queried in other parts like the autowalker. 2025-08-25 23:23:05 -04:00
Zed A. Shaw
b4569622a0 Cleanup the autowalker for new work. 2025-08-25 22:44:53 -04:00
Zed A. Shaw
4bf9a9177f Made an AI debug view to I can make working on the AI easier. I might add the ability to toggle things on/off live to see what the AI does. 2025-08-23 01:40:51 -04:00
Zed A. Shaw
fc8e65f4d6 Enemies how fight back when cornered, either by being blocked by another enemy or when at a dead end walls. 2025-08-22 22:29:22 -04:00
Zed A. Shaw
586343a614 Enemies will now fight back if they're cornered. Was actually way easier than I thought. 2025-08-21 23:32:34 -04:00
Zed A. Shaw
7ffa6025ce And finally fix some of the API names to make more sense in their current location. 2025-08-20 23:49:30 -04:00
Zed A. Shaw
a20d701096 Rename to GameDB and GameDB::Level. 2025-08-20 23:20:36 -04:00
Zed A. Shaw
c46927ea10 Now all of the old LevelManager code is gone. Next phase is to rename the Game:: to something better then test the shit out of it. 2025-08-20 13:31:02 -04:00
Zed A. Shaw
a83ee77eea levelmanager.* is now gone, but the code is just moved over to game_level. Now to clean up the api and give it a new name. 2025-08-20 01:10:42 -04:00
Zed A. Shaw
5aca2fb56a Tests are now clean so next step is to officially nuke the level manager. 2025-08-20 00:48:20 -04:00
Zed A. Shaw
564f9842a2 All of the UIs should be cleared out, and that just leaves the tests. 2025-08-19 23:58:42 -04:00
Zed A. Shaw
d5ff57e025 Now systems.cpp is disconnected from levelmanager. That leaves the GUIs and then to completely remove it and clean up the api. 2025-08-19 11:05:32 -04:00
Zed A. Shaw
81e25f73bb Next phase of the refactor is done. Now to replace everything in Systems. 2025-08-19 01:07:28 -04:00
Zed A. Shaw
644ff6edc0 Bad test that wasn't running. 2025-08-18 23:55:14 -04:00
Zed A. Shaw
097879440d Changed facts in DinkyECS to be a shared_ptr so that it is a singular data store instead of copied around. Closes #85. 2025-08-18 02:17:04 -04:00
Zed A. Shaw
b839fb6463 The problem was keeping a reference in a class/object means that it will not get updated copies when levelmanager makes a new level. Honestly that whole constelation of bullshit needs to die. Closes #62. 2025-08-18 01:13:31 -04:00
Zed A. Shaw
ae1a48deed Now I have a better error that's more exact, but I think next level of this is to just show a generic texture for missing ones. Closes #80. 2025-08-17 11:08:01 -04:00
Zed A. Shaw
25a143cf22 Turns out I don't need to remove so much when I simply don't want to display something. Closes #82. 2025-08-17 10:51:08 -04:00
Zed A. Shaw
20fa95bd93 Simple test to make sure world events actually loop. Closes #84. 2025-08-17 10:18:06 -04:00
Zed A. Shaw
a86912705c Refactored the mouse handling to use the new guecss Modifiers system and improved Clickable. 2025-08-14 14:10:28 -04:00
Zed A. Shaw
ad0069e899 Made it so you can right-click on an item to use it, but yeah it's bad. Gotta refactor. 2025-08-13 11:43:23 -04:00
Zed A. Shaw
42575ef1f5 Updated the lootable body asset. 2025-08-13 11:43:05 -04:00
Zed A. Shaw
f19c1dbb20 Now you can heal yourself. 2025-08-11 16:59:19 -04:00
Zed A. Shaw
e03a63f9fb A little bit of refactoring while thinking about the loot next. 2025-08-10 12:42:28 -04:00
Zed A. Shaw
48e28ee636 New dead_body_lootable sprite for dead things you can loot. 2025-08-10 12:30:42 -04:00
Zed A. Shaw
b9209beddd Better error when you have duplicate map icons. 2025-08-10 12:29:53 -04:00
Zed A. Shaw
8594568ff4 Slight clean up. 2025-08-10 12:29:24 -04:00
Zed A. Shaw
521180b086 Refactor out the junk randomizer and put it in rituals where it belongs. 2025-08-10 11:20:22 -04:00
Zed A. Shaw
05d54ff661 Now also combat works no matter what's on the ground. Closes #81. 2025-08-09 00:13:38 -04:00
Zed A. Shaw
f84b63f0e6 The problem with picking up items under a dead body is fixed but now need to fix combat. 2025-08-07 12:13:39 -04:00
Zed A. Shaw
97fe02d99d Add a new dead_body sprite for things that are dead but you can't loot them. 2025-08-06 23:13:29 -04:00
Zed A. Shaw
0d889cd0ff Quick start to making it possible to use healing items, or any item really. Going with a style that it has to be on your toolbar to use it, and the toolbelt looks in your inventory to see ifyou have healing items. 2025-08-06 13:16:22 -04:00
Zed A. Shaw
b9656013b0 Now have dead bodies working but need art for it. 2025-08-06 12:15:21 -04:00
Zed A. Shaw
fc4eacadb0 There's now a Collision component that determines collision if its set. Closes #72. 2025-08-06 11:43:39 -04:00
Zed A. Shaw
9bf6926dc3 A bit of optimization to keep from generating the sorted sprite list over and over. Also tried to solve the problem of tombstone covering everything but no luck. 2025-08-03 23:58:59 -04:00
Zed A. Shaw
077f0e84ea Don't add wiggle to the things in the player's square since that moves them into the player eyes. 2025-08-03 22:34:03 -04:00
Zed A. Shaw
a4a4389281 Move amt's examples into scratchpad for later review. 2025-08-03 22:33:29 -04:00
Zed A. Shaw
9c02fb846b Now the spatialmap determines the 'wiggle factor' when there's multiple entities in a cell, which staggers them visually. Closes #78. 2025-08-03 01:56:34 -04:00
Zed A. Shaw
694ee210d6 Now floor drops always work by having a drop against a wall just drop at your feet. Closes #77. 2025-08-02 23:26:42 -04:00
Zed A. Shaw
1788b8fb28 Now items drop where you aim, and won't let you drop on a floor. But maybe one more change. 2025-08-02 23:11:59 -04:00
Zed A. Shaw
23ead1f0ca SpatialMap now has a full test suite and that helped find some bugs. 2025-08-01 13:33:34 -04:00
Zed A. Shaw
f26189c696 SpatialMap now uses unordered_multimap to allow for multiple items in a square, but they're also tagged to mark some with collision. 2025-07-31 13:00:39 -04:00
Zed A. Shaw
b193bab148 Add in the tests from finding the bug in spatial map. 2025-07-31 00:03:36 -04:00
Zed A. Shaw
569d04725a This is the cause of the bug where going to the next level caused things to disappear. What happened is that on next level this code was adding the player but _not_ adding them to collision. Then when the player moved the spatialmap would remove them, see they're technically 'no collision' and then add them back in without collision. 2025-07-31 00:03:13 -04:00
Zed A. Shaw
e51fb8627c Switching to Linux to find a memory bug and I want to keep a record of what caused it. 2025-07-30 22:34:26 -04:00
Zed A. Shaw
be3eef7082 Make money. 2025-07-30 11:52:12 -04:00
Zed A. Shaw
d6326c9e41 Mostly working spatical map with 2 level collision/space structure. Not the best implementation but this is the idea. 2025-07-29 03:12:44 -04:00
Zed A. Shaw
fd53f92fe6 Prep for fixing the spatialmap to allow for entities without collision to still be in the space. 2025-07-29 02:13:29 -04:00
Zed A. Shaw
d93bc1615c Big changes to use the new lel-guecs setup but now almost everything works. Only thing missing is Issue #16 in quecs. 2025-07-23 14:03:41 -04:00
Zed A. Shaw
86ddfc460f Update to the new lel-guecs with Icons and the ability to set a Sprite to stretch or not. Now Icons for loot pickup work perfectly, but need to be centered. 2025-07-22 17:21:28 -04:00
Zed A. Shaw
ff7111b006 Icons now work way better and don't have the the 'Rayview cuts icons' bug. It actually was a bug in the lel-guecs Sprite class that was using the TextureRect from the source sprite. Now its initialized with the framesize from the .json. This also uses the new guecs::Icon, but I have to fix that as it doesn't scale correctly. Closes #2. 2025-07-22 15:04:22 -04:00
Zed A. Shaw
b311713064 Quick prototype of how switch to an icon during pickup makes the rendering bug go away and also looks better visually. 2025-07-22 01:08:48 -04:00
Zed A. Shaw
6f91533950 Fog of War now works fairly normally, but I think I'll have to do something so people don't live in the map. Probably something like hearing distance is increased because you're louder with a map out, and you can't see enemies on the map. 2025-07-21 23:21:24 -04:00
Zed A. Shaw
2997dc363b FoW is now moved into lighting so light determines what's seen not player's last position. Not sure if I like that though. 2025-07-21 13:10:03 -04:00
Zed A. Shaw
d264760405 Fog of War works but it's in the wrong place and needs to be based on light. 2025-07-20 01:34:39 -04:00
Zed A. Shaw
2802a44ba4 Clean up System::render_map. 2025-07-18 13:25:32 -04:00
Zed A. Shaw
aa72cfe4a4 Now have a working compass based directional player sprite in the map, but using the compass isn't going to work long term. Need to move that into the raycaster.cpp and get real degrees for facing direction. 2025-07-18 13:09:53 -04:00
Zed A. Shaw
3b81959aa9 Map now displays way better. The paper is gone for now. 2025-07-17 14:22:04 -04:00
Zed A. Shaw
973495b687 Map now has a color theme rather than random colors. 2025-07-17 12:59:20 -04:00
Zed A. Shaw
379060b8c7 Can now set a color to another already existing color. 2025-07-17 12:39:24 -04:00
Zed A. Shaw
f4fa50a413 Colors are now being loaded from assets/palette.json 2025-07-17 10:50:09 -04:00
Zed A. Shaw
48a7f72411 Now have a simple color palette system. 2025-07-16 12:46:49 -04:00
Zed A. Shaw
0272ba8540 Trying a bit of color changes. 2025-07-15 14:46:14 -04:00
Zed A. Shaw
75646619b3 Map now displays and works, just need to refine the colors and the compass directions. 2025-07-15 13:28:23 -04:00
Zed A. Shaw
dca38397e7 Systems::render_map now holds the logic to render the map, and it's working well enough to use for displaying. 2025-07-15 11:39:05 -04:00
Zed A. Shaw
0d1eacdc5c Now entities are drawn after the map so that there's no holes. 2025-07-12 14:46:42 -04:00
Zed A. Shaw
72ecca8c82 I can now draw a map and then render it with the sprites pretty easily. Problem currently is the entities replace their floor tiles so need to fix that. 2025-07-12 13:34:31 -04:00
Zed A. Shaw
a3f82139e9 One step closer to map rendering from tile sprites. 2025-07-12 12:05:18 -04:00
Zed A. Shaw
dd541ae59d Ripped out the string based map and created a Matrix map drawing function. 2025-07-12 10:51:55 -04:00
Zed A. Shaw
d9219a8c64 This cleans up how I'm rendering the map but there's no way I can render a large map like this. It'd be way too big. 2025-07-12 00:35:57 -04:00
Zed A. Shaw
3b06105813 Map tiles are generating fine, and I can make a map, now to bring it into the game and see how it works. 2025-07-11 22:38:08 -04:00
Zed A. Shaw
5db3d1a306 Tried out using the actual textures from the game but they don't really have the feel I want. I'll have to think about it. 2025-07-11 02:24:47 -04:00
Zed A. Shaw
5e01eb29a9 There's a bug where the last item in tiles.json draws a black square, which is why I named ceiling_blue to zceiling_blue to temporarily solve it. 2025-07-11 01:02:27 -04:00
Zed A. Shaw
b2a6262964 Now have background color for the sprites used in the maps. 2025-07-10 00:12:32 -04:00
Zed A. Shaw
b16ca3fd65 I now have hacked in basic color for the wall tiles but not enemies and items. 2025-07-09 14:36:31 -04:00
Zed A. Shaw
b2d0b0ee4c Map tiles are now correctly sized and positioned. Errors from before were due to floating point being used for positioning. 2025-07-09 13:34:18 -04:00
Zed A. Shaw
2c011079a8 I have a test now that can generate a map image so I'll make it look nice there before bringing the code into the game. 2025-07-09 01:54:49 -04:00
Zed A. Shaw
cfefffe1cc I now can output a map_tiles.json that has all of the tiles in the tile sheet tagged by their display char and where they are. 2025-07-09 00:34:50 -04:00
Zed A. Shaw
40611d4d54 Crop the map sprite so it's not bigger than necessary. 2025-07-08 22:54:59 -04:00
Zed A. Shaw
04b3cf3f16 Now have a sprite sheet with tiles expanded to fill the cell, but other sprites reduced to 80% and centered in the cell. 2025-07-08 13:26:43 -04:00
Zed A. Shaw
d6e2b64140 icongen now makes a sprite sheet for the map which should be easier to work with. 2025-07-08 13:09:39 -04:00
Zed A. Shaw
dbc2000434 Started a map icon gen tool that will load the fonts and create tile sprites for everything I use. 2025-07-08 00:55:45 -04:00
Zed A. Shaw
056b0b307b Implemented a little screenshot tool. 2025-07-08 00:55:24 -04:00
Zed A. Shaw
f64b202ee7 Finally have inventory not crashing for most edge cases. This solves many bugs but mostly closes #58. 2025-07-07 13:25:17 -04:00
Zed A. Shaw
601f3331ed As an experiment, disable copy and move of the StatusUI. 2025-07-06 23:59:06 -04:00
Zed A. Shaw
cd89625c96 Just need one function for the 'hold_item' action. 2025-07-06 23:35:17 -04:00
Zed A. Shaw
265e53e05a Simple fix, and honestly I should eliminate this whole thing and use one unified event system. Closes #1. 2025-07-06 12:05:28 -04:00
Zed A. Shaw
af3568154a Just had to grab the sprite, duh. Closes #3. 2025-07-06 11:36:30 -04:00
Zed A. Shaw
1baf90a776 Easy fix, just set aiming_at in the camera position. Closes #57. 2025-07-05 12:04:07 -04:00
Zed A. Shaw
a26f0b0c0a Player's aim is now updated constantly as they move, just need to solve #57 to complete it. Closes #9. 2025-07-05 11:18:26 -04:00
Zed A. Shaw
584c4e9f67 Make the AIM_CLICK handler in FSM properly deal with an item already there while looting or not. Closes #56. 2025-07-03 22:26:06 -04:00
Zed A. Shaw
87e69bebde There was a memory corruption bug in remove() because I get a reference to the slot string, then remove it from by_entity, but that deletes the string so then later using it to remove by_slot silently fails because map.erase() silently fails. Closes. #54. 2025-07-03 13:07:04 -04:00
Zed A. Shaw
970905fcd5 Make the player's inventory just a regular entity attached to the player.entity. 2025-07-02 23:55:06 -04:00
Zed A. Shaw
2421a33bb0 Swapping and putting back now work in the status_ui inventory, but now I need to refactor so this operation works on any inventory::Model. 2025-07-02 23:24:06 -04:00
Zed A. Shaw
784f753e72 Standardized on using only DinkyECS:Entity for most inventory:::Model operations, then create swap based on the same entities. 2025-07-02 14:25:44 -04:00
Zed A. Shaw
8c8d6dc9e7 Clean things up before solving the move problem. 2025-07-02 10:51:23 -04:00
Zed A. Shaw
6576164fad Give a healing potion too for testing. 2025-07-02 10:49:05 -04:00
Zed A. Shaw
b6d1ae2700 Move the management of the 'fake loose items container' into the loot_ui.cpp rather than get rid of it. Closes #34. 2025-07-01 14:26:39 -04:00
Zed A. Shaw
efdb0cb119 Just use get_if here instead. 2025-07-01 14:26:01 -04:00
Zed A. Shaw
8bbafc4d10 Raycaster now keeps track of the square we are aimed but _does not_ know what is there, that's the job of other things like MainUI. Closes #50. 2025-06-30 12:36:00 -04:00
Zed A. Shaw
0d79ce35b3 Every sprite's dimensions are now taken from their config rather than a global. Closes #42. 2025-06-30 11:00:01 -04:00
Zed A. Shaw
a418b48e94 Don't re-run the whole next level thing on every spawned item. Closes #48 2025-06-30 10:38:53 -04:00
Zed A. Shaw
b28b76ee2d Ritual blanket now has its own internal id but I'm sort of thinking it needs to be more like inventory::Model. Closes #47. 2025-06-30 10:15:22 -04:00
Zed A. Shaw
cad51f4908 Use RGBA for the uint32_t color pixels. Closes #49. 2025-06-29 11:53:17 -04:00
Zed A. Shaw
ab1a415b55 Refactored the CameraLOL to be inside the rayview instead of a convolute main_ui->camera->rayview and back. Closes #16. 2025-06-29 11:11:12 -04:00
Zed A. Shaw
75c28cd764 Fixed a few places. Closes #11 2025-06-28 23:30:41 -04:00
Zed A. Shaw
b603ef5a3f Forgot to update the level in the RitualUI so nothing actually worked. Closes #41. 2025-06-28 23:17:36 -04:00
Zed A. Shaw
6a0725e401 Simply re-init the overlay on new level. Closes #14. 2025-06-28 22:39:46 -04:00
Zed A. Shaw
02c42eb042 System::distribute_loot now manages setting up loot junk and does a new entity instead of reusing old ones, that allows System::death to do a coorect world->destroy() on the dead thing. Closes #46. 2025-06-28 13:19:07 -04:00
Zed A. Shaw
6437bd3b54 Now have a 'destroy' method that removes everything related to an entity. Closes #18. 2025-06-28 12:47:17 -04:00
Zed A. Shaw
7602fb0b31 Not using Weapon anymore. 2025-06-28 11:53:48 -04:00
Zed A. Shaw
57d69015c2 Renamed to random_walk since that's what it called. Closes #26. 2025-06-28 11:38:06 -04:00
Zed A. Shaw
769530b45c Now standardized on GameConfig everywhere I can. Closes #28. 2025-06-28 11:32:58 -04:00
Zed A. Shaw
b0204772c7 Need to not transition out of END if the slot clicked is empty. Closes #45 2025-06-28 11:09:37 -04:00
Zed A. Shaw
19682fd0bc Add the frame width/height to SpriteTexture. Closes #13 2025-06-27 01:21:50 -04:00
Zed A. Shaw
ea92dcc3c4 Change from ENEMY_SPAWN to ENTITY_SPAWN since that's what it does. Closes #31 2025-06-26 23:22:22 -04:00
Zed A. Shaw
fcd1bc589c Make a function to access overlay cells Closes #35. 2025-06-26 23:17:53 -04:00
Zed A. Shaw
f668ff6b7a First round of cleanup. dnd_loot. 2025-06-25 14:28:35 -04:00
Zed A. Shaw
689bb150c6 I think that's all the edge cases handled. You can more loot around fairly arbitrarily. 2025-06-24 14:00:14 -04:00
Zed A. Shaw
6ff1919587 Cleaned up the move operation more so that I can use it in the other places that I need it. 2025-06-24 13:23:55 -04:00
Zed A. Shaw
f559b5a39d Fixed the problem where the only way to complete a grab/drop operation was to capture the MOUSE_CLICK directly. Solution was to move the mouse processing out of DNDLoot and only handle the MOUSE_MOVE/DRAG. 2025-06-24 11:33:37 -04:00
Zed A. Shaw
6a72d1160f When things die you get their things. 2025-06-23 01:50:43 -04:00
Zed A. Shaw
fb064ffbf1 Loot boxes now have ritual items and you can click on them, or the enemy just dies. 2025-06-23 01:33:09 -04:00
Zed A. Shaw
3c5021e4c9 So far most of the bugs are solved but there's still some edge cases in the inventory dance. 2025-06-22 23:54:50 -04:00
Zed A. Shaw
e0588847fa Tracked down the bug that was caused by picking up an item but not removing its Position in the world, so when you go to another level it gets brought back to life causing a dupe. 2025-06-22 12:50:09 -04:00
Zed A. Shaw
2c6565c40a Kind of jank but the old functionality is back, and now needs to move to loot ui dealing with any container. 2025-06-21 11:01:12 -04:00
Zed A. Shaw
812407c3df Now the loot UI can work with any container and only uses an ECS id to work, not have its own contents. 2025-06-21 10:51:45 -04:00
Zed A. Shaw
a0eff927b6 Big BIG refactor to make inventory use a model that's placed into the world, following a more sane MVC style. 2025-06-20 13:17:12 -04:00
Zed A. Shaw
119b3ed11d Can now drag an item out of inventory and drop on the ground, then pick it back up, and put it in a loot container, and then back again. Still buggy but working for now. 2025-06-19 00:45:22 -04:00
Zed A. Shaw
68e50342e5 Can now drag an item out of inventory and drop it. 2025-06-18 11:26:38 -04:00
Zed A. Shaw
87459d41bb Add the buttons I'll need for the next round of development. 2025-06-17 12:46:17 -04:00
Zed A. Shaw
dfd3118d04 Make the transitions more solid by having an open/close set of functions to maintain cleaning up internal state. 2025-06-17 12:24:11 -04:00
Zed A. Shaw
029a0f86ae Drag now show the icon while you're dragging, so now need to work out all of the edge cases for each action. 2025-06-17 11:50:03 -04:00
Zed A. Shaw
ca74b817e5 You can grab stuff off the ground and put in your inventory but it doesn't show the sprite while you do it yet. 2025-06-15 00:12:46 -04:00
Zed A. Shaw
cd02507023 Make a function that handles the mouse events for everything since those are very similar. 2025-06-14 22:56:23 -04:00
Zed A. Shaw
d99d9a68c8 Tried to use Ragel to create state machines but its lacking an incremental mode and doesn't do any logging of state activity so debugging is harder. Put it in scratchpad for reference though. 2025-06-14 12:34:27 -04:00
Zed A. Shaw
7fc32b0248 Trying out Ragel's state machine generation as an alternative to the DinkyFSM style. 2025-06-14 00:43:40 -04:00
Zed A. Shaw
9468990f76 DNDLoot works now, just had to fix a problem with the constructor. 2025-06-13 10:46:05 -04:00
Zed A. Shaw
82ee8f68f7 Created a separate FSM for the DND functionality that compiles but need to wire it in to work. 2025-06-13 00:57:45 -04:00
Zed A. Shaw
1ab708c4eb Clean up more of the FSM so that it's almost nothing.Now I'll try to make a stand-alone 'dnd' state machine to handle drag and drop functionality. 2025-06-12 22:51:58 -04:00
Zed A. Shaw
06a843f169 Autowalker does some basic item pickup now, just for testing. 2025-06-12 20:12:13 -04:00
Zed A. Shaw
af933c827a Have a separate container vs. item loot for the different situations where you're pick items out of a container vs. an item on the ground. 2025-06-12 19:41:32 -04:00
Zed A. Shaw
7db64b73c5 Made some notes for the next bit of work. 2025-06-12 13:45:54 -04:00
Zed A. Shaw
7b0bac4f59 You now click on things to interact with them. 2025-06-12 13:24:25 -04:00
Zed A. Shaw
2aa4f0a2e8 Finally can pick things up, but it's really bad so far. Need a bunch of refactoring in how the collision system works, and make it so collision and maps can have multiple entities in the same square. 2025-06-12 13:06:36 -04:00
Zed A. Shaw
2458f01ebd Loot UI now opens when you can loot something, but it's still buggy and doesn't always show the stuff. 2025-06-12 00:10:21 -04:00
Zed A. Shaw
86eabed3db Now when you loot an item the loot UI works. 2025-06-11 23:49:37 -04:00
Zed A. Shaw
38159a5f84 Fix the window coordinates so that you can resize. 2025-06-11 00:56:41 -04:00
Zed A. Shaw
d6c5a89251 Fix the last few loot bugs before actually implementing the data model for inventory and loot. 2025-06-10 22:58:57 -04:00
Zed A. Shaw
4a48910273 There's a UISystem now for to compliment the entities and components in GUECS. I now use that to do the drag/drop transfers instead of raw code right in the FSM. 2025-06-10 13:13:40 -04:00
Zed A. Shaw
e01e697535 Move now works better, and the API is a lot cleaner. Now just need to make it not crash. 2025-06-10 11:12:04 -04:00
Zed A. Shaw
be7b86a913 Mostly refactored out the common things for drag/drop so now just to refine how it's used and bring back moving the sprite around. 2025-06-10 00:52:38 -04:00
Zed A. Shaw
570b70ab0c More of the drag/drop is handled by the GrabSource/DropTarget components. 2025-06-09 23:59:44 -04:00
Zed A. Shaw
7a551cf83a Remove commit_drop from status and loot UI since DropTarget already does that. 2025-06-09 22:57:49 -04:00
Zed A. Shaw
343f3a246f Cleaned up and unified the source before the big refactor. 2025-06-09 22:31:15 -04:00
Zed A. Shaw
0d6a71b06f Fixed a couple little bugs in the state so now can refactor out the dnd code. 2025-06-09 22:18:13 -04:00
Zed A. Shaw
2a6b892e7f Can now round-trip a torch from loot to inventory and back. 2025-06-09 14:02:26 -04:00
Zed A. Shaw
4b0d76bbcc Even better API, but still not the best organization. This will let me implement both sides, then I can pull it out and try to generalize it into a few guecs components. 2025-06-08 23:55:59 -04:00
Zed A. Shaw
3e0adf0c22 Better meaning API on both sides for the drag-n-drop operations, but I _swear_ there's a way to do this in the GrabSource/DropTarget instead. 2025-06-08 23:27:43 -04:00
Zed A. Shaw
47c219b86e Disable inventory select for now until I can get drag-n-drop formalized better. 2025-06-08 22:15:25 -04:00
Zed A. Shaw
e1c2869d1c Sometimes we click too fast in the router to just handle it in IDLE. 2025-06-08 22:06:12 -04:00
Zed A. Shaw
461ad03d27 Taking things from the LootUI to the StatusUI works way better now and there's a DropTarget to match the GrabSource. 2025-06-08 00:37:30 -04:00
Zed A. Shaw
842aac3127 Worked out an initial stab at a GrabSource for drag-n-drop or just simple grabbing things in the UI. 2025-06-07 15:29:18 -04:00
Zed A. Shaw
94385b195d Mostly worked out how to do looting but now need how to take out of inventory and put into loot. 2025-06-07 00:11:29 -04:00
Zed A. Shaw
c509162be1 The event router is working well and I can do drag-n-drop but I'll have to rethink where to use it. 2025-06-05 23:31:38 -04:00
Zed A. Shaw
5aa54d875f Initial first steps in pulling the SFML event processing out of the gui::fsm so that I can handle more complex things like drag and drop. 2025-06-05 01:23:52 -04:00
Zed A. Shaw
0674908e49 Implemented an initial cut at the event router. Its job is to take the random events from SFML and translate them into nice clean orderly events to the Gui::FSM. 2025-06-04 12:19:24 -04:00
Zed A. Shaw
5c47a0151c Basic loot UI mostly working. Each time you open there's a torch and you can place it visually on any slot on your character. 2025-06-03 13:43:16 -04:00
Zed A. Shaw
4b34de2109 Initial loot UI works to load an item by its world entity ID. 2025-06-02 23:34:31 -04:00
Zed A. Shaw
f208ca946e Made the components module work like textures and sound so that there's just one constant map of components. 2025-06-02 23:33:59 -04:00
Zed A. Shaw
ab391aaa97 Have a plan for the new inventory and looting system, now have to implement it. Temporarily you can't pick anything up, but it will go away. 2025-06-02 00:58:16 -04:00
Zed A. Shaw
b8d2d1870d Clean up the debug UI so that it's not using the jank debug component I didn't use anyway. 2025-06-01 11:10:25 -04:00
Zed A. Shaw
e8199a973c Fix up the healing potion so it looks more like a healing potion. 2025-05-30 22:31:03 -04:00
Zed A. Shaw
d2a5dfa713 Rooms are now styled randomly based on assets/styles.json which will evolve into specifications for themes of levels and rooms in them plus other configs. 2025-05-30 20:35:17 -04:00
Zed A. Shaw
e45de2a2cf The config now prints a way better error message if you give it a bad file to use. 2025-05-30 19:53:53 -04:00
Zed A. Shaw
dc8648016d Refactor the way assets are laid out in the assets/ dir and then have a build script that can automatically pixelate/posterize images that I save, saving me tons of time. 2025-05-30 17:49:15 -04:00
Zed A. Shaw
3dc70c3af6 This implements base ambient lighting for tiles which helps with tiles like lava and ceiling lights. 2025-05-29 12:34:25 -04:00
Zed A. Shaw
74a1801069 More scripts for converting and pixelating images for the game. 2025-05-29 12:31:59 -04:00
Zed A. Shaw
cdd58ee21a Another nice scritp from fred. 2025-05-29 12:30:51 -04:00
Zed A. Shaw
31df3fe7a3 Better light ceiling and floor tiles. 2025-05-29 00:44:52 -04:00
Zed A. Shaw
dd463d7d6e Did a bunch of pixelation tests and I think this is the best setup so far. 2025-05-26 23:36:22 -04:00
Zed A. Shaw
931d9493d2 The raycaster can now pair a floor with a ceiling tile and to demonstrate this I have a blue light that shines on to a stone floor. I also played with just pixelating a regular image rather than painting it and honestly it looks better in a lot of ways. 2025-05-26 13:59:26 -04:00
Zed A. Shaw
e015652f4c Now have the ability to load different textures for the floor, not ceiling though, it just matches the floor. 2025-05-26 00:29:32 -04:00
Zed A. Shaw
8453e7c3b9 Map is back. 2025-05-25 22:39:42 -04:00
Zed A. Shaw
af2947c50a Simple styling of the rooms done. 2025-05-25 12:12:08 -04:00
Zed A. Shaw
5cb74151f5 Remove more dead code from texturemgr. 2025-05-25 11:44:14 -04:00
Zed A. Shaw
3a745d492a Refactored out the tilemap since it was mostly doing nothing useful. 2025-05-25 11:39:43 -04:00
Zed A. Shaw
ea9f6bf383 Prior to deleting the TileMap to see if I can just replace it with new features in Map and textures::. 2025-05-25 10:30:45 -04:00
Zed A. Shaw
f45dbe8c48 Ready to refactor the tilemap so I can stylize different parts of the maps generated. 2025-05-24 12:34:45 -04:00
Zed A. Shaw
96a585220b Raycaster now leaves colors that are above a threshold to have a 'glow' effect. 2025-05-24 12:03:26 -04:00
Zed A. Shaw
c0d668fb0b Played around with a circular map real quick. 2025-05-24 10:58:28 -04:00
Zed A. Shaw
9dcc2036aa Trying a new 'glowing moss' texture to sort out how to make the raycaster alter the light of a surface that has its own light. 2025-05-24 00:47:44 -04:00
Zed A. Shaw
e361984c40 Fixed a long standing bug I didn't realize where I did -1 on the map in the raycaster which made the textures not actually work. 2025-05-24 00:47:01 -04:00
Zed A. Shaw
90c37fe4c9 Fixing up how rotation works with combat and then making the lighting better. 2025-05-22 14:25:42 -04:00
Zed A. Shaw
4eaf3c35d6 Fixed up the map generator so that it's placing entities in non-overlapping tiles and adapting the style for the size. It can also deal with maps that have no rooms better and places the stairs better. 2025-05-22 12:24:59 -04:00
Zed A. Shaw
5f1a453fb4 Refactored the maze functions to be a builder that can do different things to the maze. Also when I hit p in the game it'll save the map to a file. This was extremely hard for no reason. 2025-05-21 13:56:53 -04:00
Zed A. Shaw
20f03731e5 Cleaned up the maze placement so that I can have mazes without rooms and with other features. 2025-05-20 12:53:03 -04:00
Zed A. Shaw
37715f05a5 Cleaned up maze and ready to use. 2025-05-20 10:32:20 -04:00
Zed A. Shaw
33cd490ed3 Playing with maze gen again. 2025-05-20 03:19:58 -04:00
Zed A. Shaw
c97648ab3a Remove useless log messages and bring back the tests. 2025-05-19 11:40:56 -04:00
Zed A. Shaw
ac252bf09d Maze works well now and there's something placed in all rooms and dead ends. Will need to randomize it more so not every dead end is an enemy. 2025-05-19 11:19:33 -04:00
Zed A. Shaw
a0b785cb2a Hunt-and-kill algorithm rocks. It handles everything I need for map gen, including spawn points, room placement, and the maze like map. 2025-05-19 01:40:23 -04:00
Zed A. Shaw
0f8e61797f Now using a hunt-and-kill maze algorithm. 2025-05-18 14:37:43 -04:00
Zed A. Shaw
7a0b2f988d Add a terrible maze generation algorithm to test if a maze style map looks/feels better. The walls are disabled so you can walk around. 2025-05-18 01:00:47 -04:00
Zed A. Shaw
6cbfcf993e Meson build was using the wrong sfml_main on windows. 2025-05-16 23:40:13 -04:00
Zed A. Shaw
0eb245d113 Working on a better character view. 2025-05-16 01:22:12 -04:00
Zed A. Shaw
d6e64dd06b The log is now moved to the map, but changing StatusUI caused a weird compiler error so need to remove logs from that separate. 2025-05-16 00:43:45 -04:00
Zed A. Shaw
a2246d2b71 Move the map_view and mini_map into gui as well. 2025-05-16 00:07:24 -04:00
Zed A. Shaw
bed5ce22d2 Move gui_fsm to fsm but this causes some problems. 2025-05-15 23:54:59 -04:00
Zed A. Shaw
cc44c9d37a Move the guecstra stuff into the gui. 2025-05-15 22:50:59 -04:00
Zed A. Shaw
dfc6aa08e9 Loot UI is now mostly formed, just need to get loot into it and make it work. 2025-05-14 11:49:09 -04:00
Zed A. Shaw
8545b8cf1d Simple Loot UI started. 2025-05-14 00:51:53 -04:00
Zed A. Shaw
8a3046e141 The colors and other theme elements can be configured in assets/config.json 2025-05-13 22:52:27 -04:00
Zed A. Shaw
74a8599977 Fully converted to using the lel-guecs library externally now. 2025-05-13 02:48:39 -04:00
Zed A. Shaw
7c90eb6da1 GUECS now doesn't have the facts feature from DinkyECS and instead you refer to the whole area with gui.MAIN. This is an entity that's at 0 and represents the whole grid. Background is placed there. 2025-05-04 23:40:06 -04:00
Zed A. Shaw
abea6da2e0 More GUECS cleanup before releasing. Still need to sort out events and reduce the amount of stuff that GUECS needs. 2025-05-04 23:28:36 -04:00
Zed A. Shaw
1780a758b3 Initial GUECS refactor is done, it's now on its own with no other dependencies, but now I need to trim it down to do only what it needs. 2025-05-04 11:56:30 -04:00
Zed A. Shaw
20176cf54a GUECS refactor part 1. 2025-05-04 11:06:53 -04:00
Zed A. Shaw
4e7f837240 Cleanup of GUECS and the textures manager. 2025-05-03 23:38:03 -04:00
Zed A. Shaw
438bd8ab8a Finally upgraded the strings to const& since I'm about to pull guecs out and distribute it. Oh well, the joke's finally over. 2025-05-03 14:52:56 -04:00
Zed A. Shaw
82ce3cb6be Autowalker now knows how to craft its first weapon and open the map. 2025-05-03 12:19:02 -04:00
Zed A. Shaw
70d27b9a95 GUECS now has a click_on function so you can programatically click on buttons for testing. 2025-05-03 12:18:39 -04:00
Zed A. Shaw
78ba83e916 Move the map opened detect out to the class. 2025-05-02 23:41:29 -04:00
Zed A. Shaw
c4ed26184b Autowalker now opens the map at first to test that it works. 2025-05-02 23:39:05 -04:00
Zed A. Shaw
edf10c976a Cleaned up the ritual UI some more and solved a few more bugs, then brought in a quick 'dubious combination' image. 2025-05-02 11:39:39 -04:00
Zed A. Shaw
bac552c3d7 Ritual ui now does the combination correctly. 2025-05-02 00:23:07 -04:00
Zed A. Shaw
dab0e092e6 RitualUI is mostly working, but need to make the consumption of items work in the UI. 2025-05-01 23:46:30 -04:00
Zed A. Shaw
6269d10807 The ritual UI is now a lot better using a FSM to control everything. Probably one more session to work out the remaining functionality. 2025-05-01 14:40:24 -04:00
Zed A. Shaw
8a1f42c0f1 RitualUI is now ritual::UI and uses a FSM to coordinate its activities. 2025-05-01 00:24:11 -04:00
Zed A. Shaw
d1bd6b7c45 Mostly does everything I need, minus the ritual description. That'll have to probably be a separate generator. Next, rewrite this crap. 2025-04-30 11:39:42 -04:00
Zed A. Shaw
2ceab51c40 A really shitty ritual crafting UI is working but needs a big reshape. 2025-04-29 23:59:40 -04:00
Zed A. Shaw
14619558fa Better UI for the ritual crafting that almost works, but need to get the selected items to move down. Might need some state machine love soon. 2025-04-28 13:21:10 -04:00
Zed A. Shaw
9d55b2954a The rituals can now craft from items taken from dead enemies and they go into the blanket right away. 2025-04-27 13:48:35 -04:00
Zed A. Shaw
1a9e068d02 Junk items are now transfered to your blanket so you can use them in crafting. No UI for that though. 2025-04-27 13:35:05 -04:00
Zed A. Shaw
bc557652ba The player now has some starting items to craft a first weapon, and it is craftable in the UI. 2025-04-26 13:18:43 -04:00
Zed A. Shaw
c8a8d2b1af You can now craft a single ritual from the blanket. 2025-04-26 02:51:13 -04:00
Zed A. Shaw
292711f91f Prep for the actually making ritual crafting work. 2025-04-26 02:21:59 -04:00
Zed A. Shaw
ad1d08ca96 There's now an hp status indicator 'doll' when you click on it your host (character) will tell you how they're doing for HP. 2025-04-26 00:57:23 -04:00
Zed A. Shaw
dac9b1b3de rcrnstn found a way to make the shaders work under MESA by forcing the version number to 120 and no default params in functions. 2025-04-25 23:36:18 -04:00
Zed A. Shaw
1ab5fa4291 Fix from ORBLISH suggestion to stop any component that's not hover/clicked on in the mouse handler. 2025-04-25 23:17:45 -04:00
Zed A. Shaw
4c03fe1ed3 Make the raycaster 'highlight' things you point at. 2025-04-25 23:17:31 -04:00
Zed A. Shaw
bc31750d9c Fix from ORBLISH suggestion to stop any component that's not hover/clicked on in the mouse handler. 2025-04-25 23:17:14 -04:00
277 changed files with 8535 additions and 4596 deletions

1
.gitignore vendored
View file

@ -27,4 +27,5 @@ backup
*.dll *.dll
*.world *.world
coverage coverage
coverage/*
.venv .venv

View file

@ -1 +1 @@
set makeprg=meson\ compile\ -C\ . set makeprg=make\ -f\ ../Makefile\ build

View file

@ -1,3 +1,5 @@
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
all: build test all: build test
reset: reset:
@ -8,10 +10,19 @@ else
endif endif
%.cpp : %.rl %.cpp : %.rl
ragel -o $@ $< ragel -I $(ROOT_DIR) -G1 -o $@ $<
build: lel_parser.cpp %.dot: %.rl
meson compile -j 10 -C builddir ragel -Vp -I $(ROOT_DIR) -o $@ $<
%.png: %.dot
dot -Tpng $< -o $@
build:
meson compile -j 10 -C $(ROOT_DIR)/builddir
asset_build:
./builddir/icongen
release_build: release_build:
meson --wipe builddir -Db_ndebug=true --buildtype release meson --wipe builddir -Db_ndebug=true --buildtype release
@ -25,8 +36,8 @@ tracy_build:
meson setup --wipe builddir --buildtype debugoptimized -Dtracy_enable=true -Dtracy:on_demand=true meson setup --wipe builddir --buildtype debugoptimized -Dtracy_enable=true -Dtracy:on_demand=true
meson compile -j 10 -C builddir meson compile -j 10 -C builddir
test: build test:
./builddir/runtests ./builddir/runtests -d yes
run: build test run: build test
ifeq '$(OS)' 'Windows_NT' ifeq '$(OS)' 'Windows_NT'
@ -49,10 +60,13 @@ clean:
meson compile --clean -C builddir meson compile --clean -C builddir
debug_test: build debug_test: build
gdb --nx -x .gdbinit --ex run --args builddir/runtests -e gdb --nx -x .gdbinit --ex run --ex bt --ex q --args builddir/runtests -e
win_installer: win_installer:
powershell 'start "C:\Program Files (x86)\solicus\InstallForge\bin\ifbuilderenvx86.exe" scripts\win_installer.ifp' powershell 'start "C:\Program Files (x86)\solicus\InstallForge\bin\ifbuilderenvx86.exe" scripts\win_installer.ifp'
coverage_report: coverage_report:
powershell 'scripts/coverage_report.ps1' powershell 'scripts/coverage_report.ps1'
money:
scc --exclude-dir subprojects

1
ai.hpp
View file

@ -34,6 +34,7 @@ namespace ai {
void update(); void update();
void dump(); void dump();
std::string to_string();
}; };
struct AIManager { struct AIManager {

View file

@ -61,4 +61,14 @@ namespace ai {
dump_script(script, start, plan.script); dump_script(script, start, plan.script);
} }
std::string EntityAI::to_string() {
AIProfile* profile = ai::profile();
std::string result = wants_to();
for(auto& [name, name_id] : *profile) {
result += fmt::format("\n{}={}", name, start.test(name_id));
}
return result;
}
} }

View file

@ -9,7 +9,8 @@
"have_item": 6, "have_item": 6,
"have_healing": 7, "have_healing": 7,
"detect_enemy": 8, "detect_enemy": 8,
"tough_personality": 9 "tough_personality": 9,
"cant_move": 10
}, },
"actions": [ "actions": [
{ {
@ -22,6 +23,7 @@
"enemy_found": false "enemy_found": false
}, },
"effects": { "effects": {
"in_combat": true,
"enemy_found": true "enemy_found": true
} }
}, },
@ -32,7 +34,8 @@
"tough_personality": false, "tough_personality": false,
"in_combat": true, "in_combat": true,
"have_healing": false, "have_healing": false,
"health_good": false "health_good": false,
"cant_move": false
}, },
"effects": { "effects": {
"in_combat": false "in_combat": false
@ -63,13 +66,24 @@
"no_more_items": true "no_more_items": true
} }
}, },
{
"name": "find_healing",
"cost": 2,
"needs": {
"have_healing": false,
"in_combat": false,
"health_good": false
},
"effects": {
"health_good": true
}
},
{ {
"name": "use_healing", "name": "use_healing",
"cost": 0, "cost": 1,
"needs": { "needs": {
"have_item": true, "have_item": true,
"have_healing": true, "have_healing": true,
"in_combat": false,
"health_good": false "health_good": false
}, },
"effects": { "effects": {
@ -118,6 +132,7 @@
["find_enemy", ["find_enemy",
"kill_enemy", "kill_enemy",
"collect_items", "collect_items",
"find_healing",
"use_healing"], "use_healing"],
"Enemy::actions": "Enemy::actions":
["find_enemy", "run_away", "kill_enemy", "use_healing"] ["find_enemy", "run_away", "kill_enemy", "use_healing"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 665 KiB

After

Width:  |  Height:  |  Size: 665 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1,011 KiB

After

Width:  |  Height:  |  Size: 1,011 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 466 KiB

After

Width:  |  Height:  |  Size: 466 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 818 KiB

After

Width:  |  Height:  |  Size: 818 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 413 KiB

After

Width:  |  Height:  |  Size: 413 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View file

@ -22,293 +22,207 @@
"ui_hover": "assets/sounds/ui_hover.ogg", "ui_hover": "assets/sounds/ui_hover.ogg",
"punch_cartoony": "assets/sounds/punch_cartoony.ogg", "punch_cartoony": "assets/sounds/punch_cartoony.ogg",
"electric_shock_01": "assets/sounds/electric_shock_01.ogg", "electric_shock_01": "assets/sounds/electric_shock_01.ogg",
"fireball_01": "assets/sounds/fireball_01.ogg" "fireball_01": "assets/sounds/fireball_01.ogg",
"hp_status_80": "assets/sounds/hp_status_80.ogg",
"hp_status_60": "assets/sounds/hp_status_60.ogg",
"hp_status_30": "assets/sounds/hp_status_30.ogg",
"hp_status_10": "assets/sounds/hp_status_10.ogg",
"hp_status_00": "assets/sounds/hp_status_00.ogg"
}, },
"sprites": { "sprites": {
"gold_savior": "gold_savior":
{"path": "assets/gold_savior-256.png", {"path": "assets/sprites/gold_savior.png",
"frame_width": 256, "frame_width": 256,
"frame_height": 256 "frame_height": 256
}, },
"armored_knight": "armored_knight":
{"path": "assets/armored_knight_1-256.png", {"path": "assets/sprites/armored_knight_1.png",
"frame_width": 256,
"frame_height": 256
},
"sword":
{"path": "assets/cinqueda_1-256.png",
"frame_width": 256,
"frame_height": 256
},
"rat_with_sword":
{"path": "assets/rat_with_sword-256.png",
"frame_width": 256,
"frame_height": 256
},
"rat_king":
{"path": "assets/rat_king-256.png",
"frame_width": 256,
"frame_height": 256
},
"rat_king_boss":
{"path": "assets/rat_king_2_frame_animation.png",
"frame_width": 720,
"frame_height": 720
},
"barrel_small":
{"path": "assets/wood_barrel_small-256.png",
"frame_width": 256,
"frame_height": 256
},
"torch_pillar":
{"path": "assets/torch_pillar-256.png",
"frame_width": 256,
"frame_height": 256
},
"torch_crappy":
{"path": "assets/torch_crappy-256.png",
"frame_width": 256,
"frame_height": 256
},
"torch_horizontal_floor":
{"path": "assets/torch_horizontal_floor-256.png",
"frame_width": 256,
"frame_height": 256
},
"evil_eye":
{"path": "assets/evil_eye-sprites.png",
"frame_width": 256,
"frame_height": 256
},
"peasant_girl":
{"path": "assets/undead_peasant-256.png",
"frame_width": 256,
"frame_height": 256
},
"grave_stone":
{"path": "assets/grave_stone-256.png",
"frame_width": 256,
"frame_height": 256
},
"floor":
{"path": "assets/floor_tile_test-256.png",
"frame_width": 256,
"frame_height": 256
},
"ceiling":
{"path": "assets/ceiling_test-256.png",
"frame_width": 256,
"frame_height": 256
},
"healing_potion_small":
{"path": "assets/healing_potion_small-256.png",
"frame_width": 256,
"frame_height": 256
},
"well_down":
{"path": "assets/well_down-256.png",
"frame_width": 256,
"frame_height": 256
},
"rope_vines_up":
{"path": "assets/rope_vines_up-256.png",
"frame_width": 256,
"frame_height": 256
},
"tripwire_trap":
{"path": "assets/tripwire_trap-256.png",
"frame_width": 256,
"frame_height": 256
},
"cinqueda":
{"path": "assets/cinqueda_1-256.png",
"frame_width": 256,
"frame_height": 256
},
"blood_splatter":
{"path": "assets/blood_splatter-256.png",
"frame_width": 256, "frame_width": 256,
"frame_height": 256 "frame_height": 256
}, },
"axe_ranger": "axe_ranger":
{"path": "assets/axe_ranger-256.png", {"path": "assets/sprites/axe_ranger.png",
"frame_width": 256, "frame_width": 256,
"frame_height": 256 "frame_height": 256
}, },
"hairy_spider": "hairy_spider":
{"path": "assets/hairy_spider-256.png", {"path": "assets/sprites/hairy_spider.png",
"frame_width": 256, "frame_width": 256,
"frame_height": 256 "frame_height": 256
}, },
"down_the_well": "rat_with_sword":
{"path": "assets/down_the_well.jpg", {"path": "assets/sprites/rat_with_sword.png",
"frame_width": 900, "frame_width": 256,
"frame_height": 600 "frame_height": 256
},
"rat_king_boss":
{"path": "assets/bossfights/rat_king_2_frame_animation.png",
"frame_width": 720,
"frame_height": 720
},
"barrel_small":
{"path": "assets/items/wood_barrel_small.png",
"frame_width": 256,
"frame_height": 256
},
"torch_pillar":
{"path": "assets/sprites/torch_pillar.png",
"frame_width": 256,
"frame_height": 256
},
"torch_crappy":
{"path": "assets/items/torch_crappy.png",
"frame_width": 256,
"frame_height": 256
},
"torch_horizontal_floor":
{"path": "assets/items/torch_horizontal_floor.png",
"frame_width": 256,
"frame_height": 256
},
"peasant_girl":
{"path": "assets/sprites/peasant_girl_2.png",
"frame_width": 256,
"frame_height": 256
},
"grave_stone":
{"path": "assets/sprites/grave_stone.png",
"frame_width": 256,
"frame_height": 256
},
"healing_potion_small":
{"path": "assets/items/healing_potion_small.png",
"frame_width": 256,
"frame_height": 256
},
"well_down":
{"path": "assets/sprites/well_down.png",
"frame_width": 256,
"frame_height": 256
},
"rope_vines_up":
{"path": "assets/sprites/rope_vines_up.png",
"frame_width": 256,
"frame_height": 256
},
"tripwire_trap":
{"path": "assets/sprites/tripwire_trap.png",
"frame_width": 256,
"frame_height": 256
}, },
"boss_fight_background": "boss_fight_background":
{"path": "assets/rat_king_boss_fight_background.jpg", {"path": "assets/bossfights/rat_king_boss_fight_background.jpg",
"frame_width": 1080, "frame_width": 1080,
"frame_height": 720 "frame_height": 720
}, },
"devils_fingers_background": "devils_fingers_background":
{"path": "assets/devils_fingers_background.jpg", {"path": "assets/bossfights/devils_fingers_background.jpg",
"frame_width": 1080, "frame_width": 1080,
"frame_height": 720 "frame_height": 720
}, },
"devils_fingers_sprite": "devils_fingers_sprite":
{"path": "assets/devils_fingers_sprite.png", {"path": "assets/bossfights/devils_fingers_sprite.png",
"frame_width": 720, "frame_width": 720,
"frame_height": 720 "frame_height": 720
}, },
"devils_fingers_stage": "devils_fingers_stage":
{"path": "assets/devils_fingers_stage.png", {"path": "assets/bossfights/devils_fingers_stage.png",
"frame_width": 1080, "frame_width": 1080,
"frame_height": 720 "frame_height": 720
}, },
"tunnel_with_rocks": "tunnel_with_rocks":
{"path": "assets/tunnel_with_rocks.png", {"path": "assets/bossfights/tunnel_with_rocks.png",
"frame_width": 1080, "frame_width": 1080,
"frame_height": 720 "frame_height": 720
}, },
"tunnel_with_rocks_stage": "tunnel_with_rocks_stage":
{"path": "assets/tunnel_with_rocks_stage.png", {"path": "assets/bossfights/tunnel_with_rocks_stage.png",
"frame_width": 1080, "frame_width": 1080,
"frame_height": 720 "frame_height": 720
}, },
"ritual_crafting_area": "ritual_crafting_area":
{"path": "assets/ritual_crafting_area.png", {"path": "assets/ui/ritual_crafting_area.png",
"frame_width": 380,
"frame_height": 720
},
"the_ritual_circle":
{"path": "assets/the_ritual_circle.png",
"frame_width": 380,
"frame_height": 380
},
"paper_ui_background":
{"path": "assets/paper_ui_background.png",
"frame_width": 380, "frame_width": 380,
"frame_height": 720 "frame_height": 720
}, },
"full_screen_paper": "full_screen_paper":
{"path": "assets/full_screen_paper.png", {"path": "assets/ui/full_screen_paper.png",
"frame_width": 1280, "frame_width": 1280,
"frame_height": 720 "frame_height": 720
}, },
"broken_locket-64": "broken_locket":
{"path": "assets/rituals/broken_locket-64.png", {"path": "assets/items/broken_locket.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"broken_locket-128": "broken_pen_knife":
{"path": "assets/rituals/broken_locket-128.png", {"path": "assets/items/broken_pen_knife.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"broken_pen_knife-64": "broken_yoyo":
{"path": "assets/rituals/broken_pen_knife-64.png", {"path": "assets/items/broken_yoyo.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"broken_pen_knife-128": "chess_pawn":
{"path": "assets/rituals/broken_pen_knife-128.png", {"path": "assets/items/chess_pawn.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"broken_yoyo-64": "dirty_kerchief":
{"path": "assets/rituals/broken_yoyo-64.png", {"path": "assets/items/dirty_kerchief.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"broken_yoyo-128": "leather_pouch":
{"path": "assets/rituals/broken_yoyo-128.png", {"path": "assets/items/leather_pouch.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"chess_pawn-64": "mushroom":
{"path": "assets/rituals/chess_pawn-64.png", {"path": "assets/items/mushroom.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"chess_pawn-128": "pocket_watch":
{"path": "assets/rituals/chess_pawn-128.png", {"path": "assets/items/pocket_watch.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"dirty_kerchief-64": "rusty_nails":
{"path": "assets/rituals/dirty_kerchief-64.png", {"path": "assets/items/rusty_nails.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"dirty_kerchief-128": "severed_finger":
{"path": "assets/rituals/dirty_kerchief-128.png", {"path": "assets/items/severed_finger.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"leather_pouch-64": "stone_doll_cursed":
{"path": "assets/rituals/leather_pouch-64.png", {"path": "assets/items/stone_doll_cursed.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"leather_pouch-128": "dubious_combination":
{"path": "assets/rituals/leather_pouch-128.png", {"path": "assets/items/dubious_combination.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
}, },
"mushroom-64": "dead_body":
{"path": "assets/rituals/mushroom-64.png", {"path": "assets/sprites/dead_body.png",
"frame_width": 64, "frame_width": 256,
"frame_height": 64 "frame_height": 256
}, },
"mushroom-128": "dead_body_lootable":
{"path": "assets/rituals/mushroom-128.png", {"path": "assets/sprites/dead_body_lootable.png",
"frame_width": 128, "frame_width": 256,
"frame_height": 128 "frame_height": 256
},
"pocket_watch-64":
{"path": "assets/rituals/pocket_watch-64.png",
"frame_width": 64,
"frame_height": 64
},
"pocket_watch-128":
{"path": "assets/rituals/pocket_watch-128.png",
"frame_width": 128,
"frame_height": 128
},
"rusty_nails-64":
{"path": "assets/rituals/rusty_nails-64.png",
"frame_width": 64,
"frame_height": 64
},
"rusty_nails-128":
{"path": "assets/rituals/rusty_nails-128.png",
"frame_width": 128,
"frame_height": 128
},
"severed_finger-64":
{"path": "assets/rituals/severed_finger-64.png",
"frame_width": 64,
"frame_height": 64
},
"severed_finger-128":
{"path": "assets/rituals/severed_finger-128.png",
"frame_width": 128,
"frame_height": 128
},
"stone_doll_cursed-64":
{"path": "assets/rituals/stone_doll_cursed-64.png",
"frame_width": 64,
"frame_height": 64
},
"stone_doll_cursed-128":
{"path": "assets/rituals/stone_doll_cursed-128.png",
"frame_width": 128,
"frame_height": 128
} }
}, },
"worldgen": { "worldgen": {
"enemy_probability": 50, "enemy_probability": 50,
"empty_room_probability": 1,
"device_probability": 10 "device_probability": 10
}, },
"graphics": { "graphics": {
@ -324,9 +238,12 @@
"W": 8592, "W": 8592,
"NW": 8598 "NW": 8598
}, },
"test_rituals": [ "theme": {
{ "has_spikes": true, "active": true }, "NOTE": "colors are in assets/palette.json",
{ "has_magick": true, "active": true }, "padding": 3,
{ "has_magick": true, "shiny_bauble": true, "active": true } "border_px": 1,
] "text_size": 20,
"label_size": 20,
"font_file_name": "assets/text.otf"
}
} }

View file

@ -7,13 +7,13 @@
"inventory_count": 0, "inventory_count": 0,
"randomized": false, "randomized": false,
"components": [ "components": [
{"_type": "Tile", "display": 10949, {"_type": "Tile", "display": 6105,
"foreground": [24, 205, 189], "foreground": "devices/fg:stairs_down",
"background": [24, 205, 189] "background": "devices/bg:stairs_down"
}, },
{"_type": "Device", {"_type": "Device",
"config": {"test": true}, "config": {},
"events": ["Events::GUI::STAIRS_DOWN"]}, "events": ["STAIRS_DOWN"]},
{"_type": "Sprite", "name": "well_down", "width": 256, "height": 256, "scale": 1.0} {"_type": "Sprite", "name": "well_down", "width": 256, "height": 256, "scale": 1.0}
] ]
}, },
@ -25,12 +25,12 @@
"placement": "fixed", "placement": "fixed",
"components": [ "components": [
{"_type": "Tile", "display": 8793, {"_type": "Tile", "display": 8793,
"foreground": [24, 205, 189], "foreground": "devices/fg:stairs_up",
"background": [24, 205, 189] "background": "devices/fg:stairs_up"
}, },
{"_type": "Device", {"_type": "Device",
"config": {"test": true}, "config": {},
"events": ["Events::GUI::STAIRS_UP"]}, "events": ["STAIRS_UP"]},
{"_type": "Sprite", "name": "rope_vines_up", "width": 256, "height": 256, "scale": 1.0} {"_type": "Sprite", "name": "rope_vines_up", "width": 256, "height": 256, "scale": 1.0}
] ]
}, },
@ -40,14 +40,66 @@
"description": "Watch where you're going.", "description": "Watch where you're going.",
"inventory_count": 0, "inventory_count": 0,
"components": [ "components": [
{"_type": "Tile", "display": 6855, {"_type": "Tile", "display": 95,
"foreground": [24, 205, 189], "foreground": "devices/fg:tripwire",
"background": [24, 205, 189] "background": "devices/bg:tripwire"
}, },
{"_type": "Device", {"_type": "Device", "config": {}, "events": ["TRAP"]},
"config": {"test": true},
"events": ["Events::GUI::TRAP"]},
{"_type": "Sprite", "name": "tripwire_trap", "width": 256, "height": 256, "scale": 1.0} {"_type": "Sprite", "name": "tripwire_trap", "width": 256, "height": 256, "scale": 1.0}
] ]
},
"BARREL_SMALL": {
"id": "BARREL_SMALL",
"name": "Small Barrel",
"description": "A small rotten barrel that may hold things.",
"components": [
{"_type": "Tile", "display": 85,
"foreground": "devices/fg:barrel",
"background": "devices/bg:barrel"
},
{"_type": "Device", "config": {}, "events": ["LOOT_CONTAINER"]},
{"_type": "Sprite", "name": "barrel_small", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
"GRAVE_STONE": {
"id": "GRAVE_STONE",
"name": "Grave Stone",
"description": "Something died here. Was this your doing?",
"components": [
{"_type": "Tile", "display": 8687,
"foreground": "devices/fg:grave_stone",
"background": "devices/bg:grave_stone"
},
{"_type": "Device", "config": {}, "events": ["LOOT_CONTAINER"]},
{"_type": "Sprite", "name": "grave_stone", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
"DEAD_BODY_LOOTABLE": {
"id": "DEAD_BODY_LOOTABLE",
"name": "Grave Stone",
"description": "Something died here. Was this your doing?",
"components": [
{"_type": "Tile", "display": 1890,
"foreground": "devices/fg:dead_body_lootable",
"background": "devices/bg:dead_body_lootable"
},
{"_type": "Device", "config": {}, "events": ["LOOT_CONTAINER"]},
{"_type": "Sprite", "name": "dead_body_lootable", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
"DEAD_BODY": {
"id": "DEAD_BODY",
"name": "Something Dead",
"description": "You can't loot this, weirdo.",
"components": [
{"_type": "Tile", "display": 1939,
"foreground": "devices/fg:dead_body",
"background": "devices/bg:dead_body"
},
{"_type": "Sprite", "name": "dead_body", "width": 256, "height": 256, "scale": 1.0}
]
} }
} }

View file

@ -2,22 +2,40 @@
"PLAYER_TILE": { "PLAYER_TILE": {
"placement": "fixed", "placement": "fixed",
"components": [ "components": [
{"_type": "Tile", "display": 42603, {"_type": "Tile", "display": 10733,
"foreground": [255, 200, 125], "foreground": "enemies/fg:player",
"background": [30, 20, 75] "background": "color:transparent"
}, },
{"_type": "Combat", "hp": 200, "max_hp": 200, "damage": 10, "dead": false}, {"_type": "Combat", "hp": 200, "max_hp": 200, "damage": 10, "dead": false},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "LightSource", "strength": 45, "radius": 2.0} {"_type": "Collision", "has": true},
{"_type": "LightSource", "strength": 35, "radius": 2.0}
]
},
"GOLD_SAVIOR": {
"components": [
{"_type": "Tile", "display": 42586,
"foreground": "enemies/fg:gold_savior",
"background": "color:transparent"
},
{"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 1, "dead": false},
{"_type": "Collision", "has": true},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"},
{"_type": "Personality", "hearing_distance": 5, "tough": true},
{"_type": "Animation", "easing": 1, "ease_rate": 0.2, "scale": 0.1, "simple": true, "frames": 10, "speed": 0.3, "stationary": false},
{"_type": "Sprite", "name": "gold_savior", "width": 256, "height": 256, "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "Sword_Hit_2", "death": "Humanoid_Death_1"}
] ]
}, },
"KNIGHT": { "KNIGHT": {
"components": [ "components": [
{"_type": "Tile", "display": 2189, {"_type": "Tile", "display": 2216,
"foreground": [131, 213, 238], "foreground": "enemies/fg:knight",
"background": [30, 20, 75] "background": "color:transparent"
}, },
{"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 1, "dead": false}, {"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 1, "dead": false},
{"_type": "Collision", "has": true},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"},
{"_type": "Personality", "hearing_distance": 5, "tough": true}, {"_type": "Personality", "hearing_distance": 5, "tough": true},
@ -29,28 +47,30 @@
"AXE_RANGER": { "AXE_RANGER": {
"components": [ "components": [
{"_type": "Tile", "display": 1898, {"_type": "Tile", "display": 1898,
"foreground": [156, 172, 197], "foreground": "enemies/fg:axe_ranger",
"background": [30, 20, 75] "background": "color:transparent"
}, },
{"_type": "Combat", "hp": 40, "max_hp": 40, "damage": 10, "dead": false}, {"_type": "Combat", "hp": 40, "max_hp": 40, "damage": 10, "dead": false},
{"_type": "Collision", "has": true},
{"_type": "Motion", "dx": 0, "dy": 0, "random": true}, {"_type": "Motion", "dx": 0, "dy": 0, "random": true},
{"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"},
{"_type": "Personality", "hearing_distance": 5, "tough": true}, {"_type": "Personality", "hearing_distance": 5, "tough": true},
{"_type": "Sprite", "name": "axe_ranger", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sprite", "name": "axe_ranger", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": false, "frames": 2, "speed": 0.6, "stationary": false}, {"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 1, "speed": 0.6, "stationary": false},
{"_type": "Sound", "attack": "Sword_Hit_2", "death": "Ranger_1"} {"_type": "Sound", "attack": "Sword_Hit_2", "death": "Ranger_1"}
] ]
}, },
"RAT_GIANT": { "RAT_GIANT": {
"components": [ "components": [
{"_type": "Tile", "display": 2220, {"_type": "Tile", "display": 2220,
"foreground": [205, 164, 246], "foreground": "enemies/fg:rat_giant",
"background": [30, 20, 75] "background": "color:transparent"
}, },
{"_type": "Combat", "hp": 50, "max_hp": 50, "damage": 2, "dead": false}, {"_type": "Combat", "hp": 50, "max_hp": 50, "damage": 2, "dead": false},
{"_type": "Collision", "has": true},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"},
{"_type": "Personality", "hearing_distance": 5, "tough": false}, {"_type": "Personality", "hearing_distance": 5, "tough": true},
{"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 1, "speed": 1.0, "stationary": false}, {"_type": "Animation", "easing": 3, "ease_rate": 0.5, "scale": 0.1, "simple": true, "frames": 1, "speed": 1.0, "stationary": false},
{"_type": "Sprite", "name": "rat_with_sword", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sprite", "name": "rat_with_sword", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "Small_Rat", "death": "Creature_Death_1"} {"_type": "Sound", "attack": "Small_Rat", "death": "Creature_Death_1"}
@ -59,10 +79,11 @@
"SPIDER_GIANT_HAIRY": { "SPIDER_GIANT_HAIRY": {
"components": [ "components": [
{"_type": "Tile", "display": 1218, {"_type": "Tile", "display": 1218,
"foreground": [205, 164, 246], "foreground": "enemies/fg:spider_giant",
"background": [30, 20, 75] "background": "color:transparent"
}, },
{"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 20, "dead": false}, {"_type": "Combat", "hp": 20, "max_hp": 20, "damage": 20, "dead": false},
{"_type": "Collision", "has": true},
{"_type": "Motion", "dx": 0, "dy": 0, "random": false}, {"_type": "Motion", "dx": 0, "dy": 0, "random": false},
{"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"}, {"_type": "EnemyConfig", "ai_script": "Enemy::actions", "ai_start_name": "Enemy::initial_state", "ai_goal_name": "Enemy::final_state"},
{"_type": "Personality", "hearing_distance": 5, "tough": true}, {"_type": "Personality", "hearing_distance": 5, "tough": true},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

12
assets/icons.json Normal file
View file

@ -0,0 +1,12 @@
{
"healing_potion_small":
{"path": "assets/icons/healing_potion_small.png",
"frame_width": 96,
"frame_height": 96
},
"torch_horizontal_floor":
{"path": "assets/icons/torch_horizontal_floor.png",
"frame_width": 96,
"frame_height": 96
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -7,58 +7,13 @@
"components": [ "components": [
{"_type": "LightSource", "strength": 50, "radius": 2.5}, {"_type": "LightSource", "strength": 50, "radius": 2.5},
{"_type": "Tile", "display": 3848, {"_type": "Tile", "display": 3848,
"foreground": [24, 120, 189], "foreground": "items/fg:flame",
"background": [230,120, 120] "background": "color:transparent"
}, },
{"_type": "Sprite", "name": "torch_horizontal_floor", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sprite", "name": "torch_horizontal_floor", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"} {"_type": "Sound", "attack": "pickup", "death": "blank"}
] ]
}, },
"SWORD_RUSTY": {
"id": "SWORD_RUSTY",
"name": "Rusty Junk Sword",
"description": "A sword left to rot in a deep hole where it acquired a patina of dirt and tetanus. You aren't sure if it's more deadly for you to hold it or for the people you stab with it.",
"inventory_count": 1,
"components": [
{"_type": "Weapon", "damage": 15},
{"_type": "Tile", "display": 7735,
"foreground": [24, 120, 189],
"background": [24, 120, 189]
},
{"_type": "Sprite", "name": "cinqueda", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
"BARREL_SMALL": {
"id": "BARREL_SMALL",
"name": "Small Barrel",
"description": "A small rotten barrel that may hold things.",
"components": [
{"_type": "Tile", "display": 43754,
"foreground": [150, 100, 189],
"background": [150, 100, 189]
},
{"_type": "Loot", "amount": 10},
{"_type": "Sprite", "name": "barrel_small", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
],
"inventory_count": 1
},
"TORCH_PILLAR": {
"id": "TORCH_PILLAR",
"name": "Light Hanging from Ceiling",
"description": "Light Hanging from Ceiling",
"inventory_count": 0,
"components": [
{"_type": "Tile", "display": 1918,
"foreground": [24, 205, 210],
"background": [24, 205, 210]
},
{"_type": "LightSource", "strength": 50, "radius": 2.8},
{"_type": "Sprite", "name": "torch_pillar", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
},
"POTION_HEALING_SMALL": { "POTION_HEALING_SMALL": {
"id": "POTION_HEALING_SMALL", "id": "POTION_HEALING_SMALL",
"name": "Small Healing Potion", "name": "Small Healing Potion",
@ -66,27 +21,12 @@
"inventory_count": 1, "inventory_count": 1,
"components": [ "components": [
{"_type": "Tile", "display": 1003, {"_type": "Tile", "display": 1003,
"foreground": [255, 205, 189], "foreground": "items/fg:potion",
"background": [255, 205, 189] "background": "color:transparent"
}, },
{"_type": "Curative", "hp": 20}, {"_type": "Curative", "hp": 20},
{"_type": "Sprite", "name": "healing_potion_small", "width": 256, "height": 256, "scale": 1.0}, {"_type": "Sprite", "name": "healing_potion_small", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"} {"_type": "Sound", "attack": "pickup", "death": "blank"}
] ]
},
"GRAVE_STONE": {
"id": "GRAVE_STONE",
"name": "Grave Stone",
"description": "Something died here. Was this your doing?",
"inventory_count": 1,
"components": [
{"_type": "Tile", "display": 8687,
"foreground": [32, 123, 164],
"background": [24, 205, 189]
},
{"_type": "Loot", "amount": 10},
{"_type": "Sprite", "name": "grave_stone", "width": 256, "height": 256, "scale": 1.0},
{"_type": "Sound", "attack": "pickup", "death": "blank"}
]
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/items/chess_pawn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
assets/items/cinqueda.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/items/mushroom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

140
assets/map_tiles.json Normal file
View file

@ -0,0 +1,140 @@
[
{
"centered": false,
"display": 35,
"x": 0,
"y": 0
},
{
"centered": false,
"display": 8284,
"x": 64,
"y": 0
},
{
"centered": false,
"display": 11590,
"x": 128,
"y": 0
},
{
"centered": false,
"display": 10899,
"x": 192,
"y": 0
},
{
"centered": false,
"display": 9256,
"x": 256,
"y": 0
},
{
"centered": false,
"display": 9608,
"x": 320,
"y": 0
},
{
"centered": false,
"display": 10747,
"x": 384,
"y": 0
},
{
"centered": false,
"display": 8285,
"x": 448,
"y": 0
},
{
"centered": true,
"display": 1003,
"x": 512,
"y": 0
},
{
"centered": true,
"display": 3848,
"x": 576,
"y": 0
},
{
"centered": true,
"display": 85,
"x": 0,
"y": 64
},
{
"centered": true,
"display": 1939,
"x": 64,
"y": 64
},
{
"centered": true,
"display": 1890,
"x": 128,
"y": 64
},
{
"centered": true,
"display": 8687,
"x": 192,
"y": 64
},
{
"centered": true,
"display": 6105,
"x": 256,
"y": 64
},
{
"centered": true,
"display": 8793,
"x": 320,
"y": 64
},
{
"centered": true,
"display": 95,
"x": 384,
"y": 64
},
{
"centered": true,
"display": 1898,
"x": 448,
"y": 64
},
{
"centered": true,
"display": 42586,
"x": 512,
"y": 64
},
{
"centered": true,
"display": 2216,
"x": 576,
"y": 64
},
{
"centered": true,
"display": 10733,
"x": 0,
"y": 128
},
{
"centered": true,
"display": 2220,
"x": 64,
"y": 128
},
{
"centered": true,
"display": 1218,
"x": 128,
"y": 128
}
]

BIN
assets/map_tiles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

81
assets/palette.json Normal file
View file

@ -0,0 +1,81 @@
{
"color": {
"transparent": [100, 100, 100, 100],
"BAD": [255, 0, 0]
},
"gui/theme": {
"black": [0, 0, 0, 255],
"dark_dark": [10, 10, 10, 255],
"dark_mid": [30, 30, 30, 255],
"dark_light": [60, 60, 60, 255],
"mid": [100, 100, 100, 255],
"light_dark": [150, 150, 150, 255],
"light_mid": [200, 200, 200, 255],
"light_light": [230, 230, 230, 255],
"white": [255, 255, 255, 255],
"fill_color": "gui/theme:dark_mid",
"text_color": "gui/theme:light_light",
"bg_color": "gui/theme:mid",
"border_color": "gui/theme:dark_dark",
"bg_color_dark": "gui/theme:black"
},
"map/theme": {
"black": [0, 0, 0, 255],
"dark_dark": [10, 10, 10, 255],
"dark_mid": [30, 30, 30, 255],
"dark_light": [60, 60, 60, 255],
"mid": [100, 100, 100, 255],
"light_dark": [150, 150, 150, 255],
"light_mid": [200, 200, 200, 255],
"light_light": [230, 230, 230, 255],
"white": [255, 255, 255, 255]
},
"items/fg": {
"flame": "map/theme:white",
"potion": "map/theme:white"
},
"enemies/fg": {
"player": "map/theme:white",
"gold_savior": "map/theme:white",
"knight": "map/theme:white",
"axe_ranger": "map/theme:white",
"rat_giant": "map/theme:white",
"spider_giant": "map/theme:white"
},
"tiles/fg": {
"floor_tile": "map/theme:mid",
"wall_plain": "map/theme:dark_mid",
"wall_moss": "map/theme:dark_light",
"ceiling_black": "color:transparent",
"lava_floor": [200, 100, 100],
"gray_stone_floor_light": [40, 60, 180],
"wood_wall": "map/theme:dark_mid"
},
"tiles/bg": {
"floor_tile": "map/theme:dark_dark",
"wall_plain": "map/theme:dark_dark",
"wall_moss": "map/theme:light_dark",
"ceiling_black": "color:transparent",
"lava_floor": "map/theme:dark_dark",
"gray_stone_floor_light": "map/theme:dark_mid",
"wood_wall": "map/theme:dark_dark"
},
"devices/fg": {
"stairs_down": [24, 205, 189],
"stairs_up": [24, 205, 189],
"tripwire": [24, 205, 189],
"barrel": [150, 100, 189],
"grave_stone": [32, 123, 164],
"dead_body": [32, 123, 164],
"dead_body_lootable": [32, 123, 164]
},
"devices/bg": {
"stairs_down": [24, 205, 189],
"stairs_up": [24, 205, 189],
"tripwire": [24, 205, 189],
"barrel": [150, 100, 189],
"grave_stone": [24, 205, 189],
"dead_body": [24, 205, 189],
"dead_body_lootable": [24, 205, 189]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View file

@ -169,5 +169,34 @@
"damage": 16, "damage": 16,
"probability": 1.0 "probability": 1.0
} }
} },
"junk": {
"chess_pawn": {
"name": "chess_pawn",
"provides": ["cursed_item"]
},
"dirty_kerchief": {
"name": "dirty_kerchief",
"provides": ["has_magick"]
},
"mushroom": {
"name": "mushroom",
"provides": ["has_magick"]
},
"pocket_watch": {
"name": "pocket_watch",
"provides": ["shiny_bauble"]
},
"rusty_nails": {
"name": "rusty_nails",
"provides": ["has_spikes"]
},
"severed_finger": {
"name": "severed_finger",
"provides": ["cursed_item"]
}
},
"starting_junk": [
"pocket_watch", "mushroom", "rusty_nails"
]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View file

@ -1,8 +1,10 @@
#version 120
uniform vec2 u_resolution; uniform vec2 u_resolution;
uniform float u_time; uniform float u_time;
uniform sampler2D source; uniform sampler2D source;
uniform float u_mouse; uniform float u_mouse;
uniform float value = 0.2; uniform float value = 0.2;
uniform int octaves=8;
float random (in vec2 st) { float random (in vec2 st) {
return fract(sin(dot(st.xy, return fract(sin(dot(st.xy,
@ -26,7 +28,7 @@ float noise(in vec2 st) {
(d - b) * u.x * u.y; (d - b) * u.x * u.y;
} }
float fbm(in vec2 st, int octaves=8) { float fbm(in vec2 st) {
float v = 0.0; float v = 0.0;
float a = 0.5; float a = 0.5;
vec2 shift = vec2(100.0); vec2 shift = vec2(100.0);
@ -47,7 +49,7 @@ void main() {
vec3 color = vec3(0.0); vec3 color = vec3(0.0);
float speed = u_time * 10.0; float speed = u_time * 10.0;
float value = cos(u_time) * cos(u_time); float value = 0.8; // cos(u_time) * cos(u_time);
vec2 q = vec2(0.0); vec2 q = vec2(0.0);
q.x = fbm(st + 0.00 * speed); q.x = fbm(st + 0.00 * speed);

View file

@ -1,8 +1,10 @@
#version 120
uniform vec2 u_resolution; uniform vec2 u_resolution;
uniform float u_time; uniform float u_time;
uniform sampler2D source; uniform sampler2D source;
uniform float u_mouse; uniform float u_mouse;
uniform float value = 0.2; uniform float value = 0.2;
uniform int octaves=8;
float random (in vec2 st) { float random (in vec2 st) {
return fract(sin(dot(st.xy, return fract(sin(dot(st.xy,
@ -26,7 +28,7 @@ float noise(in vec2 st) {
(d - b) * u.x * u.y; (d - b) * u.x * u.y;
} }
float fbm(in vec2 st, int octaves=8) { float fbm(in vec2 st) {
float v = 0.0; float v = 0.0;
float a = 0.5; float a = 0.5;
vec2 shift = vec2(100.0); vec2 shift = vec2(100.0);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

17
assets/styles.json Normal file
View file

@ -0,0 +1,17 @@
[
{
"name": "Mossy Blue Ceiling",
"floor": "gray_stone_floor_light",
"walls": "wall_moss"
},
{
"name": "Plain",
"floor": "floor_tile",
"walls": "wall_plain"
},
{
"name": "Wood Walls",
"floor": "floor_tile",
"walls": "wood_wall"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Some files were not shown because too many files have changed in this diff Show more