One thing I realized at a very early stage is the importance of using a Texture Atlas or Sprite Sheet compared to individual images. If you haven’t yet, I recommend doing it now and realizing the benefits later.
Every sometime you might get into a situation with your design pattern, that you might have this inevitable desire to use a Singleton class, or maybe you are coming from C++ background and are much used to it.
I’ve been curious about diving into some real Graphics stuff, as far as I remember from last few years. And because I didn’t get any related education at my college or from anyone I knew, I just had to somehow rely on my destiny and the Internet, or both.
Few days back I wrote something about the Making singleton class secure.
Its my personal experience, avoid Singleton approach as far as possible in the sense you avoid Pointers and class destructors and switch to Java from c++.
But, while I say this every now and then I feel that uncontrollable surge to put all the code in a singleton class and put up all sort of factories in there.
There comes a time for a project, when you can’t resist using a Singleton class, for things that can’t be afforded to duplicate.
Say, for example I’m creating a World class and I want only a single world to exist in my entire project. So, next time anyone is referring to World, he’s referring to this: