The Making of Starcomet Online


The Starcomet Project started in July 2013 where I wanted to learn both Unity3d and how Unity3d works when it comes to multiplayer games.

It started out as a simple Game Jam game where I spent a few hours on how I wanted the game to work. But after a while I actually enjoyed playing it so I decided to continue working on the game and finish it up (I tend to try and complete most of my projects) – creating a few worlds, making a complete backend in Windows Azure to store player info for the multiplayer games and so on.

In other words, the game is created in Unity3d, and exported as a Windows Store game – a just for fun project! Smile

The game is currently only available to Windows 8.1 users, but a Windows Phone 8 version is under development (BETA stage).

See Section X for info about the download, or just follow this link (takes you to the Windows Store):


I .  T H E   C O M E T
The comet is what the player controls in the game, and it’s really just a few particle engines combined. Your job is to fly this as fast as possible, and try to maintain max speed as much as possible.

Two particle emitters are used create the front, and two to create the tail. In addition to this, the player has the possibility to add an artifact that can add another shape or look.

These are fully customizable by the player. By playing the game, more colors and shapes to create the comet you want will be available – by either playing the game, or buy from the Star Shop.

The comet is driven by forces, pulling the comet down (gravity). This force can be channeled as a forward driving force by the player, making the comet move forward instead of down, or even up if adding much!


Every time you make a modification to the comets path, it needs to build up the acceleration.

The controls are simple, just press space or touch the screen to apply a force. Gain speed by going as straight as possible (either up, to the sides, or down). Turning a lot will make the comet loose some of the speed and thus, needs to accelerate again.

It’s based on the typical helicave game, where you need to fly a chopper through a cave.

A simple formula is used to modify how fast the comet will move forward. In other words, try to fly as straight forward as possible to reach the goal.



I I .   N A V I G A T I N G
Navigating is simple. You need to find goal, and the direction to the goal is always present by a direction arrow:


Follow the arrow, and you will find the goal!

The arrow is a plane surrounding the player, and is rotated toward goal.

It checks the position of the goal, and calculates the angle of the vector towards goal, every frame.

(GTA style.. Smilefjes)


But, the direction to the goal is only that, a direction to the goal. You will need to navigate the space, avoid obstacles, find keys and so on to get there. So simply following the arrow won’t always help!

Luckily, there is another tool you can use to fid your way, and that is a path made of stars. It can be seen in every level. Following this path will take you to the goal – but the rest is up to you! Smile

The star path is a spline curve that moves from the start of the level, bending through the environment and ending at the goal. A particle emitter moves on this path to spawn the stars so the path is illuminated by stars.



I I I .   C O M P L E T I N G   L E V E L S
Completing levels is as simple as getting to the goal as fast as possible.

This means you will need to find a path that is as straight as possible to the goal. Every level got different types of puzzles to solve, from flying fast, to navigating a labyrinth of asteroids and rocks.


Most of the levels contains a set of Orions that can be collected to save 0.5 seconds. By collecting 3 of them, 1.5 sec will be deducted from your total time!

When completing a level, the total time is used to give the player a rating based on their performance (stars).

The game comes with 5 galaxies in total, each with multiple levels inside. But plans for expansions is in place, if the game gets any downloads!


Also, by completing the level, the player earns Starcredits – an in-game currency that can be used to buy items from the store!



I V .   C U S T O M I Z E
A big part of the game is the possibility to customize and create your own comet. You can buy new colors and parts from the store, and unlock them by playing the single player game.

There are three main types of customization, colors, shapes and artifacts.

The colors lets you give each part of the comet their own color, the shape modifies the physical look and the artifact can do a lot of different stuff (like adding dust from the northern light to your tail, or make the comet solid ++).




This is implemented in a simple way, just a lookup on the selected ID, and then change the material based on that for each of the 4 different particle engines. Also, the selected colors of the comet modifies how the explosion will look!


The materials are all in the same folder, with the ID as the name for easy lookup.


