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 )

  • \$\begingroup\$ Comedy "just make them global" option. \$\endgroup\$
    – Tetrad
    Commented Jul 26, 2013 at 16:56
  • \$\begingroup\$ 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. \$\endgroup\$
    – akaltar
    Commented Jul 26, 2013 at 17:04
  • 3
    \$\begingroup\$ I bet a search on Stackoverflow would answer this, since it's not specifically gamedev related. \$\endgroup\$
    – House
    Commented Jul 26, 2013 at 17:25

1 Answer 1


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.

  • \$\begingroup\$ This, 100x over. Also, viva c2.com. \$\endgroup\$
    – Engineer
    Commented Nov 3, 2015 at 21:28

Not the answer you're looking for? Browse other questions tagged .