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.
Get Sunlorn
Sunlorn
Open world and cave exploration game.
Status | In development |
Author | Tesselation9000 |
Genre | Adventure |
Tags | Roguelike |
More posts
- Exploring Catacombs, Catching Spirits33 days ago
- A Helping Hand to Rat Skeletons and Unfolding Bridges33 days ago
- Chaos Mode and Getting Swallowed33 days ago
- Forts and Fighting Iron Golems with Water33 days ago
- Maze Levels and Wind Magic33 days ago
- Moveable Statues, Animation Traps and Rings of Telekinesis33 days ago
- Populating Civilizations and Bomb Traps33 days ago
- Ripping out Brains, Madness and FearApr 16, 2025
- New Nations, Rumours and MapsApr 04, 2025
- Trapdoors, Linked Portals and Grabbing TentaclesApr 04, 2025
Leave a comment
Log in with itch.io to leave a comment.