Original Post
🔒 Locked
Game Singleton?
Advertisement
If you desire an OO concept, encapsulation should be applied wherever possible. This also seperates the game code from the system code. I prefer to split the game into several gamestates (intro, menu, game, ...) which are managed by a gamemanager class which I usually implement as a Singleton. But finally, the right approach depends on the size of your project. If you are going to write a simple number guessing console game, it probably wouldn''t be worth the effort.
Regards
Matt
Lead programmer at sechsta sinn - http://www.sechsta-sinn.com - mailto:matthias@sechsta-sinn.com
Regards
Matt
Lead programmer at sechsta sinn - http://www.sechsta-sinn.com - mailto:matthias@sechsta-sinn.com
i see no point in the singleton. just create it in the main function, and done.
"take a look around" - limp bizkit
www.google.com
"take a look around" - limp bizkit
www.google.com
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement