Skip Navigation

Managing enemy spawn large world

I'm doing this in Unreal Engine 5, but how this is done should be relevant for any engine, minus the details of spawning and despawning.

Anybody know how large games handle spawning and despawning enemies? One idea I had was to have a really large sphere around the player that spawns enemies when the player overlaps spawn points. But that could get tricky to implement. Another idea I had was to spawn enemies as the player enters different areas, and just put them to sleep/deactivate them until the overlap a large player sphere.

Would love to know other people's thoughts on this. I'm looking for something that has good performance and scalability. I'm going to start testing ideas soon. But would be great if someone already knew of a solution that works.

Edit: Why downvote? I'm asking for discussion on algorithms. Is that not the point of this community...

3
3 comments