I would like to obtain an infinite gradual automatic creation similar to the vampire survivor video game.
if anyone has already created a game like this and can share I would be grateful
can you explain in basic terms what you want to happen? Like, each wave you want the amount of the previous wave + x enemies to spawn? What is the purpose of the enemy name?
Oups sorry. I misunderstood that sentence. Here is an potential algorithm as mentioned MrMen :
You couldattribute a “dangerosity” to each monster type.
For example :
Skeleton : dangerosity =1
Wolf : dangerosity = 2
Orc : dangerosity = 4
Every new wave increase the “danger level”.
For example, with a formula such as danger level = wave number * 20
Level 1 : danger level = 10
Level 2 : danger Level = 20
…
Then every new wave you select at random 1 or 2 types of monster and generate of number for wich the sum of their dangerosity matches the danger level.
For example :
Level 1 : Generate 10 skeletons (Total Dangerosity = 10x1 = Danger Level)
Level 2 : Generate 8 skeletons and 6 wolves (Total Dangerosity = 81 + 62 = 20)
To find those numbers “8” and “6” there are different ways. For example you can decide at random at which proportion you first group of monsters will contribute to the total dangerosity (for example pick a random value between 20 to 80%).
In the example above, I had decided that my first group of monsters (the skeletons) would contribute to 40% of the total dangerosity (8 points over 20)
yes I mean to build an automatic enemy generation algorithm without having to set it on an array as I’m already doing.
I would like to build a timed survivor game where the player must manage to stay in the game for as long as possible.
I really like your concept, could you kindly build me a small example where I can base myself for the construction of the code
Ok. I’ll see what I can do, to let you start and build on it.
But you should trying building it one step after the other.
You’ll need some variables, to store what your random generator spits out, and don’t be afraid to have many levels of subevents.
thanks @vfabien21 your idea of giving a number of danger to the enemy and increasing it every time a new wave starts I really like it. I’m trying to jot something down
I’ll update you
Nice ! I’ll gladly read what you have done and help you if you need !
Doing it myself for you is a bit too much : I am trying to move forward on my project.
so i added a variable of danger to the enemies and a timer that increases the danger value on the field but i just can’t find a way to make the enemies create in relation to that value.
i attach a small example… kindly if someone can take a look just to make me understand how i can proceed
thanks guys