Categories: General
Posted by
pieterg on
11/10/2005 10:05 PM |
Comments (4)
So far I have tried to assemble piece on piece the engine layout and this is what I came up with so far. The resource and entity managers are prototyped and are doing some pretty basic stuff. As my previous post mentioned the resource manager will contain resources only and manage the loading of them and passing them to an assembly line where they will be used to construct entities.
Right now let s step through what I have.
GameThe game object will manage attaching the appropriate delegates. The window is a simple form that will act as our display mechanism. We have an application idle event that will be our looping structure where we check the messages and act accordingly. This gets hook to the application s idle event.
XilathWindow window = new XilathWindow(800, 600, "Xilath"); //Create a new control to render to
Application.Idle += new EventHandler(window.OnApplicationIdle); //Hook the application idle delegate
Application.Run(window);
//Run the application
EngineThe engine acts as the driving force and overseer. It manages the managers (heh...) and makes the needed init calls. It contains 5 methods namely the constructor, update, pre-render, render and post-render. The constructor inits the managers and needed resources. The update method updates entities in the current entity list. Processing of the entities and sending the list to the appropriate managers like the physics manager and more. The Pre-Render method then takes the updated entity list and batches and sorts it so that they can be passed to the renderer in the rendering stage to be rendered. That s at a macro level what happens.
The RendererThis is probably the most exciting part out of everything. It renders the renderable entities in the game. It will later include shaders and other cool parts but for now it s rendering entities and manages the rendering device.
That s it for now...
3404639f-80c6-42c4-a549-be79be6501f9|0|.0