Thanks! Yeah I'll try to fix the spawning bug :) It is one of those things you think you've fixed but is hard to test for
Viewing post in Okay that should be stable? comments
I hear you. One option is make a list of all legal spawning locations for a map, then, for each enemy spawned, loop through the cells in a square around that enemy, swapping that cell location with the one at the bottom of the list of legal locations and decrementing the index of the bottom of the legal list by one. When all enemies are placed, the player can safely spawn at random(index) location. Does that make sense? (I haven't had to use that algorithm for years, so I may have forgotten something.)