best practice for many items in a multiplayer open world game?

The 2 problems I’m trying to solve in multiplayer open world game are:

  • players dropping items everywhere and eventually lagging the game

  • players dropping items leaving, and the item is persistent in (roughly) the same location they left it in.

Here are some of the ideas I have on the top of my head, I’m not well verse in this so I’m asking you guys so feel free to tell me ideas I didn’t mention. I am already thinking about one method on this list but never hurt to ask the community if there is a better method. Also which method you prefer?

Idea 1:

Just leave items on the ground. And when the item is not moving, I convert the physics items into a non physics item, but each non physics actor still builds up an overhead expanse. And this just piles up items

Idea 2:

If player leaves too far the item just despawns. Would prefer not this method as want persistence. Also if player drops too many items then still lags the game.

Idea 3:

When players drop too many items, eventually when a limit is reached then the items will auto consolidate into a ‘pile’ which acts as a created inv. Kind of fix the drop too many items lag the game issue as consolidates multiple actors into one actor.

Idea 4:

Use a zone grid system where if a player drops an item and player leaves a certain distance the zone will store what items are placed and location and despawns the item. Seems good but still have issue where the player dropping so many items that lags and crashes the game, so just accept that?

Hey, if this is multiplayer then culling on clients should be happening anyway in theory. The server will still have all the items loaded but yes the right idea would be a LOD type system so at certain distances, hide the mesh, disable collision, physics wtc. This should then allow them to have very little overhead. If you implement a pooling system as well potentially this could also help.

The idea of pooling items in a close proximity into a “lot bag” seems smart, once bagged, storing the items as an array of soft object references could help with overhead

Loot Items in world are placeholders for the “real” useable items.

  • Low poly mesh
  • extremely simple materials
  • As low data as possible
  • Zero use functionality
  • Netcull distance should be roughly 150m. This will handle a lot of the “client load”.

Do you really need drop physics? Is it worth the client load?

Set a realistic number for replicated world items. Each actor is stored in the servers memory, whereas clients only load what’s “relevant”.

Any item picked up by the player and not attached and visible should be stored in inventory as simple data. This allows the server and clients to reduce load.

1 Like

Here’s a pic of an old real time collision based loot spawning system I did in UE4. Open world, looter shooter. Server spawns the items on authority collision with the Loot Spawner itself.

Loot Spawners are configured with a list of what it can spawn. The server chooses from that list. Max 3 items + ammo if a gun is spawned.

Spawned 1009 placeholder items in roughly 1 second. The items have a 250m netcull distance and a 50m Draw distance. Netcull is higher than normal because the game has vehicles that move at high speed. This gives the server and client time to spawn and replicate the new actors before the client can actually see them.

1 Like

always wonder about culling and spawning for games where players are in something really fast like a car or vehicle, any other advice for that?

It’s fast - I do a swap between an ISM and a physics actor which is similar to a cull and spawn and can get decent amounts swapping in:

Depends on what you are spawning and how impactful it is visually to game play. Other factors such as Map size, total number of spawned/networked actors in the world, number of players etc factor in to this.

Specifics matter because tech debt adds up pretty quick.