About us  |  Facebook  |  Twitter  |  Newsletter

September 8th, 2011

Getting the water flowing

Determined to make the fluid labyrinth, I implemented a 2D fluid simulator based on work I had previously done for 3D simulation and high-end machines. Here’s a short clip from the 3D version of the fluid simluation:

Adapting the code to run on iPad required starting over from scratch. Even though the iPad is a powerful machine, it doesn’t compare to a quad-core desktop PC (yet!). So performance was an issue, not only in the beginning but throughout the entire project. This is partly because we’re really old-school when it comes to frame rate and wouldn’t release anything that runs at less than 60 frames per second. Especially for a game based on liquid it’s particularly important that the game is flowing.

Henrik created a couple of concept images for the fluid labyrinth based on photographic realism. Beautiful, but pretty far from today’s Sprinkle right?

For level design, we made a PC version so that we could draw polygons with the mouse and using keyboard shortcuts for input. This is a video of a very early version of the fluid labyrinth that I saved on my iPad. I remember showing it to a couple of friends at a restaurant and the initial comment was “What’s that? The water looks really ugly!”. In retrospect I think they were right, but the fluid simulation is actually very close to what is being used in Sprinkle today, just with lots of added shaders and eye candy:

The fluid labyrinth had two fundamental problems:

A) It was really hard to design challenging puzzles.
B) It wasn’t fun!

The main problem with A was that we allowed tilt in all directions. To circumvent this we disabled upwards tilt, but then it felt unnatural that the fluid didn’t fully respond to the device motion. B was of course an even bigger problem. We tried this on a lot of people and got an occasional eyebrow, but never that Wow!¬†response we were looking for.

We tried some variations of the labyrinth with a gold fish named Lipsy, swimming around in the water. Your goal was to slosh Lipsy around by tilting the device and get her back to the fish bowl while at the same time keeping her in the water. Do I need to mention this was a terrible idea? Here is Lipsy:

Lipsy

Lipsy

This is where we gave up on the labyrinth and the idea of spraying water entered our minds. Next post will be on the early versions of Sprinkle as we know it!

 

Jeppe Nygaard Christensen
November 22, 2011 at 10:33 pm

Hi there!

Thank you for a great game! … We have been spraying ourselves through most levels already :)

I am less than a mediocre indie game developer, and the thought of being able to simulate water on iOS devices blew my mind. I’m not trying to convince you into sharing all your secrets but would you consider telling me a. Is all fluid sim in sprinkle 2d and if not how did you manage meshing all this fluid realtime? b. Do you know if there exits a 2d fluid sim solution suitable for unity3d?

Thanks again
Jeppe

Reply 
mediocregames
January 1, 2012 at 5:02 am

Hi, I’m not aware of a fluid sim for Unity3D. The simulation in Sprinkle is in 2D and built from scratch. The rendering of the fluid is based on particles. Check the technical blog post on tuxedolabs.blogspot.com for details!

Reply 
aj
December 30, 2011 at 1:02 am

nice post, i like the game and how it evolved. is this engine based on cocos2d or is it built from scratch?.

Reply 
mediocregames
January 1, 2012 at 5:00 am

Thanks, the engine is built from scratch, but uses components like zlib, Box2D, etc.

Reply 

Leave a reply

Your email address will not be published.

Copyright © 2013 Mediocre AB.