Grand Theft Auto and Open Worlds
I've been working on a gaming engine that's comming along pretty nicely. I really want the sort of open world type depth as Rockstar's Grand Theft Auto (or other sort of games, like that pretty well done Spiderman game). I know all about octtrees and have considered this as the most likely canadite for the task. I can imagine a pretty open implementation of an octtree where the main octtree sector encompasses the entire world - I see very little faulted by this, any advice/input?
It strikes me that octtrees are largely used for culling the list of objects to display and run collision detection on. The big deal with huge games like GTA is knowing when to load the next section of the world, since there's no way you're going to fit the entire world into memory at once. Certainly you can use an octtree to hold objects once they're loaded, but knowing when to load what parts of the game is the tricky bit here. I don't personally have any experience with this particular problem, but I'm sure some searching would turn up suggestions for solutions. One thing to consider would be establishing a buffer region on the edge of what you have currently loaded, and once the player enters that region, you start loading the next section of content. Exactly how to do that, of course, is trickier.
Incidentally, I'd say this is more game programming than game design, but that's me.
Incidentally, I'd say this is more game programming than game design, but that's me.
Jetblade: an open-source 2D platforming game in the style of Metroid and Castlevania, with procedurally-generated levels
The solution to that problem is to consider sectors (or smaller octtrees) as containers for objects. Give the octtree/ sector the responsibility for loading it's children objects. I imagine using LODs for distant sectors (if even reached within the frustum), once reached using a LOD, once closer the lod expands to start drawing objects. It -looks- like this is what GTA already does - a lower LOD of the land mass appears before the objects, then both improve. Seperating out the objects from the land masses is most likely the job of the individual sector but still seperate as it would greatly reduce processing of distance objects by not even bothering. This allows us to still use octtrees effectively, though I imagine for greater distances it would still work to use quadtrees that hold octtrees reducing computation possibly.
I thought this was more a design question as I don't want to see any implemenation :)
I thought this was more a design question as I don't want to see any implemenation :)
OGRE has an add-on called the paging landscape scene manager which allows for huge expanses of land that are paged in and out of memory. This is exactly the idea you seem to be looking for...
Quote:
Original post by TheQ
I've been working on a gaming engine that's comming along pretty nicely. I really want the sort of open world type depth as Rockstar's Grand Theft Auto (or other sort of games, like that pretty well done Spiderman game). I know all about octtrees and have considered this as the most likely canadite for the task. I can imagine a pretty open implementation of an octtree where the main octtree sector encompasses the entire world - I see very little faulted by this, any advice/input?
With exception they are not. Better algorithm is spanish moss. Octtree will just waste memory because quite a lot of gamming world is planar. Actually any non implicit tree will waste memory in this case.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement