What's the best way to draw lots of large textures?

Started by CuppoJava, May 15, 2005, 05:42:08

Previous topic - Next topic

oNyx

Well... rotation... you can just cheat there and draw all tiles inside some quad (not rectangle) which would fill up the whole screen no matter how its rotated.

Would be identical to the other version... except that the "screen" is bigger.

Jan

Thanks for the pointers. I made it easy on myself and went with oNyxs version :) But, I do have one more question. In the sample code elias4444 provided: How do you know whats the objectx,y,z after you have rotated and translated? Is there a way to calculate it up front?

elias4444

The idea is that your track the "center" point of your screen (so, if you sprite stays in the middle, and the rest of the world moves around it, then you set the screencenter to the sprites location on your world map). Then, the onscreen detection is a spherical or cylindrical detection, so rotation should matter.

If you've got an easier way to do it, I'd say go for it, as the method I showed isn't the most optimal way to do things... it was just a bit more straightforward for onscreen detection problems.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com