Amazon Crash

rough sketch of 2D action boss-rush

This is a prototype for a 2D action game made in a couple of weeks. Me and a friend wanted to make it a sort of boss-rush game with different enemies as an opportunity to learn about godot, but we sadly moved onto other projects after a while.

When thinking about what an action game needs first and foremost, I think movement and actionsets. For enemies, I control their attacks and behaviors using a single State Machine, mostly taken from this video. Transitions from state to state could be triggered by conditions specific to each enemy, like their health total, or their line of sight to the player, or internal timers.

Your average state machine, with child states.

Each player attack is also handled with those same state machines, not unlike character action games. I thought making transitions between states could lead to some sort of “combo strings” using just two attack buttons. So, each attack state is tied to an animation that also sets which frames you can roll-cancel and which frames you can input to start another attack, and if an input is triggered when the roll-cancel boolean is active, the player transitions to the Roll state and so on.

Animations handle moving hitboxes and i-frames.

In the end, it has a decent and modular system for action games with combo strings, like you see in the Monster Hunter games with their complex weapon movesets. I had three different weapons in the demo, a sword, a spear and a bow. Sword and Spear attacks could weave into each other, while the bow had an entirely separate flow. There’s room to use multiple state machines for various parts of a character’s moveset, and combined with some system to buffer inputs it could be very powerful.

Average weapon flowchart from Monster Hunter

The Github repo is public if you want to check it out. I would love to find an excuse to use this in an actual project soon.