Since November 2019 I have been spending my time trying to learn video game development. I started by taking an excellent free course on EdX. Which took me until the end of 2019. I then did the Ruby’s Adventure 2D tutorial in Unity which took another week or two.

Since then I have been making my own mini-games in Unity to try and increase my skills. In this development journal, I will post about what I created and what I learned during the process.

My goal is to spend 6 months to a year making a series of short games I can create in a few weeks each. Once I think I have the skill I will embark on a larger project that I can hopefully sell.

Escape The Guru: 9 Jan – 23 Jan

Escape the Guru is a zombie inspired game about trying to start an online business without getting sucked into a pyramid scheme by predatory ‘gurus’. Collect powerups in the form of useful books or free YouTube videos and make it through progressively harder levels.

Play Here

Best played on computer but it should work on most modern smartphones too.

Use the keypad or touch to control the character.

Here are some clips:

Skills Learned

This was my first attempt at creating a game from scratch in Unity. So a lot of the learning was just around how Unity worked. Nothing I created for this game was groundbreaking. Although I did try and come up with solutions myself rather than spam Google.

  • Simple procedural map generation. I wanted to have the game potentially go on forever so needed to find a way to do that. This involved creating a world builder script that took in the different type of tiles and then built ‘roads’ the player could take from start to end. The size of the map and number of enemies varied based on a function of the current level. The hardest part was doing the corners of the walls.
  • Touch and keyboard input control for player. Something fairly straightforward but new to me.
  • Transitioning between animations. I didn’t create the animations (I used a package to generate the characters). But I did have to sync up the animations with the user controls. This needs more work as my solution was botched.
  • Building a user interface. The arrow that shows you where to go was actually quite complicated as the locations on the user interface are on a different scale to the images on the map. So needed to learn about converting from screen space to world space.
  • Speech bubbles above the zombies. A bit more complicated than expected and needs a better solution from me. I created a text box manager script that you could add to different characters to have different text. But I’d like to make it resize to fit the text correctly in future. Plus it looks really cluttered.
  • Simple Coroutines. Most things in the game happen linearly and can finish before anything else happens. But the flashing when the player is hit is an example of something that needs to happen simultaneously. To do this I had to learn about coroutines.

What I didn’t do but would in a future iteration of the game:

  • There is no pathfinding. The zombies just walk towards player regardless of what is in their way.
  • A boss level every 5 levels would be good.
  • High scores for levels passed to give something to work towards.
  • Speed powerups. Pacman like powerups.
  • It currently gets exponentially harder each level. Ideally it should be logarithmic. (the difficulty increases by a smaller amount each level).

Colony Of One: 23 Jan – 15 Feb

Colony Of One is an ant simulation game. You lord over a nest of ants that you can only control by dropping pheromones for them to follow. Help them find food and breed new ants to grow your nest.

Play Here

Won’t work on smartphones:

Or watch a video of it here:

Skills Learned

Apart from being 2D, this game was mostly new skills.

  • Simple AI. The ants have four states. Looking for food, in which case they like to follow pheromones. Eating. Returning home (once again following pheromones but keeping an eye out for the nest). And finally dropping food. They are very stupid but are my first go at AI. So how do they interact with the pheromones?
  • Collision boxes and raycasts. To get the ants to be able to see the environment around them I used raycasts and collision boxes. A world generator script places all the pheromones at the beginning of the game. Each one has 2 collision boxes. A small one for the ant to trigger (increasing the pheromones at that point). And a bigger one to detect if the mouse is anywhere near. The ants constantly stop and ‘smell’. This launches a circular raycast which returns any collision boxes in front of it within ‘smell distance’. It then decides where to go based on a hierarchy of desires. Normally choosing food if available, or strongest pheromone if not… with some randomness to make it more realistic. Not sure if this is a bad implementation performance-wise.
  • Joint Animation. I drew the ant in photoshop and then animated them by building a skeleton which moves in-game. Good for non-artist like me. Not sure if it is a bad idea performance-wise.
  • Input controls for moving the map. Rather than your input moving a player, instead it now moves the map or interacts with the UI or pheromones.
  • Disappearing Food. As the food gets eaten it gradually disappears. Currently the pieces don’t fit together properly and I can’t understand why. I think it may be something to do with anti-aliasing.
  • C# interface to control the buttons. My first go at building extendable C# scripts. A bit unnecessary considering there are very few controls available to the player, but makes it much easier to add new functionality later.
  • Tooltips. Shamefully stolen from this video.

What I didn’t do but would in a future iteration of the game:

  • Add enemies.
  • Add old age to the ants.
  • Add more options for the player.
  • Add obstacles and pathfinding.
  • Learn about performance. How can I get it to work equally well with 10,000 ants.