I was browsing the recent threads yesterday, when I saw a "Rate my Engine" thread or something along those lines. The OP mentioned that he/she was using singletons. Everybody on gamedev hates singletons from what I understand by reading the replies. My engine makes extensive use of singletons. I figured it would make coding easier, but I understand that it is bad practice, and a hallmark of poor design. So I decided that I should rewrite it, even though it is in a fairly complete state. I decided that I should put everything in a base engine class. So here is what I came up with for the base engine class:
class Engine{
public:
Engine();
~Engine();
File_System file_system; //provides access to file system, loads/frees game resources
Renderer renderer; //abstract graphics rendering interface
Physics_Manager physics_manager; //keeps track of game physics
Script_Manager script_manager; //manages scripts and their types and methods
Entity_Manager entity_manager; //keeps track, updates, draws, etc... of all game entities
};
The entity class would have access to the full engine class, but the Renderer, Physics_Manager, Script_Manager, and Entity_Manager classes would not have access to the full engine class or access to each other.
My old engine did stuff like this:
Entity_Manager* entman = Entity_Manager::Instance();
Game_Map* game_map = Game_Map::Instance();
//etc...
It is very easy to code with.
So my question is: Is it worth it to rewrite the engine just because singletons are considered poor design, or is it too much trouble? Is the preliminary design for a reworked engine valid or worthwhile to pursue?