Dungeon Spawns


Spawning things in the dungeon comes in 3 waves. The first wave will be all the enemies in the dungeon, as we want to ensure we have enough to make the dungeon playable. After that, we decide the boss teleporter to go fight the boss, and after that we add props and decor. To do this, we have a two part system. The first thing is checking only for inside of rooms. We don't want any enemies, props, or the teleporter spawning inside of the hallways, as it could block the player or become cramped. 



When we have found all the available spots, we go one by one, placing a prop/enemy and marking it as unavailable. This is to ensure two props don't spawn on top of each other, or enemies spawning inside of props. Because we are going one by one, if a spot ever becomes unavailable, just try and place it again. If it still does not place after a certain number of tries, then just give up. If a room is too small, for example it might not be able to hold 20 different props, which is why they are last. This system ensures the highest priority objects get spawned first, and then comes the details.


Leave a comment

Log in with itch.io to leave a comment.