Pointers for random enemy spawning

Talk about anything and everything game dev-related here!
Fellow Butterscotch'ians! I've come seeking some advice from more seasoned minds regarding enemies and how strongly affixed their heads are to their bodies (or, basically, how difficult they are to kill).

I'm currently playing with an idea that has enemy "waves" that get progressively harder. Think "rougelike" I guess, but without the rooms. There is a few more elements that make it much more interesting than that, but the part I'm trying to decipher is the enemy generation. I really want to stay away from the idea of just "SPAWNNN MOAR STUFFFFF!"

There seems to be a few schools of thought.
1. List of enemies, all with level ranges or "difficultly ratings". As the difficultly progresses, randomly spawn in variations of matching or +/- 1 or 2 levels difference mobs
2. Hard code up 100+ "wave designs", each with a rating. Randomly drop in a wave design.
3. Weighted lists. There is a small chance that you might get a dragon on round 1, and if you do, well.... you're f*****

I'd love to know if anyone has dealt with this before, and the best way to go about things. Not looking to leech code or have the answer provided on a silver platter, but trying to look at benefits of each solution.

Adam and Seth - you guys maybe dealt with something similar on Quadropus? Am I over thinking things?

Thanks everyone!

User avatar
Posts: 2

What I did on the game I am working on now is that I have a global.enemylife variable and set it to 1 and when it goes to level 2 it goes up by 1.

During the create even I have a random roll that will go from 1 to global.enemylife and based on that will determine which enemy will spawn.

With this I can have some control on when I want certain enemies to show up.

Hope this helps!

User avatar
Posts: 24

I think games like The Elder Scrolls or Neverwinter Nights uses lists.

If I recall correctly, those games use spawn lists.
Basically: at that place you may encounter that group of enemies.
Group of enemies is made of a random pick of enemies you have in the game (usually sorted by type, like bandits, monsters, undead...)
Or something like that. Maybe not the most efficient way to do it but it may allow for the most versatility. Maybe.

User avatar
Posts: 1831
Location: Bordeaux, France

Awesome, thanks for the responses! Kind of doing a mixture right now - Enemies have a "difficulty" that determines when they can be spawned, then also scaling them slightly depending on how far the player has progressed.

Thanks for your help, think I'm heading down the right path now!

User avatar
Posts: 2

That's good to hear!
Good luck on your project then :)

User avatar
Posts: 1831
Location: Bordeaux, France

Return to Game Dev

Who is online

Users browsing this forum: No registered users and 1 guest