Sunday, July 28, 2013

Adventures in pyglet: Quads

Got called off from the pizza mines tonight.  Should be worth some more time on the engine.

Switching the engine from rendering triangles to quads.  The way the new tile engine works is, it sets up a 2D array of vertex lists, all the same size, that represent the tilemap.  Deleting and creating new lists as needed, every frame, was too slow, so it leaves the lists in place and changes the vertex data when necessary, which seems to be fast enough, and flexible too; Z-order can be changed, I believe, by specifying a Z coordinate, which is important to the direction the art is taking.

The best way to do this would be to have one copy of each tile in the graphics card and just render each at need in the appropriate place, but difficulties in doing this seem to be a drawback to pyglet.

It's a somewhat confusing new way to do graphics for me, but I seem to be getting used to it.

No comments:

Post a Comment