I started a small side-project with websockets because I recently purchased a VPS that I can host the server on.

Multiplayer game development is something that I don't have much experience in, part from Chair Simulator which wasn't really real-time anyway.

Explosions, walking, colliding all work now with multiple people. Now I just have to make it into a game, with scores etc. Usually this is where I choke and give up.

I hope to release this soon, even without scoring. The interest in Chair Simulator motivated me to 'finish' it, and if the same thing happens with this project, then I may finish it too.

Seth Ladd's blog is a good resource. His name is all over dart resources. If you interested in Dart, then you should probably follow him on twitter too.


I'm still working on the level creation of the space game in the background. Some if it's in game already, but some only exists on paper.

Space Update

New features

  • Stars
  • Improved lighting
  • Sound effects


To make the stars I simply created a VBO of 300 randomly placed vertecies, and render them as points. The shader I created has only an X and Y offset passed in as uniform variables. The stars wrap around by using only the decimal portion (from 0.0 to 0.9999).

Improved Lighting

In the previous post, lights were only casting circle shapes. In real life, most lights come from the ceiling, and spread out. I've added a few more possible shapes for the lights to emit. The doors emit green lights when unlocked, and orange for locked (red is reserved for more serious things). This helps the player see more clearly when a door is unlocked.

Sound Effects

Adding sound was actually very easy, thanks to this post that I found on Stackoverflow. I'm mostly going to be using wav files, but the ability to dynamically create sounds is very interesting too.

Next up is triggering level transitions, and having more than one script for the whole game... and then maybe bears.

Dynamic lights and Bikes

In this video demo, I've attached lights to each of the 'items' in the level. The final product will have lights that cover more area, that can be in different colours, and that can also move or flash.

The demo also shows a little bit of the editor being used to place items, and the player moving around with gravity switching directions

To do the lighting, we first do a render pass of the level (to a frame buffer) with just the lights. The lights in the demos are just circles/ovals that face out to the edge. I used an additive blend to blend the lights together, which I quickly tested using this handy tool.

Click video to view fullsize

I've started testing it running as Javascript in the browser (instead of Dart in Dartium) and it works really well. I'm sure there are a few optimizations I could make, but its looking good so far. If I'm feeling generous, I might put together a demo level showing off the game's scripting abilities

I also made this woman on a bike, which I also posted on my new Tumblr page

hosted on tumblr

And finally, here's a good set of videos on starting to develop games, called YESDEV0

Super shiny

In my last post about my space game, I noted that it looks pretty flat. I've implemented something similar to this technique on RobotLovesKitty, and now it's super shiny.

The lighting I'm using is based on an image, or 'light map' to which the light will be rendered to. The one used here is crazy just for testing, but it shows the tiles, and the gaps between them.

There is also a normals texture to define the bumps per-pixel. I used the red channel for left-right and green for top-bottom. Here's the normals of a curved surface which I use as a reference

I'll need to think of some way to tone it down, and to turn of the effect completely for computers that can't handle it (probably mobile devices). Having dynamic lights that show the contours of the textures I think is going to help set the mood of the levels throughout the game.


Once this is fully sorted out, I'll get onto implementing levels to tell the story. (and I'll finish writing the story)

A bedroom with plenty of Space

I've been working on models for my McSpace remake. Here we have a wardrobe, a bed, and a couch.

The first 'act' will start in this room, so I'll need to space-it-up a bit more.

The lighting is flat too. I'm trying to think of an efficient technique for dynamically lighting the level. I tried a form of ambient occlusion, but the effect blurred the edges more than anything else. I might apply a light map over the whole level

I'm sharing some code

I'ver created a repository in BitBucket to share some common code, just in case others find it useful.

I'm sorry about the lack of documentation at this time, but BitBucket was all like "oh, i can't save your changes, so I deleted them"

The main thing in there is an exporter script for use with Blender, and some accompanying Dart code to use it in browser games or whatever

Space Levels

After giving up on using Box2D for Dart (the language), and then giving up on porting my Java code to Dart, I've started afresh.

I've learnt a fair bit about Dart, and how I want to program with it. Here's my 3rd attempt, with a level editor (in green space)

I've used the model from my previous post as the character (it still needs cleaning up) which I believe looks much better than my previous attempt.

The idea is to have the walls and floors filled in automatically, instead of needing to create a model for each possible combination. I can see that rendering so many small meshes (2 triangles) is inefficient, so I'll probably have to merge them into one after editing is complete.


One of the cool features in Dart is this:

bool get isItemSolid => _solidity ~/ 2 == 1;

It's a cool example of:

  • Arrow functions (one-liners using "=>")
  • Getters (looks like a field, actally invokes a method. Less clutter)
  • Integer division (no unnecessary casting)
  • Private fields (start with "_" always)


Updated with a quick video showing collisions, walls, and baked animation

Up and running

Recently I've been working on a run animation for my character. After tidying it up a little, and creating a new model (still WIP), i came up with this animation

I haven't seriously looked into skeletal animation/rigging ever since highschool, where i used a demo version of 3Ds max. I've decided to get back into it for game development because it brings so much life to a game.

For my space game, I'll be exporting every 5 frames to its own mesh so i don't get distracted writing another exporter/importer. In the future however I'd like to do a whole lot more skeletal animation.

McSpace Remake

I've decided to remake my Ludum Dare 27 entry, "Commander McSpace". You play as a spaceman who has to fix the gravity generator in a space station, by collecting parts and dodging obstacles.

For the competition is was written Java, and all drawn in 2D. To make it more accessable, and as a bit of an experiment, I'm writing it in Dart, with WebGL, using a port of the Box2D physics library. The code I write in Dart will be compiled into Javascript that most people can run.

Here's what it's looking like at the moment:

My experience with Dart so far has been good. It's much more structured than Javascript, so it's faster to develop and debug, and also leads to much more manageable code. The IDE available on the website is based on Eclipse, but it really cut down to focus soley on Dart.

The game is in its early days of development. There is only this one test level, and there are no story elements yet. There are many more 3D models to make, and I need to replace the derpy looking man, perhaps with a customisable character, with proportions like characters in the Scott Pilgrim game, shown here, but in 3D. I am also working on a better lighting scheme, possibly something like Ambient Occlusion.

Edit: Video of the buggy Box2D

Remake time?

I've been toying around with remaking one of my Ludum Dare game jam entries, Commander McSpace in javascript, so more people can play it.

It would alow me to use a port of the Box 2D physics engine, and i could use WebGL!

Here's a mockup I made

But for now, its just a mockup. I think i want to finish another ongoing project before getting into the code with this one, so for the meantime I'll be restricted to my sketchbook

Recent Posts

Random Posts