• 15
• 15
• 11
• 9
• 10

# How to take map image for mini-map

This topic is 2440 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm creating a mini-map for my tile-based RTS, and I need to create a mini-map. To do this, to my knowledge, I need to take an image of the entire map from afar, and reduce the image's size (while remaining efficient in the process, because the minimap will update often). So how can I do this?

##### Share on other sites
It depends how much dynamic detail you want.

You could make smaller versions of each tile and make a tile-based minimap.
To represent enemy buildings you could either have simple colored squares (like Warcraft 3), or you could use small images or icons representing the building type.
For units you could just use colored 'blips'.

EDIT: For performance reasons, you will want to generate the minimap to a texture. Except of course for the buildings/units and other dynamic content.

##### Share on other sites

It depends how much dynamic detail you want.

You could make smaller versions of each tile and make a tile-based minimap.
To represent enemy buildings you could either have simple colored squares (like Warcraft 3), or you could use small images or icons representing the building type.
For units you could just use colored 'blips'.

EDIT: For performance reasons, you will want to generate the minimap to a texture. Except of course for the buildings/units and other dynamic content.

Nothing stated here is what I didn't know. How about at least some pseudocode?

##### Share on other sites
pseudocode:at level creation time: render level using overhead ortho camera save as DDS at load time: load level DDS. at draw time: draw DDS to screen using ortho/hud camera. draw building/unit icons over the topCan you describe what kind of minimap you want? Which parts of the idea in particular are you having trouble with? There's a lot of "it depends" currently...

##### Share on other sites

pseudocode:at level creation time: render level using overhead ortho camera save as DDS at load time: load level DDS. at draw time: draw DDS to screen using ortho/hud camera. draw building/unit icons over the topCan you describe what kind of minimap you want? Which parts of the idea in particular are you having trouble with? There's a lot of "it depends" currently...

The minimap will be dynamic--dynamic in the sense that for every movement on the map, the minimap will update to display that movement.

I've never heard of an "ortho camera" before, so I guess I have some research to do. But, now that I think about it, the notion of manually drawing the building/unit onto the minimap I think may not be needed. Because the RTS is rather computer-friendly (it's a 2D isometric, tile-based game), I think I might be able to get away with a picture-in-picture (PIP) type of minimap, although I would have no idea how to implement this. The general idea behind it would be that the game would contain two cameras, one camera for the main picture in standard resolution, and another camera positioned on the map in such a way that it views the whole thing; that camera would be lowered in resolution and placed in the HUD.