Endless Runner

This game was a solo school project. It’s made in C# and Unity. Models and art are taken from the Unity Store, Mixamo and Google.

This was the very first game I made in Unity.

The game is a clone of Temple Run and as such, was made for Android.

Gameplay

You begin by dropping down on the street.

Controlling your character is done by tilting your phone.

Your goal is to run as far as you can without hitting obstacles. Touching the many pickups might help you out.

If you bump into two obstacles within a short time a monster will get you and it’s a game over.

Code

One thing I’m quite proud of is how the world is created. It uses a very basic procedural generation script which chooses random tiles from a list and places attaches those to a collider placed on the previous tile. Instead of creating a new tile every time a player reaches a certain point, the old tiles are reused. This is done to increase performance.

World Component Class
Area Pool Component Class

Along the way of this project a teacher told me to use a script to manage all the stuff I put into a single Tile prefab. This helped me a lot in making my code a bit cleaner and easier to understand

Area Prefab Component Class