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
snowblind
Gnoblar
Posts: 14
Joined: Tue Jan 25, 2005 5:51 am
Contact:

wrapping my head around gamestates

Post by snowblind » Tue Jan 25, 2005 5:54 am

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!
0 x

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

Post by Banania » Tue Jan 25, 2005 11:14 am

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.
0 x
Banania

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

Post by Robomaniac » Tue Jan 25, 2005 1:56 pm

0 x
phear hingo

My Webpage

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

Post by psyclonist » Tue Jan 25, 2005 9:13 pm

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).

-psy
0 x

Post Reply