Client loading entities
Suppose you have a large, seamless transition world that's not all kept loaded in memory at the same time. When a player enters a previously unloaded region, the server loads it up and then can easily send out the data to any players nearby upon completion. But how do you deal with players that move into that area after it's already loaded up. They need to have the data sent to them saying what to load and where. And you don't want to waste network bandwidth by constantly sending everyone "create X entity" messages when they already have those entities loaded. So what's the solution to this?
Each player keeps a list of entities it is "subscribed" to. When a player moves to a new area/zone/whatever, add/remove entities to its list of subscribed entities as appropriate and send the corresponding network message. Other players are not affected by this movement, other than that the player may be entering/exiting the areas of interest of other players (and hence may be added to or removed from the other players' subscribed entities list).
Sean Middleditch – Game Systems Engineer – Join my team!
you don't want to waste network bandwidth by constantly sending everyone "create X entity" messages when they already have those entities loaded
The google term you want is "interest management."
In general, this is a server-side mechanism that in some cases take almost as much work as the server-side simulation itself (because it, too, is n-squared in complexity.)
enum Bool { True, False, FileNotFound };
I kind of figured that would be the answer but wanted to check anyway. I found this article that seems to go over the topic nicely, thanks to that search term, though I'm not sure why it claims to be an O(1) algorithm.
I kind of figured that would be the answer but wanted to check anyway. I found this article that seems to go over the topic nicely, thanks to that search term, though I'm not sure why it claims to be an O(1) algorithm.
I wouldn't use that archived one. Here's a recent one. Basic idea is there for interest management.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement