Hacker News new | ask | show | jobs
by bsder 3037 days ago
The word "protocol" is a big red flag that you should be using a state machine.

The words "event loop" probably mean you need a state machine.

If "time" is an input variable, you probably have a state machine.

2 comments

I've also found the presence of a mode variable a good indicator that a FSM should at least be considered.
Your second and third points are why I love having state machines in the games I develop.