Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411604 Posts in 69388 Topics- by 58445 Members - Latest Member: gravitygat

May 08, 2024, 02:33:03 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Level Changing (C++)
Pages: [1]
Print
Author Topic: Level Changing (C++)  (Read 1567 times)
TheSpaceMan
Level 1
*



View Profile WWW
« on: March 21, 2009, 04:17:31 AM »

I have reached a point in my game where level changing is once again in focus.

I could load my levels at start up, but loading them also include the fact that the physical geomatry is loaded, and collideable. It could work if i added every level to a different layer, but that creates problems with other things.

I am now considering loading every level on level change instead, adding a overhead on level changing but loosing the memory overhead and collision problem.

I am currently workign with ogre so adding removing models for a level is as simple as detach/add that node. The physics is not as simple. How do you guys do it?
« Last Edit: March 31, 2009, 04:38:49 PM by Derek » Logged

Follow The Flying Thing, my current project.
http://forums.tigsource.com/index.php?topic=24421.0
Flink
Level 1
*


Visiontrick


View Profile WWW
« Reply #1 on: March 21, 2009, 05:05:00 AM »

We had the same thoughts with our eniteties in our editor to Boingo. We wanted to place the entities and create all data except for the physics data. So we had a generate_physics function in each enitity which were called when you generated the level instead of when the entity was created. This solution should work for you. Beer!
Logged

Mikademus
Level 10
*****


The Magical Owl


View Profile
« Reply #2 on: March 21, 2009, 06:18:26 AM »

What about a queue? Do the fast stuff, and place all entities that needs physics in a queue and add one per frame or something do distribute the load and overhead. 
Logged

\\\"There\\\'s a tendency among the press to attribute the creation of a game to a single person,\\\" says Warren Spector, creator of Thief and Deus Ex. --IGN<br />My compilation of game engines for indies
TheSpaceMan
Level 1
*



View Profile WWW
« Reply #3 on: March 24, 2009, 11:16:46 AM »

I gave up overplaning it, each level is reloaded completly, all resources freed and recreated.
Logged

Follow The Flying Thing, my current project.
http://forums.tigsource.com/index.php?topic=24421.0
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic