Main Game Flow
One of the important aspects was the main game flow, as this game was created before Unity. One of the main challenges was what to do with the rooms off screen. As they contained evolving Ai that needed to be tracked.
The solution for this was simple, the other rooms contained a count of the monster types:
Skeleton: 3
Spawner: 2
Mummy: 5
...
After a given amount of time, the percent of the mummies (depending on difficulty*random value) would evolve, same with the other creatures as well. The total score of the monsters was summed, and if the room was considered infested, a random monster would be chosen to move to an adjacent room.
When a player entered the room, the monsters were placed randomly (on the ground) throughout the room. If a player was in a room that received a monster from a neighbor, the monster would be placed at the appropriate door.
Rooms contained a similar Observer Pattern to track the monsters, if they died or evolved, the room stats would be updated.
If the score of all rooms was 0, then the player had won the game.
The solution for this was simple, the other rooms contained a count of the monster types:
Skeleton: 3
Spawner: 2
Mummy: 5
...
After a given amount of time, the percent of the mummies (depending on difficulty*random value) would evolve, same with the other creatures as well. The total score of the monsters was summed, and if the room was considered infested, a random monster would be chosen to move to an adjacent room.
When a player entered the room, the monsters were placed randomly (on the ground) throughout the room. If a player was in a room that received a monster from a neighbor, the monster would be placed at the appropriate door.
Rooms contained a similar Observer Pattern to track the monsters, if they died or evolved, the room stats would be updated.
If the score of all rooms was 0, then the player had won the game.