Rubygame: The Blog


I’ve finished the massive cleanup of the panda demo. I moved all the random shape drawing to another demo (demo_draw.rb), and turned the panda demo into a pretty good example of game structure. It has a Game class which organizes the clock, screen, sprites, event queue and handler, etc. The Game, the sprites, and the sprite group all use Has EventHandler, and nearly everything is event-based, even updating and redrawing the sprites! Plus everything’s commented to explain it, so it might actually be a pretty useful practical example.

I also decided to partially revert my simplification of Method Action from the other day. Specifically, I added back in the behavior of calling the method first with the event as the argument, and then if that fails (raises ArgumentError), tries again with no argument. So, it’s less picky about whether the method takes an argument or not, which makes it easier to use, and reduces the number of confusing errors people will see. All good things.

Rubygame 2.4 will be released later tonight. I’m cleaning up, updating the NEWS and ROAPMAP, and other stuff right now in preparation to package it up!

Leave a Comment

Your email address will not be published. Required fields are marked *