In stage 3 I was asked to come up with 3 game ideas based on the theme I chose from stage 2. One of these ideas was called polySolar:
polySolar, as it was shown back then, was a roguelike about cleaning up Oil Monsters using an attack method similar to the weaken-destory approach found in Alan Wake (2010).
The suggestion that one of my ideas was essentially a Tower Defense game came from Adam and while I was hesitant at first to try it out, I decided to go for it.
For polySolarTD, I used the prototype’s project files as a base to rework the game into the Tower Defense genre, I could’ve made it from scratch but I got suggested on Discord to revamp the prototype I’ve already got into the structure of a Tower Defense game. This was my first real attempt at a Tower Defense prototype, I tried to make a Tower Defense prototype for last years project proposal but I never got anything working. I also tried copying the Asset file to a newer project (abeit on a different Unity version), but that didn’t work either


What I planned to do to make a prototype
The first thing I was was make a new Player GameObject. As you can see this one differs from the one in polySolar as it doesn’t have the player shooting, at least not directly.

Next thing I did was expand the player cameras size, allowing the player to see more of the battlefield (ignore the picture-in-picture video).

Then I edited the Tile Grid to contain less grey tiles around the edges of the world.

At this point, I’d made a few things, first, a way for the enemies to spawn in waves and move, and second, towers, both of which are obviously very important in a Tower Defense game.

After 2 days I had a prototype of the Tower Defense game, which is a big step up compared to last year, however, the prototype didn’t work as well as it should have. As you can see from the video below, bullets often missed, and it looks pretty stale gameplay wise. The player mainly moves to each area and presses a button to spawn a tower.


The feedback I got initally was pretty blunt. I realized then that there was much to improve on with this prototype. One of the suggestions I got was to add a visible pathway to the enemy to show where they will be going to. This was fairly easily done with the Tile System in Unity.
I also decided to change the way the Tower shooted at the Oil Monster in code, which resulted in the Tower rotating towards the Oil Monster, I thought that was a novel idea however and I kept it in the game.

One thing I tried to prevent with this prototype was the player using only 1 tower to destroy all the enemies in a wave. I did not succeed initially. Another thing I was also missing from the prototype was a type of waves system.
It was then that I started making a clear path for the Oil Monsters. A path system was there already but placing down Tiles that indicated where the enemies would go made it a lot easier for players to put down a plan.
At this point I also added Power Grids that I intended to deliver power to the Towers (it didn’t work).



(Discord photo from playtester)
Initially, the player walked around the map to place town Towers in their location.
One of the first things I did with improving the prototype was changing the player from one in which the player moves around a character and places down towers in specific zones, to one in which the player moves around a cursor and places down towers by holding a mouse in the place where they want to put it (but not outside the boundaries).
Here’s a closer demonstration of the out-of-bounds checks that prevent the player from placing a Tower in the water.


It was at this point where I started to iterate on the designs of the Oil Monsters and to add a boss character, the Oil Lizard.




At this point too I had Pink Enemies and I had a revised MonsterSpawn script.

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class MonsterSpawnTD : MonoBehaviour
{
public List<WavesSO> waves;
int _currentWave;
private GameObject _monsterToSpawn;
[SerializeField] float timeBetweenSpawns = 2.5f;
[SerializeField] float timeBetweenWaves = 5f;
[SerializeField] private Transform monsterStartingPoint;
private bool canSpawnWaves;
public GameObject startButton;
private bool canStartGame = true;
private void Update()
{
if (canSpawnWaves)
{
SpawnWave();
}
}
public void OnStartGame(InputAction.CallbackContext context)
{
if (!context.performed || !canStartGame) return;
canStartGame = false;
BeginGame();
}
public void BeginGame()
{
startButton.SetActive(false);
canSpawnWaves = true;
}
void SpawnWave()
{
canSpawnWaves = false;
NewWave();
}
private void NewWave()
{
_monsterToSpawn = waves[_currentWave].oilMonsterPrefabs[0];
// Maybe randomly choose from the monster pool?
var numberOfMonsters = waves[_currentWave].numberOfEnemies;
StartCoroutine(SpawnOilMonsters(_monsterToSpawn, numberOfMonsters));
// Spawn Wave
}
IEnumerator SpawnOilMonsters(GameObject monsters, int numberOfMonsters)
{
for (var i = 0; i < numberOfMonsters; i++)
{
yield return new WaitForSeconds(timeBetweenSpawns);
Instantiate(monsters,
monsterStartingPoint.position, Quaternion.identity);
}
yield return new WaitForSeconds(timeBetweenWaves);
_currentWave++;
Debug.Log("Current wave: " + _currentWave);
canSpawnWaves = true;
}
}
At this point, I continued to work on the prototype, however progress started to slow down a fair bit.

I also experimented with implementing UI elements into the game.
One issue that I had was that the Tile pathway would occasionally disappear. I was able to fix this by changing some of the Tile settings.


Here is the second video of the prototype.


It was at this point where I decided to change how the Towers shot at the Oil Monsters in code.


It required a bit of work to get it fully working.
Slowly
Fast
With groups
More balanced

The first Plant Tower


It was here that I made a new branch in Git and did some changes to the game. I implemented a drag-and-drop system and replaced Plant Towers as the thing the player puts down with Plant Tower Seeds.
Ultimately however, I didn’t make any futher progress here and decided to just go back to the Main branch.