I’m trying to make collectibles spawn around the map via spawn objects, each spawn object will have its own possible spawns as well as chances for each of those spawns.
My question is how I can handle this for hundreds of spawn objects at a time without causing massive lag to the game, I’m not looking for specific code given to me, but rather a blueprint to the solution.
if you have streaming enabled you should not worry about it 100%
If objects are not moving and are anchored then its no worry at all.
Althrough if objects are moving and are changing you have to make this changes simulate on client most likely for best perfomance and take into account that objects can steam/unstream at any moment if streaming enabled.
Depending on the specifics of the objects, hundreds probably isn’t an issue. Unless they have heavy scripts or always are active in physics or something.
If it’s a concern, you can just determine where things will spawn, then have the server only actually spawn them in and/or start their scripts up when a player gets close enough and remove them temporarily if there are no players nearby.