I have thought a little bit about a Level splitting System. With this i mean a system, that splits a big level into different rooms or parts (think of a Zelda temple) and only loads, calculates (Physics) and renders parts of that level. My idea goes as follows: Im using Ogitor to create all the different rooms in one .scene file. Every one of those rooms then gets a a hull that includes all parts of the room in the form of a box. I thought about using editable meshes for that. So when the Level loads, the .scene Files is loaded, but not the meshes. So as soon as the Player steps into a room, the Rooms meshes and assets, (which schould already be loaded at this point because:) and all of its neighbour rooms' meshes and assets are loaded in the background and rendered (So you can still see into the next room) and all the ones not neighbouring the current rooms m. and a. are unloaded.
That means, even though the entire level is always in the memory (NPC states, health of enemys, picked up Items) are always present inside the momory, the memory usage stays relatively small.
Its a pretty simple System in my opinion and the only Problems i can think of is rendering the whole Level in Ogitor (i probably would have to work with visgroups), and slow Systems, that can't load the assets fast enough. And as far as i know, Ogre even supports backgroundloading natively.
So the point of this post is to hear the opinion of experts before i start implementing the System. maybe you guys have some concerns about it or ideas for improvement.
I wasn't sure in which Forum to post this, so im sorry if this is the wrong one.
Orge Level spliting System
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
- areay
- Bugbear
- Posts: 819
- Joined: Wed May 05, 2010 4:59 am
- Location: Auckland, NZ
- x 69
Re: Orge Level spliting System
Take a look at this http://www.ogre3d.org/tikiwiki/Portal+C ... ne+Manager sounds right up your alley
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Orge Level spliting System
Ok, i'll have a look at it.
I don't think i can use it, unfortunately. I'm using bullet for character movement and other objects. And bullet doesn't have a Portal functionality yet, so i don't think, that this is gonna work.
But yeah, it seams similar to my System in some way, but there was no mention about render and load functionality.
I don't think i can use it, unfortunately. I'm using bullet for character movement and other objects. And bullet doesn't have a Portal functionality yet, so i don't think, that this is gonna work.
But yeah, it seams similar to my System in some way, but there was no mention about render and load functionality.
- tod
- Troll
- Posts: 1394
- Joined: Wed Aug 02, 2006 9:41 am
- Location: Bucharest
- x 94
- Contact:
Re: Orge Level spliting System
You will not find something that exactly suits your needs, that's for sure. I didn't work with the portal scene manager, but it will probably have some zone load callbacks, or something similar where you can load your other (not graphical) data. In any case you will have to implement something similar in the end.
While I don't use Bullet (i use Newton), it should be possible to have multiple physics worlds. I tried this once, and it worked great. Basically when an object existed one physical world, you determine the world in which it will enter and create a new body for it in that world, taking care to set the same forces, velocity, rotation as in the previous world. For me this transition was seamless.
While I don't use Bullet (i use Newton), it should be possible to have multiple physics worlds. I tried this once, and it worked great. Basically when an object existed one physical world, you determine the world in which it will enter and create a new body for it in that world, taking care to set the same forces, velocity, rotation as in the previous world. For me this transition was seamless.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Orge Level spliting System
OK, thanks. I think i'll toy around with it a little, and maybe i even accidentally develop Portal 3 . But the post wasn't actaully about Scene-Managers, since i have looked at all of them already and i don't really think that i need a portal system, but i just wanted to make sure, that my system can work in my original way.
But anyway, i am really think about using it now, before i just didn't think, that i coudl work with bullet.. It could end up in some really fun puzzles. So thanks for the hint.
But i have some concerns about it anyway:
if the portal System should work like in Portal for (the only) example.
then the body would, as soon as he entered the Portal, be in the 2 Zones at once (with one physical body for each Zone). Then, in both Zones, the body would go partially in a wall, which bullet would automaticly resolve, which would lead to the box in the other zone to get behind its portal.
Heres a Picture of that:
The Zone above is the desired result, below the actual result.
But anyway, i am really think about using it now, before i just didn't think, that i coudl work with bullet.. It could end up in some really fun puzzles. So thanks for the hint.
But i have some concerns about it anyway:
if the portal System should work like in Portal for (the only) example.
then the body would, as soon as he entered the Portal, be in the 2 Zones at once (with one physical body for each Zone). Then, in both Zones, the body would go partially in a wall, which bullet would automaticly resolve, which would lead to the box in the other zone to get behind its portal.
Heres a Picture of that:
The Zone above is the desired result, below the actual result.
- Attachments
-
- Portal System
- Unbenannt.png (7.94 KiB) Viewed 768 times
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Orge Level spliting System
There is even an Ogitor plugin for zone creation flying around. Check the list of known 3-rd party plugins in the Ogitor wiki.areay wrote:Take a look at this http://www.ogre3d.org/tikiwiki/Portal+C ... ne+Manager sounds right up your alley
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Orge Level spliting System
Nice. I'll give it a shot and see how it works.
- tod
- Troll
- Posts: 1394
- Joined: Wed Aug 02, 2006 9:41 am
- Location: Bucharest
- x 94
- Contact:
Re: Orge Level spliting System
I think the condition for the body to be in one zone should be related to the body's "center" point position. So you cannot have 2 bodies for the same object at once, in 2 zones. (Some extreme cases may exist, and may need to be worked around, like a body moving back and forth between zones. But I think this could be alleviated by clever game design, i.e. keeping the transition zones empty to minimize the problem.)
Anyhow, I may be wrong, but I don't see the "portal system" as being the Portal game. I mostly see it as a method to transition between zones, with some overlap. Like a cave in the terrain. At some point you have the terrain, then you gen near the cave, you also load the cave, then you enter the cave and have both, but if you go further the terrain gets unloaded, and maybe some other zone in the cave gets loaded.
Anyhow, I may be wrong, but I don't see the "portal system" as being the Portal game. I mostly see it as a method to transition between zones, with some overlap. Like a cave in the terrain. At some point you have the terrain, then you gen near the cave, you also load the cave, then you enter the cave and have both, but if you go further the terrain gets unloaded, and maybe some other zone in the cave gets loaded.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Orge Level spliting System
OK, then i think, i missunderstood that. But yeah if its pretty much the same System as mine, i think i'll just use the Ogitor Plugin to edit the levels, but handle the zones myself.
Thx for your help.
Thx for your help.