In this way, I have the possibility to change the look and how the shape will blend with the backgrund by just changing the materials shader and texture – creating many unique looking shapes with a lot of different possibilities.

V .   M U L T I P L A Y E R
The multiplayer race mode of the game is simply two (or four in later versions) comets that race against each other in real time. Create a unique looking comet, set a nickname and race against players from all over the world.

The selection of what level the players will compete in is random, but in one of the next versions, I will create shorter and simpler tracks for players with a low level, and longer and more complex for the veteran players.

The players gain XP by completing matches. The winner will get the most, but the looser will gain some. Also, the in-game currency Starcredits is also awarded.

The mechanism is very simple, the players customizations, tranformation, time and placements are communicated between each player in a peer-to-peer environment. When the player starts a multiplayer session, the player is given a unique room if no other rooms are available, or joining an existing room (automatically happening behind the scenes).

Starcomet Online skjermbilde 0

A timeline on the bottom of the screen is used to see where the other players are relative to you, and the view on the top-left is used to display who you are racing against, and what level they are.

To get smooth transformations between the players, the positions are interpolated between the last know position on the server, and the current local position. This is then communicated with the other players in the same room.



V I .   B U I L D I N G   W O R L D S

The game got one Unity scene for all the levels as there is a lot that is similar between everything – and then a prefab is created for each different level containing the position of the goal, each orions, keys (if any), doors (if any), the landscape and so on. When the game starts, the engine knows what prefab to load based on the level ID, and then instansiates it to the scene that represents the level.

Each of these prefabs are made in the Unity editor for simplicity (phew, didn’t need to write a Level editor for this game!!)


The items are just placed out in the prefab, and stored for loading by the game engine. Each item are tagged based on what they are (like solids, orions, goal) so the player can interact with them properly.

All these items are created as separate prefabs, so to add a wall, or a direction changer, or a key, all that is needed is to drag the proper prefab to the levels prefab and place it. The ground is created with the polygon tool.

Starcomet Online skjermbilde 2


V I I .   B A C K E N D   I N   W I N D O W S   A Z U R E
The games backend is hosted in Windows Azure using various services like Mobile Services and VMs. These can be simple lookup tables that tells us what level we are – based on total XP, how much XP we have, what unlocks has been done and what items from the store has been bought.

Also, transaction history and time stamps are stored for security reasons.
image image

The Windows Azure Mobile Services are free to host on a project on this scale, but if you are creating a big game with a lot of users, more options are available.


Also, a news feed located on the Main Menu of the game is displayed, so that I as the creator of the game can communicate with the players with different messaging. This can be news, known bugs (critical), competitions and happy holiday wishes.

I also added a function to the News System that enables me to give the reader of the news message an item. This can be like Santas hat on Christams eve and so on.

To handle in-app purchases I creaded a custom plugin project with a project for each of the plaform I wanted to support. This solution is created using Visual Studio 2013, and produces a DLL file that needs to be put in the plugin folder of the game.


I also created a test project for Windows Store, simply to test the plugin.

The Windows Azure Mobile Service is connected with a unique Live ID, enabeling a more secure login solution to the services using the bound Microsft Account on the device to create a game account.

Then the plugin was written for each platform – mostly the same as the two platformas are pretty similar, but a few modifications had to made for each.

V I I I .  S H O P
The game comes with a shop, where you can create a premium subscription, and buy additional Starcredits.

The game is created in a way that you can earn Starcredits by just playing the game a lot. But, also, the player can buy more if a desired item is needed quickly.

I like to enable the player to play a lot and buy the needed items instead of buying it if he/she wants.





I X .   D O W N L O A D
You can download the game for FREE here:

A Windows Phone 8 version is in the development.

X .   T H A N K S

A special thanks to Thomas Beswick for helping me when needed (Unity was a new tool for me), to Tuuli for support and mybrothers Olav and Paul for testing.

Also, thanks to all the testers in the Beta Program – more versions are on the way so be ready! Smile

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.