Action Queue
I took the ascii explosion animation / mechanic I developed last week and made an alternate mode that causes an electric discharge that only propagates across water. Now, whenever trying to used a lightning-based spell or item, it will instead cause an electric discharge that harms the caster as well. Naturally, I also added an electric eel enemy that uses electric discharges as it's special attack.
Anyway, in the name of turning this project into a real playable game, I decided I should focus on some QoL improvements, starting with an auto pick up feature. After a moment of thinking about how I would implement that, I decided I really should have an action queue for the player, whereby commands would cause one or more actions to be pushed onto a queue and popped off at a later point when it was convenient to execute.
And boy do I ever wish I had implemented that sooner! Previously, I had already implemented a way for the player to pick up or drop multiple items at one time, but I did it in such a way as to avoid using an action queue, and the work around was horribly convoluted and involved a bunch of terrible, redundant code that I was happy to chop out once I had a real action queue. Now the player can just select how ever many items to drop from inventory at one time, the right number of actions are added to the queue and played out in sequence. The rest of the game updates between every drop action, and the player is prompted to stop if anything important happens, like if something causes damage, or a hostile creature shows up within view.
I applied the same system to the existing "give" and "sell" commands, and then added a "take away" command to take away items from co-operative creatures (or sleeping enemies). This command is actually kind of important, since the player may need a horse or a giant lizard or something to help carry gear and treasure around. Selecting many items at once to give or take makes it much easier to manage moving things around.
I have some more ideas for how I'd like to use the action queue. For example, if you try to wield a two-handed weapon while using a shield, the game would automatically put the shield away first and queue the wield action. Similar idea for taking off rings while wearing gloves.
I recorded a couple of gifs to demonstrate the new effects. In the first one I drop a bomb near an explosive fungus while surrounded by enemies, then teleport away. In the second, I zap a wand of lightning a couple of times, then try it in the water to generate an electric discharge. These gifs are a bit janky. The actual game looks smoother. They're on my itch.io site.
Sunlorn
Open world and cave exploration game.
Status | In development |
Author | Tesselation9000 |
Genre | Adventure |
Tags | Roguelike |
More posts
- Gas Overhauled33 days ago
- More ContentJun 02, 2024
- Birth of the GodsMay 20, 2024
- Revised City GenerationMar 16, 2024
Leave a comment
Log in with itch.io to leave a comment.