programming a strategy game (mini map problem)

Started by
1 comment, last by dpadam450 17 years, 5 months ago
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
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?
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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement