Large scale world design ideas

Started by
5 comments, last by rk_theone 17 years, 6 months ago
Currently one of the things I'm going to need to program is a large scale world similar to 1942, or GTA. My current idea is to divide the land into sections and then of course only render sections that are visible by the player. I dont think a BSP would be a good way to go in this situation. Just wondering what kinds of design ideas people might have on this.
Advertisement
Depends a bit on what kind of game, and specifically, what kind of view you're going for. For a game like GTA, you should look into quadtrees. It might work well for BF1942-like games as well, when you add some fog to obscure area's further away. You could also look into terrain LODding. It shifts some work from the GPU to the CPU though, so I wouldn´t implement it before doing some reseach and testing.
Create-ivity - a game development blog Mouseover for more information.
Thanks for the info. I checked on quadtrees and didnt really like them. I have a much better way of finding what sections to render. The terrain LOD stuff is something I will check into.
So what method are you using then? It might benefit others... :)
Create-ivity - a game development blog Mouseover for more information.
Spanish moss algorithm is also quite useful if you have objects in all nodes, and could choose optimal node size.
Well I set up a grid, lets say 21x21 for example so there is a middle section with 10 sections in all directions. Then calculate the angle from that center section to each of the other sections. That data can then be sorted and binary searched for the start angle you are looking for. Then you just render every section until you pass up the largest angle you need to render. A little extra checking is needed in cases where you are rendering on either side of 360/0 degrees.

Of course that data is precalculated, not generated each frame.

You could also trade even more memory for speed if you were to calculate all sections that should be rendered from each degree of view, and then sort those sectons from closest to furthest away because its faster to render polys in that order.
hmmm!!!!!!

that is pretty similar to quadtrees, isn't it. but some optimization with it. it makes me think that your map seems to be a 2d map. if it really is? then use bsp instead. only thing is for open areas. when you come to open area i think you can use portals.

rk - the one

This topic is closed to new replies.

Advertisement