Pyggles Live!!!
Here's a new warm up. I decided to translate an old favorite from JavaScript & DHTML to Python & Pyglet. It's called Pyggles! (Hey, I only learned Python two weeks ago, okay?)(log in to comment)
Comments
Wyggles)
I think I need to nab the SVN stuff if I'm going to have something decent for the competition.
The sprite engine I wrote in Java 6 years ago has layers but I think there still needs to be depth sorting per layer.
Why would 2D be more complicated than 3D?!!!
Thanks! Your right. (BTW, I renamed it to I assumed you were using a non-commutative blend operation (such as GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), in which case you'll need to do depth sorting (in both 2D and 3D applications). Often you can get away with a commutative blend (such as GL_SRC_ALPHA, GL_ONE) to avoid sorting.
alex on 2008/03/24 21:50:
Looking good, and I'm impressed with your startup speed (of learning). If you haven't already, take a look at the pyglet 1.1 sprite module. It doesn't do automatic sorting by depth like you asked for, but if you can group your sprites into layers it's pretty trivial to render these in order.