Jump to content

April 2017 »

23242526 27 2829

Recent Comments

View more

True, False, Maybe

4: Adsense

State Machines in Games – Part 6

Okay, this is the wrap-up.I was planning on part 6 adding to the pet game having them loop back to the individual pet in determining the interest, and part 7 adding inventory items, a plot, and otherwise finishing off the dungeon explorer.Then I realized --- it doesn't add anything new to the series. They are just new machines that replicate the behaviors...

State Machines in Games – Part 3

In Part 1  we learned what state machines are and we also hard-coded a simple state machine using a switch statement.In Part 2  we made a simple state machine interface and a generic state machine runner. We also created one boring state machine instance.Now in Part 3 we are going to actually make a game. It isn't much of a game, but it has all the elemen...

State Machines in Games – Part 2

We completed Part 1 with a simple boring hard-coded state machine, implemented by a switch statement .It didn’t do much. In textbooks that would be called “an exercise for the reader.”In this entry (Part 2) we're going to prepare the rest of the way for our game. Since I know in advance where I am leading you, I'll tell you that we need a bunch of state m...

State Machines in Games – Part 1

I recently had a conversation with a beginner on GameDev.net about the importance of state machines.Most of the beginners on the site are teenagers enrolled in secondary school. Often they pick up concepts here and there over the Internet when they think it will help, but don’t take the time to learn topics that don’t seem interesting.State machines. Bah!...