Jump to content
  • Advertisement
Sign in to follow this  
CProgrammer

mini maps for strategy games

This topic is 5399 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

Im trying to implement a mini map into my strategy game engine. How would I best do this? I assume dynamic texture manipulation? Or does one dynamically create a representative of the terrain once and draws and( units(dots) over the quad? Secondly how does one dynamically change textures. Do I just keep the pixels in system memory and repeatedly call glSubTexImage2D? Or is there some efficient extension? -CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
Hello,

this is what I'd do:

1) you may already have a texture that represent your current map. This one should be small (128x128 or 256x256 max).
2) copy it
3) you plot each unit on this map copy
4) you blend the FoW onto the map copy
5) draw (one map pixel == one screen pixel).

This should be fast enough (probably not more than 200 units on the map). This is flexible enough to add more effects (alteration of the FoW texture, really big explosions, and so on).

HTH,

Share this post


Link to post
Share on other sites
According to my experiences:

If you're using large maps eg: 256x256, and you render the minimap in a smaller size, the moving units will "blink" on the map since the texture shrink, even if you use filtering.

I made 2 textures, one stands for the background (static objects) like terrain..etc. This can be the size of the map, and usualy remains the same along the game (no need to upate). The other is for the dynamic objects which is always 128x128 or 64x64 whichever fits the best for the minimap display.

-marci

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!