mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.1K
active users

🕹️Hamrath🕹️

I replaced my messy if/then/switch spaghetti code with a . What a big improvement in readability! Now I want to turn everything in my game into FSMs.

@hamrath that’s a nice turn! I am in love with FSM for quite some time. Surprised it’s not everywhere by now 😅

@glukozavr My code got worse every time I added a new feature. In the end I mixed up winning conditions, player states, tutorial mode, camera, etc. and began to search in files for variables and functions I couldn't find anymore. 😅

Now that I understand them, FSMs seem to be a viable option to get rid of this mess. And now that I understand how they work I'll add them not only to the player. Even my level manager could be improved with a FSM.

@hamrath yes, it gives the structure to the code that finally is readable and much more manageable when without it 😁