Build an Asteroids game in Unity with JetBrains Rider

Recreating a version of the classic arcade video game

In this tutorial, you'll build a game inspired by a retro classic: Asteroids. In this game, the player controls a spaceship that can rotate left and right, thrust forward, and fire shots at incoming asteroids.


When asteroids are destroyed, players' scores increase, and when asteroids hit the player, the player's health decreases—eventually leading to "game over".

If you would like to play the Asteroids game I built with Unity and JetBrains Rider, you can try it here.

This tutorial assumes you have Unity Editor installed (I'm using the LTS version 2022.3.21f1 when writing this tutorial) and have JetBrains Rider configured for editing scripts.

Tip: You can find the source code of this tutorial in our GitHub repository.

Note the repository contains an evolved version of the game, with audio, extra gameplay elements, and more. The source code after finishing this tutorial is in revision 29b034cc73d6bf916576762baac534f2d7193d4e. You can check it out using the git checkout 29b034cc73d6bf916576762baac534f2d7193d4e command on the terminal.

Now let's go!