Rise of Light

Summary

Introduction

Rise of Light is a tower defence game, a sub genre of real-time strategy games. The goal of tower defence games is to try and stop the enemies from reaching a specific point on the map by building a variety of different towers which shoot at them as they pass. Our idea is based on famous RTS games back in the 90’s like Rampart, Warcraft: Orcs & Humans and Age of Empires. RoL takes a slightly unique approach to the tower defence genre, in that the enemies are trying to reach the towers themselves as opposed to a specific point on the map.

Story

Before there was light on the planet, there lived a few species of evil creatures, who fed on light. These creatures were so greedy that they wouldimage2015-4-27 17-31-45 not give up any chance to pursue any light source. The player plays as God, who delivers the light onto the planet by setting up light towers. In order to restore the world from darkness, these light towers must be used to dispel the evil creatures and their nests from the world.

Game Overview

Initially, the game starts with the map fully covered by a “fog of war” which provides a dark atmosphere for the map. The player can see a small area of the map surrounding his initial tower. Around the map are nests from which the enemies will spawn. At first, Magma demons will spawn and they will try to attack the closest tower. As the game progresses different enemy types will spawn. The objective is to kill them in order to get their inner light to upgrade, defend and build new towers. The game ends when the player has found and destroyed all the nests in the map.

Level Design

For the level design we started using a pre-generated terrain found in the Assets Store in Unity. Progressively we added layers containing trees, camp fires and lights, stairs and water (in the middle).

LevelDesign

The last step was to add particle effects and God Rays. Below is the final result:

MapFinal Result

Terrain Representation

n order to let enemies walk through the map using a Pathfinding algorithm one of two solutions was needed:
Grid Graph or a Navigation Mesh. The navigation mesh expresses the Pathfinding data as a triangle mesh instead of squares (Grid Graph). It is a perfect solution for smooth and fast pathfinding where the graph does not need much changing during runtime. The navigation mesh is also built-in in Unity. Notwithstanding it has the drawback to be manually placed on the map. It then requires a lot of level design effort so implementing a grid graph method was preferred over the Navmesh.

Grid Graphs are memory efficient for small maps and in this case is generated dynamically from the terrain using terrain type and height.

Although this is an efficient method for small maps it won’t scale up well for larger worlds (memory footprint will be simply huge).

Using dynamically generated grid graphs avoided any level design, and moreover it was possible reuse the same algorithm for more levels.

Gameplay

Initially, the map is fully covered by the “Fog of War” which darkens the entire the region. An initial light tower is randomly placed on the map, which lights up a small region surrounding the tower. The player can then place more light towers around the map which will light up more areas and also attack incoming enemies. When a light tower kills enemies, it will gain resources that can be used to upgrade a tower, defend a tower, or build new towers.

Initial Tower

Around the map are nests from which the magma demons will spawn, and try to destroy the towers. The main objective of the game is to destroy all the enemy nests – to stop the enemies from spawning. In order to do this, the player must build light towers close enough to the nests, which will then proceed to destroy them.

In order to complete the map, each of the enemy nests must be lit up by a tower. The location of these nests will be randomly generated. Once the nest has been lit up, the enemies can no longer spawn from the darkness and so you have defeated them.

AI

The grid graph generated is used by an A* pathfinding algorithm that was coded from scratch. The algorithm is very efficient and runs in O (n log n).

AI pathfinding

Sound

 

In order to get sounds for the game, a sound designer, Raffaele Presciutti, kindly contributed providing us with a variety of sound effects. Raffele provided a number of in-game sounds including tower construction, tower destruction and enemies dying.

In order to implement the sound, audio sources had to be attached to the relevant models, for example the enemies or the towers. Once the relevant situation arises such as an enemy dying, sound is played accordingly.

Video