Rubygame 3: Day 30, Part 2

Got pandas?

Why, yes. Yes I do. Quite a few of them, in fact.

Many, many panda sprites stacked on top of each other

In other news, I went and made that handy event hook factory. Take a look at it in use:

# It's so easy, it's magic!
scene.magic_hooks(:mouse_right  =>  :add_panda,
                  :print_screen =>  :take_screenshot,
                  :r            =>  :refresh,
                  :s            =>  :toggle_smooth,
                  :q            =>  :quit,
                  :escape       =>  :quit)

I'm really excited about Rubygame 3's sprite and event systems. They have far exceeded my initial expectations for ease of use and power, which is pretty sweet; and it's getting better every day!

Unfortunately, since I spent all afternoon, evening, and night working on Rubygame 3 today, I'm probably not going to have much time for it tomorrow. Darn work deadlines. *sigh*

We'll see.


brian submitted a comment on #

If it doesn’t already, it’d be very useful to have magic_hooks hash second parameter take Proc and Method objects too in addition to symbols, so it’s not just local scope methods.

John Croisant submitted a comment on #

@brian: The symbols actually refer to instance methods, not local scope methods. (Not that anyone would know that just from what I’ve posted.)

I do really like the idea of being able to give a Proc/Method as an alternative to the method name, though. Thanks for the great suggestion! :)

Have something interesting to add to the discussion? Email your thoughtful comments to