Phase II Progress Report — New functionality — scriptable object waves

In this article, I will discuss the new wave functionality I have implemented using scriptable objects.

I will properly discuss creating the scriptable objects in another article. I have created 20 wave scriptable objects. Each wave object can take a list of game objects.

For each wave, I change the makeup and amount of enemies each wave. The idea is to implement a 4 part boss battle throughout these waves at specific wave intervals.

The next step is to change my spawn manager script to use the new wave system instead of using the previous weighting system I was using for the enemy spawn routine. I now access the list of waves and spawn each enemy object within the list.

Each time an enemy is spawned it increments the int “remaining enemies”. When the enemies are destroyed the int is decremented.

When the remaining enemies hit 0 the wave is incremented causing the spawning list to begin spawning the next wave scriptable object.

There's not much visually you will notice, but as I destroy the asteroid to begin the spawn routine you will notice the first wave matches the Enemy_Wave_1 scriptable objects list.

5 enemy grunts get spawned as expected

That's all for now.




Unity developer with a love of learning all things programming.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Roast Designs Have Been Updated

Object methods that help: Object.create();

Building a Like and Dislike Widget with the React State Hook

How Dependency Injection Pattern Works And Why Use It — Revisited

A Crash Course in Composing Functions

JavaScriptJavaScript Prototypal Inheritance

In JavaScript Console Other Than Console.log()

Rust Hello World using Visual Studio Code

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Luke Duckett

Luke Duckett

Unity developer with a love of learning all things programming.

More from Medium

What is a Signal Emitter in Timeline

Animating Sprites in Unity

My journey becoming a Unity game developer: 2.5D Infinite Runner-Ledge Grab System-Pt4

Simple Player Movement in Unity