Sign in to follow this  

huge game world for rpg/racing

Recommended Posts

suliman    1652
hi im doing a racing/action rpg set in huge deserts with scattered towns and camps. You drive around and do missions, shoot enemies, mine etc. For now i have no terrain/world. Im planning on having the maps devided into small sectors and have each sector have lists of units, projectiles and objects like trees/buildings/rocks. This will optimize collision-detection and can keep most of the game-objects passive if they are not in the proximity of any human player. Now... Is there any good way to handle different terrains and larger objects like rivers, oasis, cliffs without having a grid of tiles covering my hole world? Im planning on using a rigid body thingy to make vehicles bump into hard objects. Threes can just be added as a mapFeature-item with a position and rotation belonging to the corresponding sector and checked for collision, but how about a lake? Or a area of quicksand? Or a road? Thank you for any help Erik

Share this post

Link to post
Share on other sites
mrcheesewheel    325
Well it all depends on how you want your world represented... Is there a specific reason for not wanting tiles? Large open areas maybe? Well you could RLE your tile maps if this is really concerning you, but most likely it's not something you need to worry about. Secondly your towns could be "local" tile maps... the background of the world is generic terrain and your towns are painted on in specific locations. If you want more freeform structure, then you should use polygons do define object boundaries... or possibly a height map.

The right choice in a situation like this is not clear cut. I suggest that you do a (naive) test implementation of the simplest system that'll do what you want (eg tiles) and see how it fits into your memory/performance/coding effort requirements (ie profile it, know the memory and performance complexity). As for small items like rocks etc... how to do this depends on the level representation. They could be anything from custom tiles (possible inserted in the "generic terrain background")... true 3d objects placed on the heightmapped terrian.

A quadtree is the obvious data structure for any such world... and in a tilemapped world, you can easily align the quadtree cuts to the tile boundaries. If you do some tests and have some more specific requirements/info... I'm sure you can get some more specific help.
Hope this is useful,


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this