- Terms and conditions
- Privacy policy
- Cookie policy
- Advertise with us
© Future Publishing Limited, Quay House, The Ambury, Bath BA1 1UA. All rights reserved. England and Wales company registration number 2008885.
Gloss is a high-performance graphics wrapper around Pygame that lets you take advantage of OpenGL without having to delve into the murky depths of 3D programming. Gloss lets you build 2D games where you can rotate, scale and recolor sprites on the fly, and also includes a selection of helpful mathematics functions to make the life of games coders easier.
Gloss is licensed under LGPLv3, and comes with full documentation, a tutorial and several code examples to help get you started, so if you're looking to make a game quickly and easily give it a try!
Gloss uses OpenGL, but hides it all. Every last bit! All you need to do is make sure you have python-opengl installed (and perhaps also python-numpy depending on your Linux distro). OpenGL is indeed much harder than plain old Pygame, but the magic of Gloss is that to developers it looks like any other 2D drawing toolkit, but behind the scenes their calls get mapped into 3D for extra speed. That's why it can rotate and scale on the fly.
The functionality most people will want to use in Gloss includes:
Download the tarball and run some of the examples to see what Gloss can do.
Pyglet is a very cool and very mature OpenGL library for Python, but it serves quite a different purpose to Gloss. Gloss is designed to hide all the OpenGL calls behind simple wrappers so that it takes only a few minutes to learn, and you can do more just by experimenting. What's more, Gloss is designed to build on top of Pygame, which means you can use all your existing Pygame code for audio and other core functionality.
Quite the opposite! Gloss has been designed to be a cinch to pick up - if you've made a game with Pygame before, you should be able to start using Gloss in under five minutes.
Yep, but please make sure you import it before you import Gloss, like this:
import pygame from pygame.locals import * from gloss import *
No - you can scale and rotate your image as many times as you want, and not a single pixel of data will be lost. It's super fast and takes no CPU power, because it's all done on the GPU.
No - in fact most advanced coders will probably want to create their own sprite class specific to their needs. The built-in Gloss Sprite class is really just there to make things easier for beginners, as it automatically handles things such as click detection.
Many Linux distros need the Python "Numpy" package installed in order to work, which is a bit annoying. If you have that installed and Gloss is still crashing, you've found a legitimate bug and should email me.
When you download Gloss you'll find it comes with a tutorial, documentation and several examples to help get you started.
Email me your code/suggestion/feedback/hate mail and we'll talk.
You should follow us on Identi.ca or Twitter
Your comments
py2exe
Guisim (not verified) - August 7, 2009 @ 1:29am
Has anyone succesfully created an exe using py2exe ?
I keep getting
...\gloss0.6\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
So anyone who is using
Anonymous Penguin (not verified) - September 29, 2009 @ 11:38pm
So anyone who is using Pygame under the LGPL and wants to use your code must now infect their code with the GPLv3? Pfffffft.
Seems like the less dickish thing to do would be to release it under the same license as Pygame, but whatever, it's your code.
I'm glad it's GPLv3
A for Anonymous (not verified) - October 13, 2009 @ 3:16pm
I, for one, welcome the GPLv3 licencing. The GPL version three has been out for some time, and people are simply ignoring it. Let's not forget GPLv3 is the only software licence that protects us from the danger of patents and that makes software stay free, as well as being the licence corporations dislike and are afraid of.
Just kindly release your software under the GPLv3, or kindly shut up and use something else; I suggest msdn.com for you.
Any ideas?
Rawlyn (not verified) - October 18, 2009 @ 8:39pm
Is this a gloss issue, or a problem with something else I'm doing? On one of my machines everything works beautifully, but on the other machine...
Traceback (most recent call last):
File "example_loadingscreen.py", line 23, in <module>
game.run()
File "/home/username/tmp/gloss0.7/examples/gloss.py", line 159, in run
self.gloss_initialise()
File "/home/username/tmp/gloss0.7/examples/gloss.py", line 98, in gloss_initialise
Gloss.MaxTextureSize = glGetInteger(GL_MAX_TEXTURE_SIZE);
File "/usr/lib/python2.6/dist-packages/OpenGL/wrapper.py", line 1631, in __call__
return self.finalise()( *args, **named )
File "/usr/lib/python2.6/dist-packages/OpenGL/wrapper.py", line 683, in wrapperCall
converter( pyArgs, index, self )
File "/usr/lib/python2.6/dist-packages/OpenGL/converters.py", line 195, in __call__
return self.arrayType.zeros( self.getSize(pyArgs) )
File "/usr/lib/python2.6/dist-packages/OpenGL/arrays/arraydatatype.py", line 98, in zeros
return cls.returnHandler().zeros( dims, typeCode or cls.typeConstant )
File "/usr/lib/python2.6/dist-packages/OpenGL/arrays/nones.py", line 32, in zeros
raise TypeError( """Can't create NULL pointer filled with values""" )
TypeError: ("Can't create NULL pointer filled with values", 'Failure in cConverter <OpenGL.converters.SizedOutput object at 0xa16379c>', [GL_MAX_TEXTURE_SIZE], 1, <OpenGL.wrapper.glGetIntegerv object at 0xa18e7ec>)
download problem
sipiatti (not verified) - October 23, 2009 @ 8:58am
Hi,
I've tried to download it several times but each time I was unable to unpack it with tar xzf. It says it does not look like a tar archive.
Can I download it from elsewhere?
download problem SOLVED
sipiatti (not verified) - October 23, 2009 @ 9:19am
sorry, was my fault. I've tried it with a separate gunzip and untar and it worked.
congratulations it is a quite good pygame extension, I am amazed.
**thumbs_up**
30FPS?
DMark (not verified) - November 25, 2009 @ 11:35pm
For some reason, even a simple game is running at only 30 FPS. Not around 30 FPS, *exactly* 20 FPS. This makes me thing the bug is quite possibly pretty insidious. Anyone having this problem?
Problem with Ubuntu 10.04
mr. BB4 (not verified) - July 9, 2010 @ 12:35am
Why doesnt it work on ubuntu 10.04??
I really whant to try it but y cant run it 'cose it just doesnt do a thing, the program stops when Gloss is supose to start D=
Please, help me.
gloss doesnt show nothing
.teri (not verified) - July 11, 2010 @ 1:26pm
Hello. gloss (0.9) seems doesn't show nothing. Python runs but it's frozen.
Im using GNU/Linux lenny, python 2.5.
I'm also having problems
3oheme (not verified) - September 11, 2010 @ 3:57pm
I'm also having problems trying to run example files on Ubuntu 10.04.
Any fix?
Fixing Click Detection
Elliott Penguin (not verified) - February 1, 2011 @ 10:38pm
Just wanted to point out, the example_onclick.py will crash because Gloss doesn't dereference the weakref before it tries to use it. To fix this look at line 738 in gloss.py; It's currently:
for sprite in Gloss.sprites:
Change it to:
for tempSprite in Gloss.sprites:
sprite = tempSprite()
Fixed! Thanks for the library!
Thanks a lot !!!
T_U (not verified) - September 21, 2011 @ 9:42am
This is exactly what I was looking for, great !
BTW, is the library still being developed ?
Cheers !
Colission detection
Kaliber64 (not verified) - November 6, 2011 @ 12:04am
Gloss doesn't have it own collision detection >.>
I've been trying to use pygames but that requires you to make a pygame background while drawing with gloss not pygame just to have accurate collision detection. Spherical collision containers are out of the question.
комментарий к теме
Anonymous Penguin - December 7, 2011 @ 3:31pm
Автомобили : Прокат авто в киеве