The Development of Space Tracer

How It Began

After suffering a bad injury in 2021 I had a lot of time to think. I had been wanting to dive into game development so I grabbed a notebook and a pen and started brainstorming. After spilling a lot of ideas onto the pages I decided I liked the idea of Space Tracer the most for my first game. I had a very clear idea in my head of what I wanted. A game that fits into the casual mobile game category that is simple but addictive that players can improve at over time similar to Temple Run & Flappy Bird. I came up with a story and some background and started thinking about features and the overall game flow. I wanted the player to use the touchscreen to control their ship. Which presented a challenge with Unity's input system.

A big feature I had to decide early on in the process was the player shooting. Shooting and destroying things is fun. Really fun. But on small devices you have limited space to give the player to control their character. I experimented with different ideas in the prototype phase such as: a player tapping somewhere or holding down on the ship but ultimately making the ship shooting automatically was the best way of doing it. I wanted the game flow and pace to be fairly fast so that the player feel like they were zooming through space and to add difficulty in dodging objects such as ships and lasers. With a notepad full of ideas and features ranked in order of must have to would be nice to implement I began development.

The Prototype

Placeholders, Main Mechanics and Enemies


To start with I worked on one of the most important parts of the game. Player movement. I needed some assets to create a small prototype and luckily there are lots for free on the Asset Store. I downloaded the Kenney Space Shooter Redux Asset pack which has some incredible sprites and some are in the final build! I delved into learning about how to handle user taps and input from the touchscreen. At first I made it so that when you tap on the screen the ship would immediately move there which was a start. Eventually I implemented dragging the ship by touching and holding on it and dragging the sprite around the screen. This worked pretty well then I realised that I needed to add some kind of invisible wall or barrier to the sides of the screen so players can't lose their ship outside the boundaries of their screen width. For the enemies there are three distinct categories of ships which can be seen in the about section from the main menu screen, they are: basic fighters, interceptors and bosses. Each category of ship has their own advantages and disadvantages. The basic fighters and interceptors reward the player with different amounts of points when they are destroyed. With the basic ships rewarding the lowest amount of points and interceptors rewarding the player with a good amount of points. Bosses give lots of points that increases with every new boss until the game loops.

A sprite sheet for a 2D space shooter from Kenney Assets.
A sprite of one of the main bosses of Space Tracer

Finishing the Prototype & Early Version

Waypoints, Waves and Balance


The waves were difficult to create in Unity and the solution for my game was using scriptable objects and waypoints. Each wave is an object with variables that can be adjusted for that wave, for example the amount of enemies to be instantiated (spawned) in that wave, the time between spawns and most importantly the path that they will follow. The paths are made up of waypoints and the enemy will go point to point and then de-spawn on the final waypoint placed but this happens off screen. In terms of game design for the waves I wanted them to gradually increase in difficulty, especially after each boss. There were multiple ways of adjusting the difficulty from the positions of the waypoints which gave players limited options to maneuver as the enemy's rain lasers down upon them to increasing the movespeed and amount of enemies in a wave. There needs to be a good amount of 'dials' for designers to adjust and playtest.

Mid-Development

Randomness in Game Design and Assets


An important part of game design is randomness. Randomness in any game is what makes it interesting. Whether that's loot tables, enemies spawning or in something like Flappy Bird the height and position of the pipes as you progress continuously changes. Now if the pipes were not random then players would eventually learn the pattern and get very quickly bored. For Space Tracer there were many elements of the game that were possible to randomize. I chose to add randomness to the shooting for the enemy and player, although the min and max time before shooting for the player is very small. I adjusted the firing times for the enemies based upon the category of the ship. They will shoot at a random point between a minimum time and a maximum time allowed between shots. For example if the minimum time was one and the maximum time was 5 then an enemy could shoot lasers every second or any time in between up to 5 seconds. This adds difficulty for the player as laser fire could happen at any moment the enemy is on screen. At this point the game was shaping up really well and I wanted to create some of my own assets. All the ships were drawn using Aseprite which is amazing software for pixelart. I also drew a few pixelart space backgrounds. For the music I took most of the soundtracks from OpenGameArt.Org and made the main theme for the game which can be heard during gameplay using Garageband on an iPhone.

An image of some 20 roll dice.

Release and Updates

When the game was polished I first needed to get the game into the hands of players and testers. As any game developer will tell you, you can play your game a lot during development to test things but players and testers will almost always find issues that you may have missed or happen under specific circumstances. Players and testers are also good at finding exploits if there are any which can really break the immersion of a game. I uploaded my game to Google Play and opened an Alpha test track and assigned some of my friends who were more than happy to test out the game. It was really helpful and a lot of small but important changes were made. Most notably to difficulty and the performance of the game as they had different devices. After some more polishing and small changes I moved into a Beta test and invited some more testers and went through the process again. I made a change to how the player movement was processed in Unity which allowed for smoother movement. This was down to my lack of knowledge about unity but it was something really useful for future projects. I made some UI tweaks and continued to balance the game and eventually the game was ready for release. The game was released in early January 2022 and did well with a small influx of downloads. However I did get some feedback from friends and players.

The most requested feature was a leaderboard system as the goal of the game is to get the highest score possible to compare and compete with friends. I looked into how to do this in Unity but Google Play has it's own leaderboard and achievement system in their version of Apple's Game centre called "Google Play Games". Google Play Games allows you to create leaderboards, achievements and even track in game currency! Using Unity with Google Play Games however is difficult. Luckily there have been a few plugins that have been made to make integrating the two together a breeze. I used the Cloud Once plugin. It has fantastic documentation and a very well designed interface which saved me hours in configuring leaderboards and as I will discuss now, achievements. Although the leaderboard system was great I wanted another goal for players to aim for and that is to unlock all of Space Tracers achievements. It was simple enough to implement through CloudOnce and running checks to unlock the achievements in the code. Now that achievements and leaderboards were now implemented I was happy with the state of the game and learnt a lot about programming and development and have discovered just how key testing is in the process of Game Development and I will carry these lessons with me onto my next projects.