Alex Profile picture
Perpetually tired. 22 Years of coding: ask me questions if you need a hand! Gaming. Photography. Ramen. #csharp #powerbi #pixelart #gamedev #unity3d
Feb 23, 2022 22 tweets 6 min read
A few people have asked me about final state machines.

Is an FMS just a bunch of IF statements? Why did I switch? HOW did I switch?

Here are some thoughts. Bring coffee.

First, what was my problem and why did I use an FSM to fix it? #gamedev #architecture #tutorial #howto 2/ In the beginning...

Update() on my original player controller started as 2 ideas:

1) Always apply forward movement
2) If the screen is touched and I'm on the ground then Jump()