So I wanna make an endless game mode in my tower defense game where enemies just spawn for infinity and it gets harder with more and more enemies who are stronger and stronger.
How would you go about doing this? I don’t wanna use randomization because I want it to still be the same each time you play.
I thought of having a table from weakest to strongest of the enemies and then going to the next one every 5 waves but I feel they would lack variety.
I already have the wave system, just not sure how to go about spawning the enemies. (I mean I have spawn functions I’m just not sure if I should make a table of weakest to strongest enemies and increment it or smth else)
I’m not rlly asking how to make infinite waves, I alr know how, I’m more so asking how would I go about making an automated mob choosing system. I don’t wanna manually make each wave, I want it to be more procedural and get harder over time
-- Infinite loop to keep spawning waves
while true do
if wave == 9 then
info.MobNumber.Value = 18
mob.Spawn("Mob1", 3, map)
mob.Spawn("Mob2", 7, map)
mob.Spawn("Mob3", 5, map)
mob.Spawn("Mob4", 3, map)
info.WaveOver.Value = true
-- Add a delay before the next wave spawns
task.wait(5) -- Adjust the wait time as needed
end
end
I think for endless you definitely need to do a scaling value for #mobs, mob difficulties, etc. (nevermind for a capped wave system) itll be annoying to do repetitive elseifs like what you are doing now.