Jump to content
  • Advertisement
Sign in to follow this  
mc30900

programming a strategy game (mini map problem)

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

hello all. i'm working on a strategy game. the map is Quad-Based which means there are quads and sand texture on them. anyways when i try to create a minimap (i draw the whole map again but every quad takes less place) my fps is decreasing big time. are there any algoritmes for this? i dont want it to take that much memory. thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Perhaps you mean mipmaps?

Mipmaps are setup only when the textures are loaded, this shouldn't be done every frame. Your render function should only have something like:


glBindTexture(GL_TEXTURE_2D, texture[texNum]);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(0.0f, 0.0f, 0.0f);

//etc...
glEnd();



If that's not the problem, what texture parameters are you using for your filtering?

Share this post


Link to post
Share on other sites
How you should do it:

1.Have a texture from top down of the whole map.
2.Have a function to convert objects world pos to mini-map pos:
->If your map is say 600x600 and your mini-map is 50x50,
Then take (50/600)*objects x(and y afterwards) to get mini-map pos.
3.Draw a point at this location.

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!