Game Dev Diary – Part 2 – Living with Chaos

Living with Chaos

Hey guys Nemo here. Last week in our Game Dev Diary blog I went into the importance of having a game design document and gave a concise version of my design document of ‘Delirium’ a top down sci-fi action game set in a spaceship with a variety of bosses. You can scroll down to read up on it if you missed out on last week’s blog. With a readable, understandable and detailed document in my hands it was time to develop. This week was all about coding the game.

One Game Engine to rule them all.

Over the past 4 years, I have come across and have used a number of Game engines; Games engines that are free such as Unreal Engine 3, Game Maker Studio, Flash + Flixel and Unity3D. There has been a great debate on the internet and between my colleagues about which Game engine is the best. Many have argued that Unity3D is the one to rule them all. However I have found that Unreal Engine was a brilliant for developing games that were first person shooters. Game Maker Studio excelled in 2D pixel perfect games. Flash was efficient at vector art based games. And Lastly Unity3D which was the jack of all trades when it comes to Game engines. It’s not the greatest engine for a first person shooter game, nor was it the greatest for 2D pixel perfect and vectors games. They all had their own pros and cons. The point here I want to make is:

“There is no one Game engine to rule them all.”


When I choose a Game engine for a project, it boils down to two things:

  1. Familiarity
    – Learning how to use a new Game engine isn’t hard, but it is time consuming. Time is something you cannot obtained back. There is little point in learning a new engine or language just to obtain the same result. Use an engine that you are most familiar with.
  2. Situational
    – Sometimes it’s better to choose a Game engine depending on your needs. If you are trying to make a precise first person shooter, its wiser to choose an engine that already has it built in like Unreal Engine rather than having to code the system from scratch to your own engine. Sometimes, the engine your familiar with might not have the functionalities that you want your game to have. An example of this would be trying to make a 3D game on Game Maker. There’s going to be a 98.9% failure rate.

Just choose one, and stick with it. Or you could make your own engine.

Chaos Manager

I chose to use Unity3D for this project as I have made many of my games on it and have become accustomed to it. One major problem that I have found using Unity3D was the sheer amount of chaos it can produce. Unity handles the main game loop logic(mentioned previously here) for you behind the scenes which can have nasty side-effect; It becomes extremely difficult trying to control the flow of the game loop. Without this control, you are no longer able to exactly know when each individual objects call their respective functions, they become independent. Not only that, it becomes much harder when looking back into your old projects. You or any new members to your project trying to understand your project will not know where the program begins. It makes it difficult to implement new functionalities/features to the project without having to go through every single objects in the game. This is the Chaos. So how do we control this Chaos?


This is where the Chaos Manager comes in, it is also commonly known as the Game Manager. So what is the Game Manager exactly?

  • Instantiated once
  • Handles game states and controls the flow of the game
  • Saves persistent data


Singleton Pattern

A Game Manager is designed to be a singleton pattern. Singleton pattern makes sure that there is only one instance of Game Manager allowed at any given point in time. We only ever want one instance of game manger in the game scene so that it can control the flow of the game. I won’t be going into the details of what a singleton is as it is explained much better here.

There are many ways of implementing a singleton design. The general Pseudo code would be:

if  uniqueinstance_gameManager is NULL
then create the gameManager
return uniqueinstance_gameManager;

Game States

Every game has game states : Start -> Play -> Pause -> Die -> Game Over, etc. Game Managers hold information on game states. By holding onto this information, game states allows us to control the flow of the game. Each state lets the game manager to know what game Objects to instantiate at what time. This allows for neater organisation of code, and makes it easier to identify where the game beings and ends.

These data are usually stored as a enum, accompanied by a handler and a getter/setter.

public enum GameState { START, MAIN_HUB, BOSS_ROOM, CREDITS };

public delegate void OnStateChangeHandler();

public GameState gameState {get; private set;}

Persistent Data

Since game Managers have a singleton design it allows us to have access to be persistent data. Data that will not disappear throughout different scenes of the game. This allows for some awesome things to happen. With persistent data, you are able to save player information, carry their stats, weapon of choice, last location, death counts over to different scenes. I shall talk more about this next week.

So Far

  • Implemented GameManager and state controllers
  • Implemented new rooms and scenes
  • Sweet camera panning between rooms
  • Updated movement and weapon system
  • Working on AI implementation of first boss

oqOxXR4 oc945Fc


Game Dev Diary – Part 1 – Living with Milestones

Game Dev Diary – Part 1 – Living with Milestones The Plan

Hey guys Nemo here, this week has been the official start of the holiday. With all my uni projects and contract work finished, I am free. I’ve been pretty pumped up for this holiday. This is the first holiday where I have had zero projects on my hand. It was such a relief but after the first day it was strange not having anything to work on. So, I decided it was time for a new project. After a bit of brainstorming on how I wanted to spend this 5 weeks, I boiled down to two main tasks. These are:

  • Game Development – Develop a prototype of a game that I’ve had in mind for  the past few months. A game that I can post to TigSource
  • Blogging – Post a blog at the end of each weeks about the progress of the game development.

And so it begins – The five week challenge.

The Game Design Document

We begin with the Game Design Document, this document describes the entire project, with all the details, and the methods by which each element will be implemented. It should encapsulate both the body and the soul of your game. By writing a design document it helps ensure you from wasting time, indecisive choices and from adding new features (otherwise known as feature creeping). It is like the blueprints of a building. When it comes to writing a design document there isn’t a golden template or rules to follow. However from my experience of writing and reading game design documents I’ve come to realise a few common traits that a good design documents have. These are:

  • Readable – People shouldn’t have to squint their eyes. If you have messy handwriting, stick to writing your documents on word. Learn to use good page layouts – eg. plenty of white space, easy on the eye fonts, bold headers.
  • Understandable – People shouldn’t get bewildered by your document. Dumb down the words. This isn’t 4unit Advanced English essay. Sometimes words aren’t the best choice either, you can sketch out your idea.
  • Detailed – Don’t tell them the “what”, tell them the “how”. eg. A bad example: A player can move in the game. A good example: A player can move by the keyboard or a xbox controller. On the keyboard he would use wasd and on the controller he would use the left joystick.

I realised that a good Design Documents are an essential to any projects and not just game related. The difference between a successful project and failed project can be reflected by the design document.

So Far

The concise version of my design document. Delirium, a top down sci-fi action game set on a cargo spaceship. Players will be put in a fast paced battle against a variety of bosses, in which they have to learn each of their weakness to defeat them. Upon defeating them they acquire new traits which can help them during other boss encounters. Features:

  • Intense and interesting boss battles
  • Players can shoot or use melee attacks
  • Players acquire traits such as dodge roll, different weapons
  • Players have 2 hit life system
  • Intuitive tutorial and gameplay
  • Swift and precise movement
  • Controller movement allowed
  • Pixel art – inspired by Crawl
  • The game draws its inspiration from Titan Souls and Mega Man

Untitled-Untitled-2 Placeholder art and basic functionalities of the game.

Well that’s about it for now but more to come over the 5 weeks! First week down, another 4 to go. Till next sunday! Stay well and keep productive. 🙂 Nemo Out