Jump to content
Sign in to follow this  
ninjacalypse

Zombies: Using dynamic Entities and Spawn points to address client/server load w/ Zombies & Loot

Recommended Posts

This is just one of my suggestions for dealing with the client/server load caused by Zombies.  I don't know how the dev team is working on addressing the issue but I get the idea that they're working from the angle of the zombies being permanent entities on the map.

 

I've heard the dev team say they've tested the game with thousands of zombies but combined with the loot spawns it overloads the game. 

 

The thing is you don't actually need thousands of zombies in-world all the time.  We already know common places were zombies spawn, in towns, military camps/airfields, some in random places, etc.

 

So the devs could just place these dynamic spawn points around the map, as potential places where zombies could spawn.

 

Now when a player enters the radius of one of these dynamic spawn points/zones it activates the entity.  The entity determines if it should spawn a zombie, how many zombies what types of zombies.

 

Once a zombie entity is spawned in world it would remain in world, as long as it remained in an alert status or the player was within a certain radius/distance from the zombie.  If the player has effectively broken all contact with the zombie entity, it's not in any type of alert status and the player is beyond the effective render distance of the zombie, the entity could be de-spawned to save client/server resources.

 

If a player has killed all the zombie entities within a given area, those spawn entities would have a cooldown time before they could spawn new zombies, enough so that you wouldn't jog into town, kill some zombies, think it's all clear and then get ambushed by more zombies while you're looting a house.

 

Spawning entities could also spawn different types of zombies, different amounts of zombies, hordes for instance in special circumstances or a small chance to spawn a mini-mid-large horde.

 

To prevent players from in-inadvertently or intentionally creating too many spawn instances, you could simply set a cap on the amount of zombie entities that could be spawned in world at any given time.

 

Some people might argue that it would break the realism of the game but currently, you go somewhere clear out a few zombies and that's it.  You don't have to worry about zombies anymore in that area unless the server restarts.  This would provide more of a challenge and keep gameplay fresh and I think would be one way to address the problem with the client/server load.

 

As another poster here pointed out, the same principle could also be used to handle loot spawning/respawning as well.

 

This is a brutally simplistic MSPaint depiction but demonstrates how it could possibly work.  The entity spawning zone wouldn't have to be limited to a small town either necessarily.  It could encompass areas of forest, areas outside towns, etc.

 

HJdSUfn.jpg

Edited by NeedsFoodBadly

Share this post


Link to post
Share on other sites

I could have interpreted your point wrong but isn't this pretty much how it was in the mod?

 

I don't know enough about the inner workings of the mod and how it handled zombies client/server side but what we have right now in the standalone is a pretty static, limited and easily overloaded system.

Edited by NeedsFoodBadly

Share this post


Link to post
Share on other sites

I don't know enough about the inner workings of the mod and how it handled zombies client/server side but what we have right now in the standalone is a pretty static, limited and easily overloaded system.

The way the mod worked was that zombies were like loot (very, very bad loot) and they spawned when you got close enough to activate the spawn. This lead to people who had found binos (or scoped weapons) to glass an area to see if people were in the area. This was immersion breaking because in a real situation those zeds would be stumbling around no matter what.

 

Rocket set out to change this for SA and all that is needed to make this dynamic better is to add more zombies spawning. Seriously i can sprint right to the firestations and supermarket of Elektro without agroing a zed that isn't in one of those buildings.

Share this post


Link to post
Share on other sites

The way the mod worked was that zombies were like loot (very, very bad loot) and they spawned when you got close enough to activate the spawn. This lead to people who had found binos (or scoped weapons) to glass an area to see if people were in the area. This was immersion breaking because in a real situation those zeds would be stumbling around no matter what.

 

Rocket set out to change this for SA and all that is needed to make this dynamic better is to add more zombies spawning. Seriously i can sprint right to the firestations and supermarket of Elektro without agroing a zed that isn't in one of those buildings.

If the distance to activate zombie spawns is large enough, it eliminates this problem.

 

Your client can only render players and zombies from so far away. If you set the spawning of zombies to be just outside of a player's render distance, they wouldn't be able to tell if they were the person who caused the zombie to spawn or if it was someone else.

