[April Status] State Machines


Hi all,

It's been 6 months since I released my last game, Vial Varmit, in October 2023. Since then, I've started two projects: Silver Key, and untitled mouse game. Both were conceived as low-intensity games that I would be able to finish quickly. Both ballooned into projects that I wanted to give more time and care. While I'd really like to release regular, little games, I think it will be more productive to make what I'm passionate about. So, I've restarted Silver Key in 3D.

Since this project is significantly more ambitious, I’m keeping a taskboard in GitHub. The tasks are organized into Phases, where Phase I is the initial prototype. I am going to release the Phase I prototype before the end of May.

What’s In Phase I?

Silver Key Phase I features one small dungeon and a small section of overworld. In the overworld, the player can purchase goods from a merchant and store items. In the dungeon, the player will find three enemy types, as well as silver currency and other items.

The primary goal and most difficult aspect of this phase is making the player comfortable to control. The player can attack, run, dodge, block, and use items from their inventory. Similar to other games I’ve made, the player uses a state machine. A state machine is a kind of diagram where every action a player can take has a list of properties and connections to other actions. For example, when the player dodges, they gain the intangible property- damage phases through them- until the dodge ends and they return to the default state. If the player attacks, they gain the property of dealing damage, become immobile, and can leave the state by either finishing the attack and returning to the default state, or by being damaged and interrupted, starting the damaged or possibly death state.

These states can get even more granular. You’d likely want to separate an attack into three states, attack start, attack damage, and attack end. During attack start, the player raises their arm to strike. No damage is dealt during attack start as that wouldn’t make sense. Once attack start has ended, it leads into the attack damage state, followed by the attack end state. During the attack end state, the player may return to their default state or may initiate a combo. All of these states could potentially be interrupted by enemy damage, with different consequences.

This is the current player state machine:

This is the simplest state machine I could make for the prototype. In later phases, I will add more granularity, but I’m simplifying the number of states so that I can focus on making the transitions feel right.

Current Progress

The player actions, inventory, and dungeon are all implemented. Enemies have some logic and simple pathfinding. One of the three intended enemies is in a playable state.

Keeping a taskboard has been really useful. I thought it would be tedious as a solo-developer, but the board has made it easy to decide what tasks need to be done, and which tasks I should save for later. It’s also really encouraging to keep a list of completed tasks.


That’s it for April! I’ll see you in a month when the prototype is complete!

Files

SilverKey_0.01_win64.zip 35 MB
May 15, 2024

Get Silver Key [v.02]

Leave a comment

Log in with itch.io to leave a comment.