Something on a Sunday #6: Lots done

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…

Text

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.

Anti Grav

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)

Double Jump

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

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.
BONUS: Wall jumping
Not present in the video, it’s a work in progress. The idea was to have one character with walljumping abilities. Ultimately, I’m not sure it fits with the rest of the game, I’ll keep fiddling, but as cool as walljumping is – I’m not sure it works.

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.

Advertisements

3 Responses to “Something on a Sunday #6: Lots done”

  1. DoctorMikeReddy Says:

    Don’t get seduced and make the foot (story) fit the shoe (tech)!

  2. mikebithell Says:

    i hear you Mike, and I’m always someone to push the tech where it needs to be for the desired outcome.

    That said, this is a game first and foremost. I want a cool story and atmosphere, but level design and character abilities will always come first. Story will have to support and stay out of the way of gameplay.

  3. DoctorMikeReddy Says:

    Reassuring to know. I’ve just seen too many programming converts lose their way when given new toys. Hell, I remember when sober design types in the early days of HTML dIscovered (and abused) the tag and animated gifs, rendering web pages unusable; and that was when we all had 24k dial up!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: