Documentationonline docs
Supportmailing list

I'm making a GUI library for games - check it out at

Rabbyt development has ended...

I started a new project, lib2d, which is as close as a rabbyt 2.0 as I'll make. Lib2d tries to learn from the mistakes rabbyt made. Lib2d's implementation is simple C code (it has a nice C API too) with the python binding using ctypes. (This makes using alternative runtimes such as pypy or jython much easier.) There are no funky build requirements and the only dependency is OpenGL (which I plan to make optional in the future.) Lib2d swaps out rabbyt's immediate mode drawing API for a scene graph, which allows for better performance and portability across rendering APIs.

If rabbyt's just too good for you to let go (I know, it does have some very cool features, some of which aren't accounted for yet in lib2d), Ryex has ported version 0.8.3 to Python 3 over on github.



Sprites are easy! You can create one by just specifying a texture:

car = rabbyt.Sprite("car.png") 
2D car sprite

Rotating and scaling are hardware accelerated, and easy!

car.rot = 45 
car.scale = 0.5 
rotated and scaled car sprite


Rabbyt's "lots of sprites" example.

Animating is common need for game graphics, and doing a large number of them in python can get slow. Rabbyt provides a set of Anim (short for animator) classes to calculate common animations in C. For example, you can slowly fade out the car sprite like this:

car.alpha = rabbyt.lerp(1.0, , dt=1.0) 

That will linearly interpolate the sprite's alpha from 1.0 to 0.0 over the next 1 second. This both easy to use, (you just set it and forget it,) and fast (it all happens in C code.)

Take a look at the example in the Rabbyt download. It makes use of anims for the position, rotation, scaling, and color of 2400 sprites. And it runs fast.

Collision Detection

Collision detection example

Collision detection is another thing that is difficult to do in pure python. Rabbyt can do the tedious part for you. Just pass rabbyt.collisions.collide() a list of anything that has x, y, and bounding_radius attributes (like a sprite) and you'll get back a list of collisions. (Ok, that sounds a little corny after I wrote it, but whatever.)

Check out the example to see how fast it is. On my machine, it takes an average of 1 millisecond to do a brute force collision check between 400 sprites.