Search
Games in Progress

Check out my current progress on Maze Rover.

Dev Blog

Play Current Build

Twitter Feed
Navigation

Entries in Game-Dev (6)

Monday
May302011

Maze Rover Prototype

After working on a number of titles for various clients, I've decided to launch into releasing my own game. The current working title is Maze Rover, and I've just set up a page here to show how the prototype is developing and get some feedback on the gameplay.

There is more info about what I'm trying to achieve on the other page, but I thought I'd talk a little here about what new and cool things I've learnt in the process.

Super fast serialization/deserialization

 

Maze rover is, as the title suggests, a maze game. Each level is a different maze. Alongside my Unity project, I've also had to make a level editor in order to draw the mazes. For this, I used pure C#, WPF, nothing to do with Unity. 

Here is a screenshot of the, incredibly ugly, level edit in action.

 I created a C# library, that both the level editor and the game would use, that contained my maze classes. Square, Bonus, Dimensions etc. The next question is how to get the info out of the editor and into the game.

What I'm talking about here is serialization/deserialization. I've already done a post on my final solution, protobuf-net, but it's interesting to document what extra technology I had to learn to get this to work properly.

The max size of my levels at the moment is 48 x 32 squares, or 1536 square. The way I've set it up, there is a maze container with a 2 dimensional array containing all the squares. My initial use of XML serialization wasn't very promising, with it taking hundreds of ms to deserialize in the game. With protobuf I think I'm averaging 10-15ms. Great improvement.

Dynamic Mesh Creation

 

After reading in the maze for a particular level, the next step is to create the maze. I initially started with creating pre-fabs of each type of 'square' and instantiating them one after another. But, as I suspected and is pretty obvious, this is not very performance friendly. Even if they are just simple squares, having 1000+ objects in a scene is just scary.

So, meshes. I didn't know much are creating meshes before I started this. But I looked at a few examples and realised that with a bit of maths, they are not too hard to create.

Here is a screenshot of the maze mesh.

Pretty simple, but dramatically more efficient that previously. Although I create the meshes using squares, they only contain the faces I need and each face is UV mapped as appropriate. In the pic above that is not shadows making the sides seem darker than the tops, it's just a darker texture. In fact, I'm not using any lights at all at the moment.

UIToolkit

 

For an in-game HUD solution I was initially going to use GUISpriteUI, which was created some time ago by Prime31, but when I went to check on progress he had released a whole new solution, UIToolkit.

Users of GUISpriteUI will understand how much better the new system is. No more mucking around with UvRects and ruining everything when your atlas is changed. UIToolkit uses TexturePackerGUI to do the work for you and, most importantly, now supports fonts.

So, long story short, 1 draw call now does all my HUD. In the pic below there are 13 HUD elements (not counting the FPS counter) that are all done in the one call. FYI - Crappy graphics are placeholder, don't freak out ;-)

If you've previously used GUISpriteUI and got frustrated by certain aspect, I highly recommend checking out UIToolkit. Things are so much easier and bug fixes and improvements are being added regularly. It's (kinda) open source, with Prime31 giving out GIT access to certain posters on Unity forums.

Stay Tuned

 

I will hopefully get some good feedback from releasing this prototype and it will all go in to making the game even better. Once I get the theme nailed down, I'll be looking around for artists to create the assets I need.

Hopefully we're looking at a release in the next few months.

 

 

Thursday
Apr072011

Major update to Spartan Athletics approved

After a bit of a marathon effort, version 1.1 of Spartan Athletics is now available in the app store.

Now, I'm just the coder for this project, but if I was the owner I'd have called it version 2.0 at least, because a lot has changed since the original version.

It now has all ten events available, as well as bluetooth multiplayer support and a whole heap of improvements and bug fixes.

But getting it approved was not easy. A while ago I updated my 3GS to iOS 4.3 without thinking, and of course that meant that I had to update XCode to 4.0 to be able to build to device. Only then did I realise that perhaps this wasn't the smartest move after looking at the growing number of threads about the problems people were having.

One major problem was that the plug-in I used for bluetooth was definitely not compatible with Xcode 4.0. I used Prime31's 'GameKit Bluetooth/WiFi and Voice Chat' plugin. That runs some magic little scripts when you build in Unity to set up the Xcode project and they were broken. But, due to the awesomeness of Mr Prime31's service, after a quick message on twitter I was sent a beta of a 4.0 compatible version of the plugin.

So all seemed good, and the plethora of ad-hoc builds I'd done using Xcode 4.0 all worked fine, on iOS from 4.2.1 to 4.3.1 and iPod touch, iPad and iPhone. So we submit it to Apple and pretty soon get a rejection letter.

We found that your app failed to launch on iPhone 4 running iOS 4.3.1.

We encountered the issue when selecting the application on the Home screen - the app displayed a launch image then quit unexpectedly. This may be because iOS 4 uses a watchdog timer for applications; if an application takes too long to complete its initial startup, the operating system terminates the application. 

For information about the watchdog timer, please see 
Technical Q&A: Application does not crash when launched from debugger but crashes when launched by user..

Another possibility could be a missing entitlement. For more information, please see the 
Technical Note: Resolving "0x800003A", applications not launching and "missing entitlement".

For discrete code-level questions, you may wish to consult with 
Apple Developer Technical Support. Depending on your questions, be sure to include any symbolicated crash logs, screenshots, or steps to reproduce the issues you’ve encountered.

To appeal this review, please submit a request to the 
App Review Board

I had no idea what was wrong, and the documents that Apple linked to were not very helpful. But, I figured that maybe I had messed up in the signing process and used the wrong distribution profile or something. So I re-did it carefully and tried again. Nup, still rejected.

