Rubygame 2.2.0 released

Just 1 month after the release of Rubygame 2.1.0, I'm excited to announce the release of version 2.2.0!

Rubygame 2.2.0 adds a new module with color-related classes and pre-defined palettes of common colors. It also adds the ability to set the window icon, change the value of individual pixels on a Surface, and several other improvements. See the release notes for details.

Alright, enough of the press release stuff.

What's interesting about this release is that it's the first new feature added to Rubygame that has significant unit tests to ensure correct behavior. If you have RSpec installed, just do spec rubygame/test/color_spec.rb to run the tests.

Although I'm striving for behavior driven development, my methodology for Color was somewhere between unit testing and behavior driven development. Here was the general workflow:

  1. Think. A lot. Write stuff down. Get a pretty good mental picture of how it should work. In other words, design it.
  2. Write some simple code. Enough that it runs and does most of what it's supposed to do.
  3. Write some tests for the behavior that has implemented. Calculate the expected results by hand, rather than assuming the first run of the code is correct.
  4. Tweak the code, both interface and implementation.
  5. Repeat.

Ideally, in behavior-driven development, step 3 should come before step 2. Still, this is a significant step up from not writing any tests at all!

Another method that would be interesting to try, is to write an application using an API that doesn't exist, and then create the API so that the application works. That encourages a more user-centric kind of API development, which is nice.

In other news... now that 2.2.0 has been released, I have to figure out what the next version will have. There's no roadmap for a 2.3.0 version at this point. Maybe it's time to work on 3.0.0 some more?


Comments

Have something interesting to say about this post? Email your thoughtful comments to comments@rubygame.org.