Handling different game modes?

Started by
0 comments, last by lucem 18 years, 2 months ago
I’ve finished my basic pong clone but now I want to add some variation and add separate “gamemodes” it. So there would be basic pong, pong with power ups and whatever else I mange to think of. What I’m trying to decide what is a good way of handling all of these different modes. I could use a big switch statement or I could even load each from a dll and have each one respond to one Update() function (as I plan on having the actual engine is separate from the “game”), How do these sound or do you know of a better solution? Thanks!”
Advertisement
Well, this refers to the term of "game state".
Just think about having a game loop for each game state, and switching game states becomes simply ending one loop and starting up another.

This can be done in several ways, like with function pointers, derived classes, a decorator pattern...
Using your brain doesn't hurt at all.

This topic is closed to new replies.

Advertisement