Open DMeville opened 6 years ago
Short of having some central server to sync that data, don't think there's a way to do this. Could let one player control all the unloaded enemy data, when another player loads him ask the other player for info on the enemy if no one has the enemy in scope.
Is there a way to reload an entity when you re-enter scope if no one else took control of it?
Eg. Player A loads game and there is an enemy. Player A runs away, enemy is despawned because out of scope. Player A returns, and enemy is gone. How to make the enemy come back?
There is no way to network the state changes though. Eg, Player A damages enemy. Player A runs away. Player B enters enemy's scope, enemy would have full health. Because B was never in scope when A damaged enemy, so the update never comes through. B has no way of knowing A damaged enemy.
Short of saving that data out, sending it over the wire, and letting B pick it up. Essentially that would be sending the state without an entity, which could be too hard on bandwidth... HMMM