NOTE (14 AUG 2010): ROAR Engine is now known as GORE – Graphical Object-Oriented Roguelike Engine. See this post for clarification.
Writing the scene class for scalability is really a massive task. Here’s what I wanted to accomplish: I wanted to put all rendering code in the engine so that the implementor (the roguelike game itself) does not need to touch ANY rendering code at all. All the implementor needs to do is to manipulate logical entities, rather than physical ones.
To achieve this, I’ve separated the rendering code from Entity to Renderable. For example, all offset coordinates and pixel coordinates are moved into Renderable, while map coordinates are left untouched in Entity. Surfaces are moved into Renderables, as well as animation data too. So in essence, the Scene object holds two arrays: an array of Renderables as well as an array of Entities.
The scene also automates several things, like rendering the fog of war. With the power of OO, the implementor can easily override the fog of war rendering method, and implement a more specialized render algorithm for it.
Much has to be done on the scene class before I can move all my old code into InfestedRL’s implementation directory to test things out.