Jump to content
  • Advertisement
Sign in to follow this  
mccalljohn90

How to take map image for mini-map

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 top
Can 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 this post


Link to post
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 top
Can 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.

Share this post


Link to post
Share on other sites
I think the recommendation of just using colored pixels (which can be stretched into squares) for the terrain and units would be a lot easier.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!