wrapping my head around gamestates

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Posts: 14
Joined: Tue Jan 25, 2005 5:51 am

wrapping my head around gamestates

Post by snowblind »

Ogre newbie here.

I've coded game engines before, but I'm trying to figure out how to build one around Ogre now :) Basically I'm going to go with the "stack of gamestates" idea.

Should each game state have it's own...

a) Root node
b) Scene Manager
c) Or something even higher level...maybe each state clears the scene manager when it comes into scope?

Also, are frame listeners the best way to implement a game logic loop? All the examples use them. Can I call a draw method on the Root node and work with Ogre that way? That way I could do my whole own timing/game logic loop thing with less hassle.

Any suggestions are appreciated :) Thanks!

User avatar
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

You are not forced to use the framework provided with the samples. It is provided only because it is convenient to quickly have something working.
But you can write your own game loop if you need to.

User avatar
Posts: 508
Joined: Tue Feb 03, 2004 6:39 am

Post by Robomaniac »

phear hingo

My Webpage

User avatar
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1

Post by psyclonist »

snowblind: We use a custom loop and make calls to OGRE (renderOneFrame() or sth similar) when we need to render... well, a frame. The rest is ours. For code, have a look at YAKE. But I'm sure it'll be easier to just search the forums for similar keywords (renderOneFrame, custom render loop, ...) as this question came up a few times already (and has been answered, too).


Post Reply