Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualic0de

Posted 14 January 2013 - 06:36 PM

Well to how dynamic, The minimap size (and thus the map size) will be 32x32 pixels up to 256x256 pixels (/tiles), and will change 30 times per second. each pixel will show the color of the dominant player over the corresponding tile, or otherwise light green for grass, light brown for dirt, dark green for trees etc.

 

I noticed you're using SDL. Since the minimap is only 256x256 and you probably have some kind of data structure representing the state of each tile. I would assign a color to each type/state of the tile (you seem to already have) and go through each tile on your map and have SDL plot those pixels to an SDL_Surface sized 256x256 and then turn the SDL_Surface to a GL texture using glTexImage2D(). Or alternatively you could use shaders.


#1ic0de

Posted 14 January 2013 - 06:35 PM

Well to how dynamic, The minimap size (and thus the map size) will be 32x32 pixels up to 256x256 pixels (/tiles), and will change 30 times per second. each pixel will show the color of the dominant player over the corresponding tile, or otherwise light green for grass, light brown for dirt, dark green for trees etc.

 

I noticed you're using SDL. Since the minimap is only 256x256 and you probably have some kind of data structure representing the state of each tile. I would assign a color to each type/state of the tile (you seem to already have) and go through each tile on your map and have SDL plot those pixels to an SDL_Surface sized 256x256 and then turn the SDL_Surface to a GL texture using glTexImage2D().


PARTNERS