Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm creating a Top-Down Racing Game in C++ using GLUT/OPENGL and SOIL first of all I just wanted some opinions on how the track should be done. I was thinking about using a tile-map and so far I've implemented one but it draws a polygon for each value in the tile-map then uses the assigned texture. This is obviously a really in efficient way of drawing the background.

So how to go about concatenating the appropriate texture's together into one PNG/GL-TEXTURE that way I can just draw one big polygon and use the texture created from the concatenation process.

Also what's the best way of going about collision detection when it comes to tile-maps?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You have a few thousand polygons on screen, so what? Do you experience performance issues on anything better than a 5 year old cheap laptop? Cause you shouldn't, and if you do it's not because you use a few thousand polygons.

share|improve this answer
1  
1. 5+ year old computers are common. 2. If the OP is targeting older computers, the optimisation he suggests is sensible, and one that I have made myself. One screen-size polygon is significantly faster than one-polygon-per-tile on graphics hardware of that era. –  Chris Johnson Mar 7 '12 at 19:33
    
For the majority of computers unable to handle this scenario it wouldn't be the poly count that cause problems unless we are talking about some seriously tiny tiles. 5 years is just what I feel comfortable claiming without risking that some nitpicker find an obscure counter-example. As for supporting old hardware incompatibility between the library and old hardware/driver stacks is probably a way bigger issue. But if you seriously think this detour is a good idea write so in an answer and prepare to get downvoted. –  eBusiness Mar 7 '12 at 21:08
    
It's just it would be more efficient in the long run. –  SyntheCypher Mar 8 '12 at 11:33
    
@SyntheCypher Not really, the theoretical gain is negligible. You would however increase load time and use a lot more video memory. Depending on the amount, that extra memory requirement could be what breaks the game on some old computers. –  eBusiness Mar 8 '12 at 15:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.