Rebirth 0.3

Finished up Rebirth 0.3 today. This version is quite a bit heavier than the previous two, but still just light enough to be called a micro-release. It adds two new simple classes:

  • Shape, which is the base class for all shapes in Rebirth. It implements @pos, @rot, @scale, and @visible attributes, and handles the OpenGL matrix stuff for transforming the shape.
  • Box, which inherits from Shape. It draws as a square or rectangle, depending on whether @scale is the same or different on x and y. It overrides #_draw to provide the OpenGL calls for rendering the polygons in local space.

I also made a mixin, HasEventHandler, which extends Rubygame's mixin of the same name to add a new method, #make_magic_hooks_for. It's just like HasEventHandler#make_magic_hooks, but uses the specified object as the hook owner. I'm planning on adding that method for the next release of Rubygame.

The demo for this version just shows a white rectangle. The background is purple (instead of the promised black) so that I could tell the screen was being cleared. Here's a commemorative screenshot; it's not much to look at, but you can click for the full image.

Screenshot showing a tilted white rectangle on a purple background

Like the other micro-releases, there's no download for this, but it's tagged as release-0.3 on github.

The next version was slated to be GameObject (i.e. Sprite) — not Circle, as I had thought — but while working on this version, I realized I needed a Camera class to see anything on the screen. I implemented a basic camera class in the demo, but I'm going to make the next release Camera, then GameObject, then Circle.


Have something interesting to say about this post? Email your thoughtful comments to