Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Client loading entities


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Telanor   Members   -  Reputation: 1351

Like
0Likes
Like

Posted 12 June 2014 - 12:58 PM

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?

Sponsor:

#2 SeanMiddleditch   Members   -  Reputation: 6474

Like
2Likes
Like

Posted 12 June 2014 - 03:18 PM

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).

#3 hplus0603   Moderators   -  Reputation: 5547

Like
2Likes
Like

Posted 12 June 2014 - 04:43 PM

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 };

#4 Telanor   Members   -  Reputation: 1351

Like
0Likes
Like

Posted 13 June 2014 - 11:42 AM

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.

#5 Sirisian   Crossbones+   -  Reputation: 1774

Like
0Likes
Like

Posted 14 June 2014 - 06:14 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS