Home Artists Posts Import Register

Content

Just a video discussing recent additions. Still need to iron out a few bugs and try some further improvements I have in mind.

This system was built alongside Victor so it took a lot of time to refine as new features were added. That said, occasionally I would go to implement a new action and find it only took a few minutes thanks to my previous efforts, this is ultimate aim, ensuring that actions can be created or tweaked as quickly as possible.

While it looks good at the moment, I'm hesitant to declare this system a success until I build another character with it. Most of their actions should take far less time to implement now - hopefully just minutes - but they will probably also reveal some holes that Victor didn't expose, necessitating further refinement. I'm thinking that will be the next step before I move on to something else.

Files

State Machine Work in Progress

Still some issues to work through but in a pretty good place right now. Might implement another character with it to put it through its paces.

Comments

Anonymous

Great progress Matthew. I wonder have you looked into Hierarchical Finite State Machines? It's just another layer of abstraction which slightly complicates the initial setup but greatly reduces the time spent implementing functions that work across different states. It works on class inheritance. So "Walking", "Crouching, "Running" all inherit from "Grounded"; "Jumping", "Air Attack" etc inherit from "InAir". Might not be necessary for your project or you may already be using it, not sure exactly how yours is working behind the scenes. But I'm working on my first game now and using an HSM for my player has made prototyping new actions heaps easier. So now if I need to check if the player is grounded I can just run a check for the flag that's set while in a substate of Grounded, instead of checking for each grounded State. And if I want functionality shared across all substates of Grounded I can just implement the new function in Grounded, rather than having to implement it in each grounded State. That's wordy but hopefully you catch my drift. So yeah if you're just making a ClassicVania this might not be necessary but in my game for instance I just added attack functionality that changes the attack type based on whether the attack was issued while standing/walking, crouching, or running. I only had to add it in the GroundedState class and it magically worked in whatever substate I called it from.

Anonymous

Oh and if your FSM is currently all in one function/class you might not have Enter, Update and Exit loops for each state. This has also been invaluable, keeping everything easily organized.

David

This was a pleasant surprise, was nice to hear your commentary on something again. I wish you luck with your future projects