Size Five Games

SIZE FIVE is a BAFTA-winning indie video game developer.

You can check out the games we've made below, find out a little more about us here, or join in our snazzy forums here.

My email address is

You can also totally follow me on Twitter:

Making it Rain

Jan 232013

One of the things I’ve always been keen to try out in The Swindle is the idea that you can come back to the levels over and over. I didn’t want them to be like Green Hill Zone Act 1 where you whip through and never see it again, I want you to be able to explore and re-explore.

In order to keep that from feeling stale, I implemented a Day/ Night cycle, so the same level can feel varied depending on whether it’s an orange-y dawn, a purple-y dusk or pitch black night. Time of Day isn’t just about visuals, it’ll effect gameplay too. You’re harder to spot at night time, but they switch the lights on, for example.

Along with that, I’m adding in some weather, so it can now start raining. Here’s the tech of how it’s done.

(uh, you’ll probably have to click these screenshots to see what I’m on about)

The trouble is, raindrops are expensive; rendering every drop would slow everything right down. So first up, we’ve got a Plane with a simple seamless rain texture on it. That’s layered to the Background, and is only displayed by our Background camera. It has a little script attached to it that scrolls the texture, making it feel like rain.

Next, we’ve got a Particle System that spawns individual raindrops. Thanks to Unity4’s magic ability to have rain collide with World, rather than just planes, the raindrops themselves can be destroyed on contact with tiles and physics objects (stuff like the crates you see here).

As the raindrops are destroyed, they’re spawning two subemitter effects – the first is a simple splash to show impact. The second is a nice shader effect drawn in front of the objects, which distorts as it drips down.

Neither the RainDrop particle system itself or the heavy rain plane are particularly big; dropping rain over the entire map when you can only see a portion of it feels foolhardy. The WeatherSystem object was initially childed to the camera system, so they’d pan around with you, but this led to problems when you go into buildings, or underground. With the rain always spawning just above you but offscreen, it was possible to make it rain inside. So instead the WeatherSystem’s is its own object, and position is tied to the camera’s movements with certain restrictions in place. It never moves down below ground level, for example, so if you go deep into the sewers you won’t find it won’t suddenly start raining.

A few more Particle Systems attached to ledges and drainpipes for run-off, and it’s done! It’s amazing how something as simple as a spot of drizzle can completely change the tone of a level.


  1. Jan 232013

    It looks nice, I like the combo with a particle system!

    From the looks of it you already have several layers and thus overdraw. Aren’t you affraid of running into fillrate problems when using these fullscreen quads?

  2. Jan 232013

    So far the framerate tends to hang around 90fps, and frequently goes up to 120ish. Performance is fine on my quite-good desktop.

    If it’s an issue, I’ll worry about it further down the road. The good thing about the rain stuff is it’s quite scalable in the options. :)

  3. Jan 232013

    Thanks – I’m sure enjoying your blog posts on the little details you’re putting into this game.

Sorry, comments for this entry are closed at this time.