LoL Main Loop
Revision as of 22:41, 23 October 2007 by SteveBaker (New page: The '''LoL Main Loop''' performs the following tasks in order: ; updateClock : gameClock performs any actions needed to update the games' sense of time. ; updateEv...)
The LoL Main Loop performs the following tasks in order:
- gameClock performs any actions needed to update the games' sense of time.
- Sends out any events that are generated internally to the game from peripheral inputs and timing.
- Provides setup for the updates to class ScriptObject. ScriptObject is a derived class of BasicObject, and all BasicObject entities are actually updated in updatedObjects() (see below). Because of that, this routine only has to take any global actions common to all ScriptObjects. Currently, it simply passes the frame duration for the preceeding frame into ScriptObject::setFrameTime()
- Loops around calling the update() member function for all known class BasicObject entities (and their derivations such as ScriptObject).
- BasicObject update ()
- Updates a basic object (this is currently a 'do nothing' function).
- ScriptObject update ()
- Updates an object that has a script attached to it. Swaps the double-buffered event list for the object such that events created since the last call to this object become current, then for each activated event it calls the appropriate Java Plugin event handler.
- The Java plugin code should by now have updated the parameters of the camera(s) as necessary. This code (which is in gameCamera) loops through each of the cameras in turn calling the update function for that camera - which deals with camera tracking and motion - and finally updates the PLIB ssgContext to reflect the new camera position.
- Does any routine updates to the database. Currently it calls the update function for the material list which causes moving textures to be repositioned according to the elapsed time.
- gameSky updates the sun position.
- gameParticleManager updates the particle systems, creating and destroying particles as needed.
- Applies the current camera, clears the screen, pre-draws the sky, calls PLIB's ssgCullAndDraw() to render the scene, calls drawParticles to draw the particle systems - then, finally, post-draws the sky.
- gameScreen calls the current screen's update function which calls PLIB's pwSwapBuffers() function to swap the double-buffered OpenGL rendering context.
|Wikiid Pages relating to Lemur of Lima (edit)|
|Lemur of Lima - Main page|
|Lemur of Lima - Controls|
|Lemur of Lima - Levels :|
|Lemur of Lima - Java Plugins :|
|Lemur of Lima - Source Code Documentation :|
|Wikiid Pages relating to gameTools (edit)|
|gameTools - Main page|
|gameTools - Support Tools :|
|gameTools - File Formats :|
| gameTools - Source Code :