[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Lousy FPS



Kris Schnee wrote:

Aesthetically, I like the look of the isometric tiles more than anything I've done with OpenGL tiles.

You should be able to get the same result from OpenGL by treating it as a fancy 2D drawing engine. Set up an orthographic projection that maps x,y coordinates to pixels, load all your tile images up as textures, and draw them as textured rectangles, using the z coordinate to control layering.

You can use the same calculations you're doing already to work out
the x,y coordinates to draw the tiles at, but won't have to worry
about what order to draw things in, as the depth buffer will take
care of it. And you can build a display list for all of the static
tiles. The result should look pretty much identical to the pygame
rendered version, and be extremely fast.

--
Greg