Jump to content

Recommended Posts

Posted

Dozens of hordes moving across the map might be laggy right? What if wandering hordes would only spawn zombies once a player gets close enough?

I made some scetches to show how it could work perhaps.

 

Pic 1:

Spawn trigger zone: Once a player touches the zone, the horde will spawn.

Spawn area: Where most of the zombies will spawn if there aren't any obstacles in the way.

Extra spawn area: Where some zombies might spawn if there are any obstacles. (Fences, doors, built walls.)

Horde center: The horde center is one zombie, which is the only zombie existing before spawning. It navigates the horde and gets around obstacles.

 

Pic 2:

General direction: Where the horde is headed.

Paths 1 & 2: If the horde faces an obstacle that can't be destroyed, it will simply pick a random direction to get past the obstacle.

In this picture the horde happened to wander towards a player walled base and began to destroy it. The horde can't damage buildings that are out of the horde center's reach, so a rain collector behind log walls should be safe. Let's say the player happened to return to their base and triggered the spawn. The zombies will only spawn where the horde center can get to (The white dots). In this case zombies couldn't spawn inside the base since the base walls were still intact. The horde could perhaps despawn if the player got far away again, and then continue destroying the base, and after that continuing its general direction.

 

No idea if this would actually work.

 

 

Posted

The new NPC System will use some kind of story- and movement history and tracking but the NPC will only be visible when a player comes near its vicinity, if I recall correctly. So, in theory the logic for "off-screen" tracking and wandering should already be there.

Posted
25 minutes ago, getstoopid said:

The new NPC System will use some kind of story- and movement history and tracking but the NPC will only be visible when a player comes near its vicinity, if I recall correctly. So, in theory the logic for "off-screen" tracking and wandering should already be there.

I kind of wondered if that was the case. Thanks.

Posted

This is mostly how it works, as is.

 

A virtual horde (a group of zombies) wanders the map semi-randomly, partially driven by sound and pressures of the population of each cell.

 

Near the player, it becomes real and individual zombies are spawned where sensible.

 

 You can see it work in the population map in debug.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...