The Union of States

In programming, especially in game dev, states are an important concept to manage what’s going on at any given time and what to do next. So we need a finite state machine or ‘FSM’ to manage such things. Basically the state is a data object that can only ever have one value from a finite list of values.

Following the excellent tutorial from Aleksandr Hovhannisyan I’ve made a simple FSM to model a light with three luminosity intensities.

A model of the Light’s logic. Made using plugin on my nextcloud server. If you want help setting up a Nextcloud server of your own for personal or enterprise use, contact me at Oak City IT

Next steps will be to adapt this to a game, and in particular the Graveyard Shift game I’m working on right now. Here’s a preview of the model that will be setup in the code:

Leave a Reply

Your email address will not be published. Required fields are marked *