Then we finally found this thread on the Unity forums. Luckily I still had the Xcode 3.2 installer. So I installed that and re-build in Unity with the target SDK set to 4.2 and re-submitted.

Success.

Bloody hell Apple, you sure don't make it easy for us developers. Between the provisioning profile clusterf*ck, the insanely diffucult iOS downgrade process and the almost five gig Xcode downloads for even miniscule version updates, the world of Android development is looking better and better. 

But you're still where the money is... and that's why we love you.

 

Wednesday
Mar092011

Spartan Athletics

Whoa, no posts for a while, but that's because I've been busy working.

Last year I teamed up with Adelaide web/games developers Soda Cube to develop an iPhone game, Spartan Athletics.

Spartan Athletics is set in ancient Sparta and features ten track and field events that players can participate in.

Those are screenshot's off the iTunes page showing the Javelin and Highjump events.

I was the sole coder for this project. It was a lot of fun to develop. For anyone interested, it was all coded in C# in Visual Studio Express 2010 using Unity Pro. I used the Prime31 'GameKit Bluetooth/WiFi and VoiceChat Plugin' for the bluetooth multiplayer stuff and their/his? GUISpriteUI library to cut down on draw calls in the HUD.

iTunes store link is here. I've just completed a big update too. In the new version will be the full ten events (original version was released with just six) plus bluetooth multiplayer so you can play against your mates. There will also be a bunch of tweaking and tuning to get the gameplay just right. Stay tuned.

Wednesday
Apr072010

Hardcore Parkour Game - Test run 

Hardcore Parkour is a little test game that I've been working on for a while. It's kind of almost at a playable level so I thought I'd put a version up here.

Obviously nothing has been done in the way of Level Design and Textures and Sound and many other important things, so don't judge it on that. I'm just testing out the gameplay potential of this kind of game.

The setting of the game is that you're a little alien dude who needs to get the highest score or else his home planet will be destroyed to make way for a hyperspace expressway, or something like that. Basically you just want to make the highest score.

Scoring is done via either

  • Collecting the little glowing cubes
  • Doing tricks

Here are the controls. Basically using a classic FPS keyboard setup.

  • W, S, A, D for forward, back, look left, look right
  • Arrow keys for spinning while in the air
  • Space bar for jump.

 

Now there are a few bugs in this version, and obviously it needs a whole bunch more work to get it to a playable game, but I though it would be interesting to show how I'm progressing.

(There does seem to be a OnGui performance bug that I think is related to string manipulation and the resultant garbage collection. That makes it jump every now and then. I'll try to get onto that soon. I haven't even looked at optimisation yet so I'm sure there are loads of performance improvements to be found.)

Also, this is using my newly hacked together 'load on demand' javascript. I think I'll make a new post about that.

No images? Hello 1993

Tuesday
Feb162010

My Unity Development Environment

Since I'm a little too early on in the Game Dev process to show people any product, I thought I'd write a little about the tools I'm using. 

I'm just going to talk about the windows side at the moment because I've only just bought my first Mac (sweet 21.5" iMac) and, as ashamed as I am to say it, I don't really know my way around it well enough yet. But I just bought Unity iPhone so the cost of that will push me to dive in no doubt. 

My main focus ever since I saw a demo of it is Unity. God damn, the first time you see an impressive game running in the browser. I think my first taste was the ever awesome Off-Road Raptor Safari by Blurst (although now they only let you play on facebook which is a bit shit). Then when I found out it allowed programming in C# I was hooked. 

So I sold the cat and bought Unity Pro. 

For the code I use Visual C# Express because it's a great IDE. I used to use the SyncVisualStudioSolution.cs add in but (I just realised) Unity 2.6 actually has Visual Studio integration so perhaps I don't need that script anymore. 

I've been developing in C# with Visual studio since about 2002 and you really can't get a better editor. I can't wait to try out the release candidate of Visual Studio 2010, but not sure if that one will work out of the box with Unity. 

So, you've got Unity and VS, what else do you need? Well, probably a horribly expensive 3d tool. But, since I know nothing about 3D modelling I've left this alone a bit. I have played around with the open source package Blender but that only taught me that I need to hire a 3D artist. 

For source control I use Git with Tortoise Git for better windows explorer integration. Although I haven't got too complex with them I must say they are pretty easy to use and very functional. At my boring, non-gaming programming half-day job we use Rational Clearcase and that thing looks like they stopped development in 2001. Which they probably did when they realised that huge defence companies would blindly pay $XXXX a seat for life rather than investigate potentially better open source alternatives. 

Anyways... 

So after source control you need backup, and I'm a sucker for that silver tongued Leo Laporte so I gave Carbonite a try after his suggestion (ad) on TWIT. But it was pretty good so now I've signed up to that for a year. It's a pretty set up and forget type product so I'm pretty happy with it so far. 

Oh and then there's hosting. 

I already had a Linux Virtual Server with GoDaddy but then (again thanks to Leo) I tried Squarespace and realised that all I really wanted at the moment was a simple webpage with a blog and they do that well. When things get going I will need more control though and probably have to move away from here. With the super-duper premium package here they do let you have users that can sign themselves up and stuff, but they don't (I think) give you actual access to the database, plus you can't run any server side code of course. 

So for the short term I'm going to go with two solutions. Use Squarespace for the shiny webpage and just use javascript to talk back to the database I have on GoDaddy to fetch simple results like scores and stuff. Hopefully I get to the point where I need more than that soon. 

That's it for today's nerd out.