Introducing Gloss
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



Copyright 2010 Future Publishing Limited (company
registered number 2008885), a company registered
in England and Wales whose registered office is at
Beauford Court, 30 Monmouth Street, Bath, BA1 2BW, UK
Your comments
Looking interesting!
Sslaxx (not verified) - June 9, 2009 @ 4:55pm
Going to give this a brief try-out.
- but
mjjzf - June 10, 2009 @ 5:41am
Conveniently forgot screenshots, but I suppose that is forthcoming?
3d toolkit
Anonymous Penguin (not verified) - June 10, 2009 @ 6:40am
Will this ever progress into a full 3d toolkit
Nice, but cross-platform?
DaVince (not verified) - June 11, 2009 @ 1:22pm
This sounds very nice! However, I want my game to be cross-platform... So my question is: does Gloss work well in Windows or on Macs too?
py2exe
Guisim (not verified) - August 7, 2009 @ 12:28am
I'm having trouble getting it to package as an exe via py2exe
I get
path...\examples\dist\example_particles.exe\gloss.py:76: RuntimeWarning: use mixer: MemoryLoadLibrary failed loading pygame\mixer.pyd
Traceback (most recent call last):
File "example_particles.py", line 58, in <module>
File "gloss.pyo", line 159, in run
File "gloss.pyo", line 76, in gloss_initialise
File "pygame\__init__.pyo", line 70, in __getattr__
NotImplementedError: mixer module not available
Post new comment