Taking a short break from his coding academy, Hudzilla has spent the last few weeks touring Italy and - believe it or not - fiddling around with Python. The first fruits of his effort are now available for world + dog to try, so if you're looking for something new to hack on, continue reading to hear from the man himself...
Everyone knows Pygame is a super-fast way to produce cross-platform games. But its one major flaw is that it's very slow to do simple operations such as scaling, rotating and recoloring. In fact, even making extensive use of transparency can be a bit slow, so I've produced a new graphics toolkit that makes all those things extremely fast, and I've called it Gloss.
Here's what Gloss lets you do:
- Scale, rotate and recolor textures and text in real time
- Create particle systems for explosions and other effects
- Render your scene to a texture for use elsewhere
- Assign callback functions for events such as mouse clicks and key presses
Plus I've also thrown in helpful mathematical functions such as vector normalisation, lerping (optionally with easing), and more. In short, it builds upon Pygame by replacing its SDL rendering system with a new OpenGL backend, then hides the event pump behind a nicer callback system and drops in some helpful game mathematics to finish things off. Lots of parameters to Gloss methods specify smart default parameters so that you need only fill in what you need. And yes, before you ask, it's all available under a free software licence - the GPL 3, to be precise.
If you'd like to give Gloss a try, zip on over to the Gloss homepage, where you'll be able to download the first release, optimistically numbered 0.5. The download includes documentation for every object and function, plus a tutorial and example code to help get you started.
NB: this is the first release of Gloss, so expect bugs! If you find any, please drop me an email and I'll get on the case.
Have fun! Now, back to the coding academy...
You should follow us on Identi.ca or Twitter