Skip to main content

History: Coding and Design philosophy

Preview of version: 1

Coding/Design philosophy
- A 'quick' guide to some design issues. What to use when. Please contribute!

Class inheritence


Custom objects
- Use 'Movable Object Factories' when creating reusable custom objects. eg Particle systems, water meshes (eg current water demo would be nice to rewrite as a movable)

  • this allows easy creation and management in Ogre
  • easy to modularise and reuse
  • please wiki any nice custom objects! 😊


Scene managers
- Write a custom scene manager when you require unique scene management.

  • eg existing BSP, Octree culling managers
  • custom SM's are rarely needed. Octree is a good default for alot of cases.
  • multiple scenemanagers can't be run in the same scene (eg terrain and bsp)


Scene definition
- Or level/scene design

  • common solution is the [[dotScene]] xml format (search wiki)
  • most modellers can export whole scenes to this format, while also exporting the actual meshes
  • example dotScene implementations are in 'ogreAddons' in CVS


Main loop/Initialisation

  • You don't need to use FrameListeners for updating every frame. You can call the render loop manually from a 'normal' while loop if you like.
  • You don't need to use ExampleApplication like all the demos use. This either helps or hinders new people. See these examples for alternatives and a clear understanding of what ogre needs to initialise.

http://www.ogre3d.org/wiki/index.php/MinimalApplication Nice clean example. Uses Framelisteners for render updates

http://www.ogre3d.org/phpBB2/viewtopic.php?t=12999&highlight=exampleapp 'Hello World' example

http://ogre3d.org/wiki/index.php/Newbie_Tutorial_2 Manual render loop example (windows only)

http://code.adaptableit.com/code/solar/ Replacement ExampleApp to inherit new apps from

http://www.yake.org A complete framework tying alot of libraries together


Alias: Coding&Design philosophy

History

Information Version
Tue 06 of Jul, 2010 09:34 GMT-0000 manski fixed link to dotScene page 7
Fri 25 of Jun, 2010 19:56 GMT-0000 rafa.gdev 6
Sun 03 of Jan, 2010 01:09 GMT-0000 jacmoe 5
Tue 29 of Dec, 2009 04:40 GMT-0000 jacmoe 4
Tue 29 of Dec, 2009 04:40 GMT-0000 jacmoe 3
Tue 29 of Dec, 2009 04:39 GMT-0000 jacmoe 2
Tue 29 of Dec, 2009 04:34 GMT-0000 jacmoe 1