Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Rabbyt 0.8.3

    Download button

    No screenshots available
    Downloads: 333  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Matthew Marshall | More programs
    MIT/X Consortium Lic... / FREE
    September 7th, 2009, 13:13 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Rabbyt description

    A fast 2D sprite engine using OpenGL

    Rabbyt is a sprite library for Python with game development in mind. It provides fast performance with an easy to use but flexable API.

    Sprites

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

     car = rabbyt.Sprite("car.png")

    Rotating and scaling are hardware accelerated, and easy!

     car.rot = 45
     car.scale = 0.5


    Animations

    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, 0.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 lotsofsprites.py 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 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 collision.py 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.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · Fixed Sprite.left (etc.) incorrectly applying independant axis scaling to absolute coords instead of rotated relative to the sprite.
    · Sprite.bounding_radius now reflects Sprite.scale. (previously ignored.)
    · Fixed a segfault when anims have circular dependencies.
    · Optimized swizzle.
    · Fixed aabb_collide() not always reporting immediately overlapping rects.
    · Fixed a memory leak caused by an extra underscore at the end of __dealloc___

      


    TAGS:

    sprite library | game development | Python library | sprite | game | development

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM