Post To Tumblr 5

Post To Tumblr 5

Almost exactly 6 months ago I released Post To Tumblr 4 and today im proud to have pushed the 5th version of my popular Chrome Extension to the Chrome app store.

About a week ago Tumblr decided to change its security model which meant that my 34,000 ish users were now stuck. Unfortunately to get PTT to work required an entire rewrite of the way I handled users and posting to tumblr. Under the pressure of from tons of emails from angry users every day I set to work restructuring it all.

Now with version 5 users must authenticate with my backend:

screenshot_003

Then they can add one or more tumblr accounts to the PTT account:

screenshot_001

Which then seamlessly integrates into the app:

screenshot_010

The backend authenticates the tumblr accounts and stores the oauth access keys so that it can make calls to tumblr on the user’s behalf in the future. Its a much simpler system than I had previously, and it allows for multiple tumblr accounts which has been requested many times in the past.

The backend is built upon parse.com’s cloud service. Its pretty much a hosted node.js environment but I really like it because its really fast and easy to work with and has a very generous free tier :)

screenshot_011

I wrote the entire backend using Typescript which compiles down to JS which runs on parse, so that means that the entirety, client and server of Post To Tumblr is written in Typescript. A great feeling and utility as it allowed me to share code between the client and server.

I have an almost complete Parse.com type definition file now, surprisingly it isnt actually available on DefinitelyTyped but when I get round to it ill upload it myself.

In addition to the backend changes I totally restructured most of the client to use requireJS for nice modular JS loading. Im much happier with the structure of the client as a result and it feel less like guesswork and global-variable-spaghetti!

I hope my users enjoy it!

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.