Sunday, 23 March 2014

Look at the State of Ye!

Here we see the power of the state machine pattern. It takes a bit of time and effort to get set up, but once in place it is extremely clean, flexible, extensible, and easy to debug.

Everything is a state machine (well, almost). The player, his brain, the match, the team... all state machines.

Here is a vid of the game automatically going through the start phase of the match -

- state enter pitch
- state lineup
- state kickoff
- state play

we now have the framework in place to start giving the player AI some real goals and objectives, and hopefully get something resembling a real match. Onward!

No comments:

Post a Comment