Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Client loading entities

4: Adsense

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   

1486
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?

#2 SeanMiddleditch   Members   

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

Game Developer, C++ Geek, Dragon Slayer - http://seanmiddleditch.com

C++ SG14 "Games & Low Latency" - Co-chair - public forums

Wargaming Seattle - Lead Server Engineer - We're hiring!


#3 hplus0603   Moderators   

11126
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   

1486
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   Members   

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