Design Q: Dividing to Wold <-> Zone <-> Scene et

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Design Q: Dividing to Wold <-> Zone <-> Scene et

Post by MasterGod »

I'm searching for a way, design-wise, to separate a game level-world to "zones".
I'm just asking for your opinions so while I'm googling what I need you can post your thoughts.

Thanks.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I'd say it's completely dependent on the world...

A world comprising of a series of interconnected caves would be easy to split up into sections really as there's a lot of occlusion going on so you wouldn't have to have everything loaded/rendered at once.

A large open world would be rather different and would need to be split up differently i guess.
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Thank you, for posting this thread.

I've been wrestling with this tricky problem since I started making the gameworld, wherein a player can transition from indoor to outdoor seamlessly.

The word seamless is the toughest part to implement.

Currently, I'm trying to bring polygon count down so I can make a larger world. Then use more textures (bumpmaps, etc) to offset polygon count.
Image
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Well its pretty simple and already implemented in some engines like C4. Just have the user define a set of bounding boxes to what they would like to be considered a room. Then just have them set a level for how much they would like to be rendered. e.g. ERL_ROOM, ERL_CONNECTED, ERL_DOUBLE_CONNECTED

or something like that. For ERL_ROOM you would just render all scene nodes that are inside the bounding box that the 'hero' is in (an arbituary number that could be used to represent the camera, or whatever, set by the user). For ERL_CONNECTED you would just step through and render all the rooms that are connected to the room that the 'hero' is in. For ERL_DOUBLE_CONNECTED you step through all connected rooms, and all the rooms connected to those connected rooms. :wink:

Now of course this would lead to some minimal variable management such as a list of the following:

* Room bounding boxes with an id
* Arbituary 'hero' position
* List of connection_indices for every bounding box

So basically it would be something like this for a level:

----- -----
| 1 |<->| 2 |
----- -----
^
|
V
-----
| 3 |
-----

Bounding box 1 has connection_indices of 2, 3
Bounding box 2 and 3 have connection_indices of 1

I hope this simple illustration makes sense to you. And also you should probably make the bounding boxes available for debugging by allowing the user to be able to set a flag to draw them if they please.
TheQuestion = 2B || !2B
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Interesting, that's a good design.

Also, someone demonstrated how Half-Life implemented indoor-outdoor scenes. There was this kid who knew the cheat code and he was able to pass through walls and see the entire city. I was able to see the magic trick, which was pretty much not really spectacular, nor jaw-dropping.
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Gonna tell us how they implemented it rather than just bragging that you know? ;)
Image Image Image
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I've been thinking yesterday on a system to divide the level to worlds, zone groups, zones etc..
It's really an awesome thing IMO but I have to go now so I'll explain later.

P.S
I've been checking C4 Engine a lot..
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I'm working on an impostor node at the moment,
Since Irrlicht doesn't have a nice way to flush the texture or mesh caches, it should be a viable solution to a large world. Here's some screen shots of progress over the weekend. In the last picture the red and grey squares are quake maps.
Using this method you could probably get away with not using zones at all, just throw everything into the impostor node and let it handle LOD of your distant outdoor meshes.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Here's what I have in mind:
Image

Now each zone will have a list of SceneManagers, AI Bots, other nodes that needs processing each iteration etc..
This way you can have a very detailed LOD, for example you can set on a strong PC to process a specific zone group while in a slow computer only process a zone, this way you can also control the loading of a level, having checkpoints to load a new zone/zone group etc..
Now there will be a E_PROCESS_PASS kind of thing so you like process AI first then SceneManager->drawAll to process graphics then e.g, physics->Calc_Physic etc..
I still have a lot to think about, implementation-wise, but that's the design I have in mind.
What do you think of it?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

I'm currently setting-up a test scene for a seamless indoor-outdoor.

Not sure exactly what the FPS will look like, so I'm treating this one as a demo/experiment.

I'll watch this thread and read more about zone, impostors, etc.

Image
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

bitplane wrote:I'm working on an impostor node at the moment,
Since Irrlicht doesn't have a nice way to flush the texture or mesh caches, it should be a viable solution to a large world. Here's some screen shots of progress over the weekend. In the last picture the red and grey squares are quake maps.
Using this method you could probably get away with not using zones at all, just throw everything into the impostor node and let it handle LOD of your distant outdoor meshes.
WOW thats awesome, It reminds me of the Total War engine. How are the imposters created, are you using RTT?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

With seamless outdoor scene swapping i had a technique idea once im sure its been tried, but i found in irrlicht ti worked well... what you do is have zones and then a last "transition zone".

|======|
| map |
| |==[ TRANSITION zone ]== | outdoor
|======|

My idea was you lock them in the transition zone, and while they are trying to find a way out you are loading the outdoor stuff slowly dropping all the rest of the map stuff , and then unlock the outdoor when its loaded.

this might only apply to certain types of games of course and is very limiting. it worked well in my test though i got good results
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yet more random screenshot posts from dlangdev; addicted to pimping his warez XD
Image Image Image
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

BlindSide wrote:
bitplane wrote:I'm working on an impostor node at the moment,
Since Irrlicht doesn't have a nice way to flush the texture or mesh caches, it should be a viable solution to a large world. Here's some screen shots of progress over the weekend. In the last picture the red and grey squares are quake maps.
Using this method you could probably get away with not using zones at all, just throw everything into the impostor node and let it handle LOD of your distant outdoor meshes.
WOW thats awesome
Indeed that is very cool bitplane 8)
Post Reply