Nice-FFI 0.4 released

Nice-FFI 0.4 is now available. You can install the new version with gem install nice-ffi, as usual. Please note that Nice-FFI is still not considered API-stable, so if you aren't willing to update your code when a new version comes out, you shouldn't use it until version 1.0.

Version 0.4 fixes several major bugs related to finding and loading dynamic libraries:

  • PathSet now properly expands globs ("*") in file and directory names, like it was supposed to.
  • PathSet now works even when a directory path has no trailing separator ("/" or "\").
  • Fixed a typo which caused NameError when using load_library with the default paths.

You can get Nice-FFI:

Please send bug reports and feature requests to the issue tracker on Github.

Nice-FFI 0.3 (and 0.2)

I've just released a new version of Nice-FFI, my convenience library for Ruby FFI libraries. You can install the new version with gem install nice-ffi, as usual. Please note that Nice-FFI is still not considered API-stable, so if you aren't willing to update your code when a new version comes out, you shouldn't use it until version 1.0.

Continue reading “Nice-FFI 0.3 (and 0.2)”

Snippet: ls_r (recursively list and process directories)

Here's a little Ruby function I came up with today. I thought it might be useful to other people, so here it is.

Continue reading “Snippet: ls_r (recursively list and process directories)”

Dreaming of Ambienome

Lately, I've been having visions of a game I've been wanting to make for years, which I call Ambienome, a pseudo-portmanteau of Ambient (as in ambient music) and Anemone (the tendrilled sea creature). Both the concept and the name are inspired by Toshio Iwai's Electroplankton. Like Electroplankton, Ambienome would be more of a musical toy than a game; the purpose of it is to have fun and express your creativity, not to "win".

Continue reading “Dreaming of Ambienome”

Migrated from Mephisto to WordPress

I've finally migrated this blog from Mephisto to WordPress. I've set up redirects, so ideally all the old URLs should still work fine. Apologies for the RSS feed spam, if you got hit with any. Once the dust has settled here, I'll be migrating the Rubygame blog too.

Why the switch? Simply put, Mephisto wasn't cutting it anymore. It's not as usable or polished as WordPress, and it doesn't feel like it's going anywhere. Worse, the Rails-based setup was making it difficult to keep up and running, and it was prone to mysterious breakages that would come and go with no apparent cause. In the end, it just wasn't worth it to me.

For the migration-curious, here's how I did it.

Continue reading “Migrated from Mephisto to WordPress”

Your Git Submodule and You

(Pssst. Check out my Git Submodules Cheat Sheet for a quick reference.)

This post is the result of my investigations into how Git submodules work and how to use them. My goal in investigating submodules was to decide if they would be an effective way to share specs among the various Ruby FFI implementations (Ruby-FFI for MatzRuby, JRuby's FFI, Rubinius' FFI, etc.). We wanted all the projects to be able to include the specs as a subdirectory of their main repository so that they could easily run them, yet we also needed an easy way to keep all the projects in sync.

Continue reading “Your Git Submodule and You”

Nice-FFI 0.1

I'm pleased to announce a small helper library I've created, Nice-FFI. It sits on top of Ruby-FFI and makes certain things easier and more convenient. Nice-FFI started out as helper classes I made for Ruby-SDL-FFI (which is coming soon), but I decided to generalize it and make it its own library so that other people might get some benefit from it.

Continue reading “Nice-FFI 0.1”

Droplet Post-Mortem

This is a look back at last weekend's RubyWeekend #3 game contest and the process of developing my entry, Droplet.

Continue reading “Droplet Post-Mortem”


Screenshot of Droplet

I'm pleased to present my entry to the RubyWeekend #3 game competition: Droplet. From the README:

Droplet is a small musical toy created by John Croisant in 72 hours over the weekend of June 26-28, 2009 for the third RubyWeekend game creation competition.

The theme of the competition was “A Tiny World”. The inspiration for Droplet comes from photographs that people have commonly described as “tiny worlds”: droplets of water, and the small plants and fungi that grow underfoot.

Initially, Droplet was going to feature both plants and creatures interacting in their tiny droplet world, but I abandoned plans for the creatures due to time constraints. So, what's left is abstract, rainbow colored plants that sing when you tickle them!


The controls are simple:

  • Left click anywhere on the edge of the droplet (the large circle) to plant a seed. The seed will gradually grow into a tree-like plant of a random color.
  • Move the mouse cursor around near a grown plant to tickle it and make it sing. The faster and longer you tickle, the louder it sings. The sound each plant produces is randomly chosen from the “data/sounds/” directory.
  • Right click the trunk of a plant to remove it.
  • Click “Help / Credits” to view controls help and game credits.
  • Press Escape to quit the game.

To run Droplet, you will need Ruby 1.8.6 (1.9 might work), Rubygame 2.5.2 (with SDL_gfx, SDL_image, and SDL_mixer support), and Gamebox 0.0.4.

Droplet - End of Day 3


What's working:

  • Plants have a limited number of generations, so they don't start to slow everything down.
  • Plant colors, branch length, and various other attributes are randomized per plant for more variety.
  • You can rustle the plants by moving your mouse cursor around them. This makes them wave back and forth for a while, and will eventually make them “sing” louder.
  • I made a custom method for drawing branches, which is a bit faster than draw_line_s, and anti-aliased, but not as roundy at the ends.

What's not:

  • The algorithm for calculating how much you rustled a plant is a bit dodgy.
  • Still no sound. I'm definitely adding that tomorrow, though. I've got a few chime sound loops prepared, and I'll make some wind/pad loops too.
  • I decided not to use Garage Band due to time constraints and because I wasn't sure about licensing (since I'd just be making short samples). I'm using some nice chimes and pads from instead.
  • I need to a title and instructions and credits in the side bar.
  • Maybe add a way to kill plants that you don't want anymore?

All in all, though, it's coming together well. 16 hours left.