First devlog at: /blog/1529159/new-devlog-open-world-survival-craft-gam

I actually animated the dagger being swung around, with a swing effect and knife actually being held like a proper weapon.
I also replaced the ground texture with something more alien and less crap looking than that grass.
The code for swinging the weapon was a mess before, but now it's even worse xD
That means it's time to refactor it all. And use it as a chance to prepare for enemies also swinging at me.
The plan so far is to have a state machine. I for now had a base set up for the enemies with only "idle" and "flee" state. The player is just reacting to inputs directly without any sort of state at the moment, so I need to make a shared system that will work for both.
Player needs states for "idle", "move", "swing item", but I also animated a second swing in case you try to combo them (but have not implemented it).
My initial idea is to link the states to animations, since there should be a visual indicator for each and every state a character has, and duration of states should match the animation length. I would still need to manually code each type of state and how they transition, but not all characters will support all states, so I will treat it in a way that if an animation doesn't exist for the state, it is not possible for character to be in it.
It seems like most states can transition into most other states. Some are initiated by the characters AI/player and some are reactions to outside effects (like damage).
Changing a state should be the only way to change data on the character (or those around the character), and states may change themselves based on certain data on the character (which type of item interaction needs to play depending on what item is held, for example). This will ensure that every change has a visual feedback uniquely linked to the state.
That's the plan for now, we will prototype it soon and see how it goes.
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.
Nice work so far, just don't stress out on graphics yet.
I won't stress on the quality of them, but I need to stress out about building in animation support into the flow of the game. Telegraphing actions and communicating what is going on clearly is a core pillar of the game.
Yeah not saying they aren't important entirely as you still need to at least get your base idea down before you beautify everything.