top of page

The Killer Sandworm From Saturn!

A game all about destruction and chaos

​

Position: System Designer 
Technology: Unity Engine
Date: April 2021

​

This game was created as part of a production class during my second year of college. In the game the player controls a large worm tunneling through the earth. The player must feed the worm by destroying enemies on the surface either by running them through or blasting them with projectiles. I designed the particle systems present throughout the game as well as the destructible buildings. My main focus on this project was our level manager, which allowed myself and other designers/programmers to easily create new levels for our game. The following trailer was put together by our lead programmer, Andrew Hunt.

The Level Manager

As the player progresses in the game each wave spawns in different types of enemies. In order to easily create/edit waves I programmed a level manager that would handle the spawning of enemies.

Screenshot (17).png

This short snippet of code from the level manager contains the bulk of what my teammate would see in the inspector. By creating a serializable class we were able to make a list of levels. Each level had a list of the number of enemies spawning in. The level manager handled the spawning of and deaths of enemies. If my team wanted to make changes to a level or create a new one all they would have to do is input a wave's values in the Unity inspector and the level manager would take care of the rest.

Capture2.PNG

In the Unity Editor, the level list looks like this. Our team was able to quickly add and edit levels. Each element in a level's list represented how many of what enemy spawned during that level. The checkboxes indicate if the background art would change to reflect game progress and if the player would receive a weapon upgrade on completion of the level respectively.

Capture.PNG

When a level is called to be spawned, the level manager handles spawning by getting a random enemy type and spawning it at a random location within the level. The case visible here is the code for spawning the Soldier enemy. The boolean ensures that the proper amount of any enemy type is spawned per level. The increment of the "enemyAmount" variable is an additional check to ensure that the right number of enemies spawn in any given level.

soldierSpawnCode.JPG

The Level Manager also handled the spawning of Civilians, NPC's that would run around the map and heal the player upon being eaten. This short block of code will instantiate a Civilian NPCs at random locations within the bounds set in the inspector as long as the maximum amount of civilians in game has not been reached. The level manager keeps track of how many civilians are spawned at one time to ensure that a reasonable amount are on screen at any given time.

civSpawnCode.JPG
bottom of page