eTek World Forums
A community for developers that want to learn and share ideas!

Home » Game Development » Game Programming » Global values (Can a game be created without using any globals?)
Global values [message #10] Thu, 12 February 2015 08:35
lede is currently offline  lede
Messages: 52
Registered: February 2015

Can a game be developed without using any global variables?

I've been thinking about this question for a couple of days now and I can't think of a way to build a game without ever using a global scoped variable. I think this question arises from the fact that the pattern of design book I'm reading hates using singleton classes which is just a way of making a class have and all its values globally available.

Yes I'm very guilty of using singleton because of their ease of use and the fact you only new a few lines of code to make them work. I'm not sure if I'm upset at the other for bashing my favorite pattern or the fact that he is right and I need to start really learning more about patterns of design.

So now that I've ranted a little its time to get a good discussion going and see if we can come up with a decent design solution!
Next Topic: [Book] Game Programming Patterns
Goto Forum:

Current Time: Mon Mar 19 01:52:17 PDT 2018

Total time taken to generate the page: 0.01199 seconds