LoL Main Loop

From Wikiid
Jump to: navigation, search

The LoL Main Loop performs the following tasks in order:

updateClock 
gameClock performs any actions needed to update the games' sense of time.
updateEvents 
Sends out any events that are generated internally to the game from peripheral inputs and timing.
updateScriptObjects 
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()
updateObjects 
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.
updateCamera 
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.
updateDatabase 
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.
updateSky 
gameSky updates the sun position.
updateParticles 
gameParticleManager updates the particle systems, creating and destroying particles as needed.
updateGraphics 
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.
updateScreen 
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 :
List of Levels, Level design, Screen shots, Models
Lemur of Lima - Java Plugins :
Java plugin API, Event handling, Flags, GameInterface API , Alphabetical Index
Lemur of Lima - Source Code Documentation :
Initialisation, Main Loop, gameTools


Wikiid Pages relating to gameTools (edit)
gameTools - Main page
gameTools - Support Tools :
plb_to_ac3d, mklevel, mktile, mktree, tiled, autogen_java, mk3dgallery
gameTools - File Formats :
title_screen.rgb, ultimate.xml, material.xml, decoration.xml, physics.xml
tiled.xml, tiled_autotiles.xml, Level files, Tile naming scheme, PLB files
gameTools - Source Code :
Game functions: gameCamera, gameClock, gameChecksum/gameHashTable, gameHTTP,
gameIsect, gameJoystick, gameParticleManager, gameScreen/gameMouse,
gameSky, gameStarter, gameStrokeFont, gameUtils
Material database: MatList/MatEntry
Tile map handling: TileObject/MapFlag/MapEntry/Map
Java Interfacing: JavaLink
Image file loading: liImage/liImageFactory
3D Model file loading: loadPLB, PLB exporter
Physics: Sabot, Bullet, gameTools - Use with Blender, PLB exporter
Object management: Object