How to create levels in a game?

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
hvalola
Kobold
Posts: 36
Joined: Mon Mar 15, 2010 9:19 am

How to create levels in a game?

Post by hvalola »

HI guys
I have developed 3 scenes using ogre and I want to load them as game levels.
what i currently do is just hide the current scene and unhide the relevant scene for a given input.
what is the proper mechanism to implement this?


also i use hydrax and skyx for my game and can i have a separate thread for rendering skyx and hydrax
If so how to implement that?

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: How to create levels ina game?

Post by Klaim »

It is not clear what you are asking exactly. Do you want to load levels with a loading screen? Or do you want to load levels progressively? Or are you looking for a way to unload levels so that you can load other levels afterward?

hvalola
Kobold
Posts: 36
Joined: Mon Mar 15, 2010 9:19 am

Re: How to create levels ina game?

Post by hvalola »

hi thanks for reply
I want to unload my current scene and load a new scene after what should i do

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: How to create levels ina game?

Post by Klaim »

Ok, but what did you not understand exactly? The code to load a scene should be basically the opposite of the one to undload. So if you have code to load a scene, just try the opposite functions (at least in Ogre interface).

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 134

Re: How to create levels ina game?

Post by c6burns »

Can't you use SceneManager::clearScene to blast everything away super easily, as well? I'm still in the early stages of my project so I haven't done level unload/reload

hvalola
Kobold
Posts: 36
Joined: Mon Mar 15, 2010 9:19 am

Re: How to create levels ina game?

Post by hvalola »

thanks guys


If I unload the complete scene the next level need to build from scratch at run time I want to reuse some of my previously used elements including sky and water.

If i create a complete scene in run time will not it effect to the frame rate with all those linking(objects creation)?

what kind of game architecture should i fallow when i create a multilevel game and extend it to a multiplayer game?

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 134

Re: How to create levels in a game?

Post by c6burns »

So then just keep track of everything you put into the scene and unload what you don't want.

You need to load the level while maintaining the frame rate? That's like advanced sleight of hand. No one can explain how to perform advanced sleight of hand in a few forum posts. You need to work on that stuff and build a more complete understanding. I'd start with just a loading screen and move on from there.

What kind of game architecture? One that works within your performance specs and does what you need on all the platforms on which you will deploy. It's called the "shitload of planning, coding and testing pattern" :D

hvalola
Kobold
Posts: 36
Joined: Mon Mar 15, 2010 9:19 am

Re: How to create levels in a game?

Post by hvalola »

That's true learn by hard way :D

Is there a way to add more than one thread to do rendering part?
i mean other than framelistener eg Hydrax on one thread and other objects in a separate thread

Post Reply