Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

This question already has an answer here:

Just as the title states, whats the best way to expose current settings like resolution to my classes? (I know this might have been asked, but I couldn't find anything)

I was thinking of the service-locator design pattern, but I am unsure, as I read that it can be abused easily.( I mean it might not fit this particular use-case )

share|improve this question
    
Comedy "just make them global" option. –  Tetrad Jul 26 '13 at 16:56
    
You're right, I guess I am just complicating things. Please post that as an answer(perhaps with more reasoning) and I'll accept it. –  akaltar Jul 26 '13 at 17:04
3  
I bet a search on Stackoverflow would answer this, since it's not specifically gamedev related. –  Byte56 Jul 26 '13 at 17:25
add comment

marked as duplicate by BlueRaja - Danny Pflughoeft, Sean Middleditch, Laurent Couvidou, Seth Battin, Nicol Bolas Jul 29 '13 at 3:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 9 down vote accepted

Just make them global until you determine that it's a detriment to your system.

Read this: http://c2.com/cgi/wiki?DoTheSimplestThingThatCouldPossiblyWork

Don't add complexity unless you're getting some benefit out of it.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.