There's a small open-source game called Sand Traps. It's about sand, not water, but the mechanics are rather similar. The game is for Wii homebrew, but maybe you can still learn something. Here's the WiiBrew page (liks to source): ► http://wiibrew.org/wiki/Sand_Traps And here's a gameplay video where you can see the code in action: ► http://www.youtube.com/watch?v=RkqxoJV1tGM