Rogue Nebula

OVERVIEW

// METRICS

Engine
Unity
Platforms
Web

Developed during the summer session of the Video Game Development Club, Rogue Nebula challenges players to survive endless waves of enemies while aiming for a high score.

Heavily inspired by classic arcade titles like Galaga, Defender (1981), and Space Invaders, the game features a scrolling 3D environment, reactive UI, vibrant special effects, and diverse enemy behaviors. Play it in the browser on itch.io.

TECHNICAL FEATURES

// Systems that I've created and contributed to

Wave System

This game picks a hand-built enemy formation from a difficulty pool, promotes some ships to tougher variants, and moves to a harder pool every eight waves.

Four main scripts share the work. WaveManager owns the pools and the wave count, WavePool assets hold the content, each Wave prefab tracks its own ships, and AnnouncementUI tells the player what is coming.

// The Pieces
Module Type Purpose
WaveManager MonoBehaviour Chooses the Wave from a WavePool based on difficulty and random chance.
WavePool ScriptableObject Set of prefabbed Waves and variant spawn chances.
Wave MonoBehaviour A prefabbed formation of enemy ships.
AnnouncementUI MonoBehaviour Responds to event calls and updates UI text to match wave number and difficulty.

Data-Driven Wave System

Each enemy formation is a prefab: an empty Wave object whose children are the ships, already placed in formation. Formations are grouped into three WavePool ScriptableObjects, one per difficulty. A pool holds its list of wave prefabs and the odds of spawning elite variants, so a whole difficulty tier can be rebalanced in the Inspector without touching code.

// CSHARP
[CreateAssetMenu(fileName = "WavePool", menuName = "Wave Pool")]
public class WavePool : ScriptableObject
{
    [Header("Wave Settings")]
    [SerializeField] private WaveDifficulty waveDifficulty = 0;
    [SerializeField] private List<GameObject> waves = new List<GameObject>();

    [Header("Variant Enemies")]
    [SerializeField] public int varientMedChance = 0;
    [SerializeField] public int varientHardChance = 0;
    [SerializeField] public int varientMaxSpawn = 0;

    public GameObject RandomWaveSelect()
    {
        if (waves.Count <= 0)       // If no waves currently selected then return null
            return null;

        int roll = Random.Range(0, waves.Count);
        if (waves[roll])
            return waves[roll];
        else
            return RandomWaveSelect();
    }
}

RandomWaveSelect() picks a random slot and re-rolls if that slot was left empty in the Inspector, so a half-filled pool still works while formations are being built.

Wave Loop

WaveManager is a singleton that starts on the first pool and spawns the first wave as soon as the scene loads. Spawning runs in a coroutine: it waits waveDelay, fires the onWaveStart event with the current wave number, then instantiates a random formation from the active pool.

// CSHARP
[Header("Events")]
[SerializeField] public UnityEvent<int> onWaveStart;

private void Start()
{
    currentWavePool = wavePools[0];     // Start currentWavePool at first wave in list
    SpawnWave();
}

public void SpawnWave()
{
    StartCoroutine(SpawnWaveCo());
}

private IEnumerator SpawnWaveCo()
{
    GameObject waveParent = GameObject.Find(WAVE_PARENT_NAME);

    yield return new WaitForSeconds(waveDelay);
    // Event for UI
    onWaveStart?.Invoke(waveCounter);

    GameObject wave = Instantiate(currentWavePool.RandomWaveSelect(), waveParent.transform);
}

onWaveStart is a UnityEvent<int> connected in the Inspector, so the manager has no reference to any UI. In the main scene it is wired to the wave announcement, and other listeners can be added without changing this script.

Difficulty

Each cleared wave increments the counter. When it reaches the next multiple of changePoolAfterWaves (set to 8 in the main scene), the manager switches to the next pool. On the last pool the check fails and the game stays at Hard for the rest of the run.

// CSHARP
public void UpdateWaveCounter()
{
    waveCounter++;
    // changeWavePoolAfter * i = nextWavePoolChange
    if (waveCounter >= changePoolAfterWaves * waveCountMult)
    {
        RaiseDifficulty();
        waveCountMult++;
    }
}

public void RaiseDifficulty()
{
    // Check if we are not at the end of wavePools; otherwise, stay on last WavePool
    if (((int)currentDifficulty + 1) < wavePools.Count)
    {
        currentDifficulty++;
        currentWavePool = wavePools[((int)currentDifficulty)];
    }
}
// Difficulty Selection
Pool Waves Med Variant Chance Hard Variant Chance Variant Cap
Easy 1-7 10% 0% 1
Medium 8-15 35% 5% 2
Hard 16+ 50% 20% 3