Blog

Enemy Spawning – Continued

Got enemy spawning working pretty good now. So when you go on a mission the server creates a dynamic room and randomly generates what map layout you want and which monsters should spawn. It then creates room variables to store all this data on the server.Once a person connects to the mission room, if they are the party leader, it checks if the monsters are in the level or not. If not, then it makes them locally and places them at the corresponding spawn points.

If they are not the leader, it makes the monsters but it sets their location based off the room variables. Since the party leader is the one who dictates the enemy logic, we don’t need to receive updates about the enemies since the leader is the one who is controlling them.

Seems good so far! Now I need to create a simple state machine, similar to the one that the player uses. That way when the monster goes from state to state, it will broadcast each new state, position and direction to everyone else in the room.

Getting closer . . . :D

Related Posts

No Comments Yet.

leave a comment


four × 9 =