Oh, hello there.
So. Life got in the way again. Friends’ wedding, a visit to Aardman* and an increasingly hectic schedule in London all conspired to keep me off the blog and out of the editor.
Even though this is my first weekend with access to my computer in a few weeks, I’ve managed to catch the odd couple of hours of evening scripting along the way, and actually have quite a few new features. The video below shows the key ones. Please note: the character abilities, shapes, jump strengths etc are placeholder, I’m adding stuff as I go.
Also, that rain effect is getting dull.. need to begin working out where I’m going to source some music…
The text used in the video is being rendered in game. The original prototype did at one point feature static text on each level, telling the story and a few jokes. Ultimately, I removed all but the opening and closing text for that release; it was written in about half an hour, and it showed :). With this version I wanted to incorporate text again.
The suggestion to do script triggered text that updates mid level as you progress came from friend and colleague Imre Jele. It’s a cool idea, and this implementation is a fun first step. I want to clean up the transitions, but it’s cool to see them animating in. This uses the built in unity GUI btw, I just created a new label skin, and a really simple transition manager to make things a little prettier.
I wanted an anti gravity character from the start. Unity, by default, uses a global gravity value. The best way to achieve consistency seemed to be to turn off the default gravity, and run everything off my own gravity script, which can be flipped on a per character basis.
There was an issue where gravity strength was frame-rate dependent, but I just needed to read up on how Unity handles updates, and it was quickly sorted (thanks to those on twitter who jumped in with help and suggestions)
Again, really straightforward. Just needed to loosen the limits on the jump. As with antigrav, it’s now a simple tick box on my character preset
Water was a lot of fun to get working. In the original prototype water has no collision, it’s just a death trigger. I wanted my water to allow buoyancy and feel like liquid. I came up with a vastly simplified water physics system (greater the downward force and depth, greater the upwards competing force) which makes for reasonably realistic animation. It’s a bit bouncy, I’m working on that :). Water also has a current variable, so it can wash characters in a certain direction.
I realized midway through that swimming characters were fun, so one will be added. Non swimmers like Fred in the video above are non buoyant and sink, with a little resistance provided by the viscosity of the liquid.
Visually, a few simple elements combine to make for a satisfying visual that fits with the game’s minimalist aesthetic.
- Sine bounce: Really simple position bouncing on a sine wave so it eases in and out a bit. Different water can have different bounces, so I can do turbulence or steadiness. Considering adding turbulence at each character impact, could look cool.
- Gradient texture: Simple PNG gives a basic depth to the liquid, which looks great when it sine bounces.
- Surface ripple: Kinda subtle, might not show in youtube video. A variable thickness line of black is drawn at the surface of the water. This effect is achieved by horizontally stretched particles, resizing and varying in opacity while moving randomly from side to side. This creates the illusion of surface rippling which I wanted, and really sells the water.
Right, a nice big update done, thanks for reading. Fingers crossed the blog can update more regularly going forward.
*which was awesome, those guys are incredible.