The renderer should be fed a scene object which is actually what controls what's being rendered. We'll probably only have one scene type (a level), but possibly will have multiple scenes (multiple levels).
Scenes could be used for Menus, Levels, Credits, etc. Anything where the context is completely different for the renderer.
A level scene will be responsible for rendering hud elements, the background, and level entitites.
class Renderer {
draw() {
preDraw()
currentScene.draw();
postDraw();
}
}
We'll probably have to move some of the stuff that's currently in renderer into the scene object, like scaling the units to be 20 high. This way units n' stuff are specific to a scene type and not universal.
Closing this in favor of #6. We don't need a generic scene object until we have multiple types of scenes. I'm not even sure what they would share besides the draw function.
The renderer should be fed a scene object which is actually what controls what's being rendered. We'll probably only have one scene type (a level), but possibly will have multiple scenes (multiple levels).
Scenes could be used for Menus, Levels, Credits, etc. Anything where the context is completely different for the renderer.
A level scene will be responsible for rendering hud elements, the background, and level entitites.
We'll probably have to move some of the stuff that's currently in renderer into the scene object, like scaling the units to be 20 high. This way units n' stuff are specific to a scene type and not universal.