July 2014 Posts

Mr Nibbles – Mobile Testing

Mr Nibbles – Mobile Testing

This will be the last update for a while as I am heading up north WA for 3 weeks from tomorrow but before I went I wanted to get the game running on my iphone so I could test it while I was away. After a few accelerometer tweaks im glad to say that the game works just fine on Android and iOS:

The frame rate is great (on my iphone 5 at least) so im happy with that. While i’m away ill do some pen-and-paper level design, kind of tricky when the levels are 3D but ill give it a go!

Mr Nibbles 3D – Skyboxes and Fake Shadows

Mr Nibbles 3D – Skyboxes and Fake Shadows

After that short interlude im back to games development. This time its more work on Mr Nibbles 3D.

I decided to experiment with Skyboxes. I have never worked with them in Unity so I didn’t know how hard they would be to get working. I shouldn’t have been worried, as with most thing in Unity, it was a piece of cake. Unity even ships with some default Skyboxes so I chucked one of those in.

In the above video I also demonstrate another thing I worked on, shadows. Unfortunately realtime shadows are a Unity Pro feature which I currently don’t own so I decided to have a go at faking shadows.

Its surprisingly simple, I just cast a ray in the direction of gravity from Mr Nibbles until it collides with a tile, when that happens I place a “shadow” sprite:

screenshot_011

The further the distance from ray to collision the lower the alpha transparency value to indicate a fainter shadow. Its surprising how much more realism this instantly adds to the game.

This method does however have its problems. Such as when Mr Nibbles overhangs a cliff:

screenshot_012

You can see the problem in the screenshot above, Mr Nibble’s shadow should wrap around the tile rather than hang in the air. One solution to this which I experimented with is to use projectors. Projectors are like light sources but in reverse, they cast shadows onto the scene. By placing one so that it followed Mr Nibbles and pointed in the direction of gravity you could create the effect of a shadow:

screenshot_013

You can see that the shadow no longer overhangs the tile as it is cast directly when rendering rather than being a separate game object. Unfortunately it turns out that for this to work you cannot cast onto Transparent textures, and as all the tiles in Mr Nibbles must support transparency so that they can fade out when Mr Nibbles obscures them this technique could work.

Oh well. Ill have to wait till I have the pro version of Unity to implement dynamic shadows, either that or I can try to write some code to minimize the overhang problem.

Unity Ashteroids – Ash Game Framework in Unity

Unity Ashteroids – Ash Game Framework in Unity

I decided to take a break from the game development today to scratch an itch I had had for a while.

Its no secret that im a fan of Entity-Component systems having used various flavours of them for years. My particular favourite however is found in Richard Lord’s Ash Framework. I have used it on numerous projects including my 3-game prototype challenge.