http://gameprogrammingpatterns.com/singleton.html
It basically says you should only use singletons on very rare occasions..
In the game I'm currently creating I have a bunch of singletons, for example i have a Box2DManager, CameraManager, InterfaceManager, MouseManager, KeyboardManager, MapManager, ProjectileManager, ResourceManager, TimeManager. Am i being too liberal with these singletons? Should i be passing these as parameters?
For example i can just do this.
Code: Select all
#include "MapManager"
#include "ResourceManager"
MapMgr->getMap()->addEntity(ResourceMgr->createEntity("box");