• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Game Mechanics Enemy spawning methods

I'm making a small scrolling shooter type game at the moment, which I have made quite a few of.
But I have been thinking about enemy spawning.
Usually what I do is have all my enemies spawned just out of the view, randomly but weighted so that the "basic" enemy spawns more abundantly and the harder, more complicated enemies spawn less often.
So I'm curious as to what other methods you guys might use, like having specific enemies spawn at certain times or have a normal pattern and order every time you play.

Oh and I guess bosses and difficulty are worth discussing too. My go-to method is have score thresholds so for example, passing 1000 points will increase the spawn rate of enemies and at 5000 points a boss will appear.
 

Simon Gust

Member
In my Risk of Rain fangame I have a point system.
The "director" is the one that spawns enemies, he has points and he gets them over time and on certain events.
Each enemy costs a certain amount of points too. Strong enemies cost more than weaker ones.

The director has several states that change spawning behaviour ever so slightly.
I have these ->

- batch
spawns 2 to 4 enemies at once. Can choose any enemy.

- save
random occurance, director starts saving points up for a while.

- single
spawns a single enemy and immedeatly changes to another state. Spawns rather expensive enemies, can spawn bosses and blighted enemies.

- double
spawns two enemies and immedeatly changes to another state. Spawns rather expensive enemies.

- rush
if enough points are avaliable, the director goes into overdrive, spawning single enemies very quickly until no points are left.

- event
spawns a boss that isn't randomly occuring, then proceeds to increase point-rate and action-rate until the event has ended.
 
T

TinyGamesLab

Guest
What I have done in the past is having different states which have different chances for each type of spawn.
The state change is based on my own score and the current state.
The chances are determined by a % that varies is each stage. So I "roll the dice" using a random function as I check what was obtained.
Below is an exemple:
- Novice (less than 100 points): High chance of spawning single enemies or of waiting a few steps more. I can't recall exactly the values but if I obtained a random value of 0-40% there was no spawn, from 40-90% I would spawn a single enemy and from 90%-100% double enemies
- Amateur (from 50pts to 200pts): High chance of single or double enemies. Small chance of nothing and single harder enemy.
- Medium (from 200 to 500pts): high chance of double or patterned enemies (hard coded pattern with small random variations). Medium chance of harder enemy. Small chance of double harder enemy.
- Advanced (500pts to 1000): high chance of medium enemy. Medium chance of double of patterned harder enemy (includes easy enemies together) Small chance of random boss.
- Insane (above 1000): high chance of patterned harder enemy. Medium chance of boss. Small chance of boss with a lot of enemies.

I like the idea of a cost system to spawn enemies like mentioned by @Simon Gust
 
Top