Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a 3d topview game like GTA2. In this game the ground is mostly one level (except for tunnels and highways). Most of the ground is also city so the ground is usually covered by either roads or buildings. The buildings are simple 3d models which the player can walk around on. Most of the gameplay is 2d.

How should I model the map? I have considered the following options:

  • Bitmaps, I think this gives problems when I want to add data smaller than a tile. Also the problem of bridges and tunnels seems hard to solve with this.

  • Polygons, define all roads, terrain types, buildings with polygons and save that along with physics and texture information.

What approach would you take or have you ever implemented this or know of an implementation?

share|improve this question
How about using a 2D map editor? – Jonathan Connell Sep 15 '11 at 9:36
You might consider a format used with real world maps, such as KML/GML. There are no shortage of parsers, and they are geared towards 3d mapping from a top-down perspective. – Jordaan Mylonas Sep 16 '11 at 6:05
@jordaan why isn't your comment an answer? it actually is a very nice suggestion. Thanks :) – Tinco Sep 16 '11 at 13:14
up vote 1 down vote accepted

Are you going to use a terrain system ? or is it just flat ?

Bridges and tunnels do add complexity. To have bitmaps represent bridges and tunnels you could perhaps use a 2nd bitmap layer or even one of the channels to represent a second ground layer. (i just noticed that zacharmarz mentioned these considerations) I'm not sure, as there is always a way to make something work, but I'd imagine any commercial game using such sophisticated geometry would utilize a 3d engine. So unless you're an experienced game developer, I'd ditch the bridges and tunnels idea. At least until you've got some other more basic requirements met. Oh, unless those bridges and tunnels are part of the only traversable layer, then it's easier

You can add texture data onto the ground smaller than a tile. That's not a problem. And you can have objects (other than buildings) that are smaller than a tile, because any objects including buildings will be geometry which you have defined. All this talk is speculative though, because the solution options you have are numerous. It would be totally possible to build a bitmap based map system as long as you are clever (and patient) enough to overcome all the challenges. Indeed a lot of game terrains (2d & 3d) are built using heightmap's blendmap's ect which are simply bitmaps. BUT, if you want the power to be able to drop an object onto the ground, anywhere, it makes more sense to me to have in addition to the bitmap (defining ground textures / buildings or whatever) a collection of objects which have location properties : float x, float y, float z or Vector3 position. And run through that collection as well, rendering at their positions, just as you do for your avatar/player character.

share|improve this answer
Thanks for the excellent answer. I'll wait a bit if anyone is going to give an answer that isn't the bitmaps, if they don't I think your answer is the most complete :) – Tinco Sep 16 '11 at 13:22

I would prefer bitmaps, which will hold information about objects (buildings, roads, water, etc.).

If you have problem with tile / pixel size, you can separate "city / map" into several big tiles and each tile will have separate bitmap.

Problems with tunels and bridges can be solved by using more than one bitmap for tile / map. Or by using different color components. When you will be rendering you world, you for example just look, if there is no bridge over water, you are just rendering.

share|improve this answer
Bitmaps are ok for a tile based game, but in this case, they're probably the worst option, especially if buildings are going to be 3d models. – thedaian Sep 15 '11 at 13:47
Why do you think they're probably the worst option if buildings are 3d models? – Tinco Sep 16 '11 at 13:16
I think - also if you have 3D models, you can have center of 3D models and just add to bitmap location of this center. So it could work. – zacharmarz Sep 16 '11 at 13:31

You can also do a hybrid approach: 3d with modular pieces. Make a set of 3d "tiles" and piece them together in a level editor. That gives you the fast editing speed of bitmaps but gives you the flexibility to add bridges and tunnels and custom set pieces.

Neverwinter Nights uses a system like this, if you're looking for inspiration.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.