Share this post


Link to post
Share on other sites

If the distance to activate zombie spawns is large enough, it eliminates this problem.

 

Your client can only render players and zombies from so far away. If you set the spawning of zombies to be just outside of a player's render distance, they wouldn't be able to tell if they were the person who caused the zombie to spawn or if it was someone else.

If it is large enough then this all becomes moot as there would have to be zombies spawning as far as the eye can see, which is as far as the network bubble reaches. This would lead to no noticable increase in serverside FPS as the amount of players on a full release SA would lead to most of the zombies already spawning being spawned by players.

Share this post


Link to post
Share on other sites

Another idea would be to make zombies statues, were they do not move, make sounds or even do idle moves until a player gets within a certain distance, this could help the server load

Share this post


Link to post
Share on other sites

why the zombies though? why not the loot?

 

you rarely see loot outside from a distance, so just instead of zombies spawning in (how it's done in the mod and bad way of doing it) make the loot spawn it when you're within a certain radius. unless it's already being handled this way, if so then too bad just try and optimize it as much as possible.

 

Dchil already explained why it's kinda moot to have zombies spawn in when within range and it would also be an easy way to see if players are/were there.

  • Like 1

Share this post


Link to post
Share on other sites

This would bring back the same issue that was in the mod - when approaching a town, you could just take a look through some binoculars or a scope. If there were zombies in the town, there were players. With the zombies spawning as they are now, there is no way to tell if there are players nearby just by looking from a distance.

Share this post


Link to post
Share on other sites

Another idea would be to make zombies statues, were they do not move, make sounds or even do idle moves until a player gets within a certain distance, this could help the server load

They do this at the moment, just find a zombie that hasn't been agroed and don't get too close.

Share this post


Link to post
Share on other sites

If it is large enough then this all becomes moot as there would have to be zombies spawning as far as the eye can see, which is as far as the network bubble reaches. This would lead to no noticable increase in serverside FPS as the amount of players on a full release SA would lead to most of the zombies already spawning being spawned by players.

 

 

This would bring back the same issue that was in the mod - when approaching a town, you could just take a look through some binoculars or a scope. If there were zombies in the town, there were players. With the zombies spawning as they are now, there is no way to tell if there are players nearby just by looking from a distance.

 

If the player was in render distance of a town, then they should potentially trigger zombie spawns.  The devs talked about spawning something like 4 or 5000 zombies on a test server.  Even with a full server, you wouldn't need to spawn 5000 zombies at the same time to cover the render distance/spawn zones for every player.

 

 

why the zombies though? why not the loot?

 

you rarely see loot outside from a distance, so just instead of zombies spawning in (how it's done in the mod and bad way of doing it) make the loot spawn it when you're within a certain radius. unless it's already being handled this way, if so then too bad just try and optimize it as much as possible.

 

Dchil already explained why it's kinda moot to have zombies spawn in when within range and it would also be an easy way to see if players are/were there.

 

That would be a pretty fair idea for loot spawning as well and then using a cooldown timer for the loot spawner to handle loot respawns.

Share this post


Link to post
Share on other sites

why the zombies though? why not the loot?

 

you rarely see loot outside from a distance, so just instead of zombies spawning in (how it's done in the mod and bad way of doing it) make the loot spawn it when you're within a certain radius. unless it's already being handled this way, if so then too bad just try and optimize it as much as possible.

 

Dchil already explained why it's kinda moot to have zombies spawn in when within range and it would also be an easy way to see if players are/were there.

 

This sounds like the best solution. Zombies are permanent entities on a server and therefore exist at all times and the loot only spawns in when you get within a certain distance. Not sure how that would work with performance but I guess that's for the devs to figure out, eh?  ;)

Share this post


Link to post
Share on other sites

It's not a bad system, really. The only problem with the mod was that the radius for activating zombie spawns was too small, so you were able to tell where people where if there were zombies spawning. What you do is have each player have one radius (red), where zombies spawn and are actively updating on the server. These zombies get aggro'd, attack you, walk around, and do other normal zombie things. Players also have a second radius (blue) in which zombies are not actively spawned, but the ones that are there are not despawned either. Anything in that area is "asleep" and doesn't update. Once a zombie leaves the "asleep" zone, they have a countdown until they finally despawn or can be despawned immediately. So, if you're in Cherno and someone is in Elektro, zombies are active up and down the coast between the two cities, but not in Kamenka because there's no one anywhere near there. If a zombie enters the active zone it wakes up and continues on as if it had never gone to sleep in the first place. If a player spawns, during that load time the server can populate the zombies in that immediate area before the player is finished loading.

 

You could tie this in with a heatmap in 10-100 meter chunks. The map tracks zombie deaths in the area, and can be "depleted" of zombies (hot = depleted, cold = abundant(?)). This heatmap gradually cools, allowing more zombies to be spawned in an area. You could also do other fun things with the heatmap, like having an active vehicle cools the cell it's in faster and thus zombies spawn more around active vehicles. You could even tie loud noises to the heatmap, so being loud cools it faster and makes zombies spawn more, or have a dead player rapidly cool an area.

 

Edit: Forgot to mention, this also somewhat disconnects the zombies from fixed locations like buildings. You'd probably want a higher rate around the buildings and so on but you could still just spawn a zombie anywhere in the red and be good to go.

 

Edit 2: This is basically what Warframe does, with a heatmap and inactive AI areas around the player. They gave a nice presentation (Jump to Tac Area Map) at the AI summit at GDC last year on the subject.

 

WR2kiIs.jpg

Edited by Publik

Share this post


Link to post
Share on other sites

Why do you even debate about this? Dean said that they work on the system and it will be possible to have both the loot and the zombies on the map. Just trust him and dont suggest stuff we've already seen in the mod, because Im pretty sure the team knows about the features of their own mod.

Share this post


Link to post
Share on other sites

It's not a bad system, really. The only problem with the mod was that the radius for activating zombie spawns was too small, so you were able to tell where people where if there were zombies spawning. What you do is have each player have one radius (red), where zombies spawn and are actively updating on the server. These zombies get aggro'd, attack you, walk around, and do other normal zombie things. Players also have a second radius (blue) in which zombies are not actively spawned, but the ones that are there are not despawned either. Anything in that area is "asleep" and doesn't update. Once a zombie leaves the "asleep" zone, they have a countdown until they finally despawn or can be despawned immediately. So, if you're in Cherno and someone is in Elektro, zombies are active up and down the coast between the two cities, but not in Kamenka because there's no one anywhere near there. If a player spawns, during that load time the server can populate the zombies in that immediate area before the player is finished loading.

 

That's also a great idea for how something like this could be implemented in-game, the point being that I don't think a gajillion (that's a real number) zombies and loot items need to be spawned in the game at all times.  The spawning system could be based around both the player (as you suggest) and in-game areas as well by splitting up the map into spawning quadrants or any number of other methods.  There are certainly a number of different methods that could be used that would be a lot more efficient, in my opinion.

 

 

 

Why do you even debate about this? Dean said that they work on the system and it will be possible to have both the loot and the zombies on the map. Just trust him and dont suggest stuff we've already seen in the mod, because Im pretty sure the team knows about the features of their own mod.

 

This isn't a "debate."  It's a "suggestion" hence why I posted it in the suggestions forum.

 

I haven't heard the dev team talk about "how" they plan to handle the issues with both zombie and loot spawning...I only know how it's currently being handled which doesn't appear to be ideal or efficient as evidenced by what they've said about it themselves.  I'm not attacking the dev team or saying I don't trust them.  That's just silly.  Again, it's just a suggestion which could be used as a jumping off point for further development.

 

Yes, there were flaws with the mod's spawning system.  I'm not suggesting they use that exact same system but perhaps a modified version of it.

Edited by NeedsFoodBadly

Share this post


Link to post
Share on other sites

loot items

Well, the loot items don't need to be "spawned" per-se, but they need ought to exist on the server. If I come back to building X on Nth street for that can of tuna I passed over, it should still be there unless someone else looted it first. With zombies though, I don't care if zombie X is the same zombie X I smacked in the face and ran away from. Zombies are mobile so it probably walked off somewhere else.

 

I'm pretty sure right now loot items don't visually spawn on the client-side until you get close, at least that's what I've experienced. Loot tends to pop into view when I get within 20m or so, and I'm running on high settings.

 

Edit: There's a suggestion here about gunfights and preventing people from spawning in during a fight. You could use a similar heatmap to the zombie activity for a "danger" map. If an area sees a large volume of gunshots and players getting shot, it heats up the map. If you try and spawn within a "hot" area it doesn't let you in or makes you wait until the area's cooled down enough to spawn :) Combining multiple heatmaps along with some player radii is the way to go.

Edited by Publik

Share this post


Link to post
Share on other sites

You would likely still see performance issues with this method.  The server will still have to track player locations and monitor them to see if the player is within an area that should trigger a zombie spawn event.  It seems to me as though it would be trading one type of performance overhead for another and present with no real tangible gains.  

Share this post


Link to post
Share on other sites

You would likely still see performance issues with this method.  The server will still have to track player locations and monitor them to see if the player is within an area that should trigger a zombie spawn event.  It seems to me as though it would be trading one type of performance overhead for another and present with no real tangible gains.  

It already does track player locations. You're trading off a distance check (is my distance to zombie squared > active distance squared?) for an entire zombie update, whatever that involves. Adding multiple heatmaps etc would add to the overhead, but would make the system a lot "smarter". A simple heatmap could be represented as a byte[,] which can be on the smaller end of things. It'd be a byte[150,150] for 100m heatmap chunks or a byte[1500,1500] for 10m chunks, or you could do 25m or 20m chunks etc. At 10m chunks that's about 2 1/4 MB of extra data to store in memory.

 

The current method seems to be to spawn a zombie anywhere on the map and then constantly update all of them, even if there are no observers nearby.

Share this post


Link to post
Share on other sites

The new system incorporates a network bubble that prevent the player from loading any entities that are too far away so that side is doining much better. The server will still have to take the stain of the zombies but they tend to very powerful anyway and with the improvements to the system and the use of multiple core usage for servers will iprove this further so I think they are going to do fine.

 

You method has the unfortunate side effect of letting players know if there are people around by looking if zombies have spawned.

Share this post


Link to post
Share on other sites

The new system incorporates a network bubble that prevent the player from loading any entities that are too far away so that side is doining much better. The server will still have to take the stain of the zombies but they tend to very powerful anyway and with the improvements to the system and the use of multiple core usage for servers will iprove this further so I think they are going to do fine.

 

You method has the unfortunate side effect of letting players know if there are people around by looking if zombies have spawned.

 

Spawning zones would not have to be limited to a small area or just a town.  The illustration was just an example.  The spawning zones could be much, larger to prevent players from scoping an area out to search for indicators of other players, if they could see a zombie, it would be an indicator that they themselves were possibly within the spawning zone.  As I also mentioned, spawning zones would have cooldowns, so zombies would constantly respawn with a player in the area.

 

This is of course just a suggestion that could be incorporated as part of other methods.

Share this post


Link to post
Share on other sites

Rocket actually did post a discussion about HOW they are trying to balance entity spawning.  I couldn't find it to link it, but as a game developer myself, it was really scary to read.  Currently they use scripts to create loot and zombies.  And this script causes too high a load on the server, hence why respawning is disabled.  They are trying to get the engine to manage entity creation now, so that they can get up to that 4000 number.  From the way they talk, it still sounds like they are modding, rather than building a standalone.

 

The problems they listed for the mod and the SA are not solved by the OP ideas.  They do not want the server to always be checking for players.  The Arma engine broadcasts each players events to ALL players on the server.  If you open a door in Kamenka, it tells the guy in Berezino.  To lessen the load, Rocket tried to make a system that was not based on players.  Loot is there all the time, zombies are there all the time.  Adding conditions to the process just doesn't scale well with Arma.

 

If you create a spawn ring, much like the mod, the engine will get bogged down and we will end up back in the days of nothing spawning.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×