Network LOD/AOI

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Network LOD/AOI

Postby tichfuie » 22 Jun 2013, 02:55

was wondering if SFS out of the box handle netword objects LOD or AoI(player area of interest)

let me clarify more,
lets say i want to make large world/room where i can fit a few hundred players in it,
but i would like to have player area of interest where the player can only see/receive network traffic only to his predefined radius/area of interest, so the player/client will not receive all network synch from other players that are far away from him, to save bandwidth and server resources.
others call it network LOD or AoI



is this already implemented in SFS?

if not has someone already tried it that wold like to share thoughts or examples?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 22 Jun 2013, 08:09

Hi,
no it's currently not supported, so you should write your own AOI code on the server side via Extensions.

I also have to say that we've been thinking about this for quite a long time and will probably put out a solution in one of the next releases. At the moment there's no release date for this. Might be the end of the year.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Re: Network LOD/AOI

Postby tichfuie » 23 Jun 2013, 18:40

Thank you Lapo,

That will be great if you guys add this feature as part SFS.

this will enhance SFS,

well, knowing that you guys will add it this year, We can wait and
focus on other stuff then,

thanks and looking forward to this new feature
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 23 Jun 2013, 20:10

Ok good.
Our plan is to create a new type of Room that will be able to handle thousands of players and be based on AOI, so all existing requests (public message, private message, user variables etc...) will keep working although they will no longer use the room's user list but the "proximity list".

In theory one should be able to use a different AOI for each request, if so desires.
We're also studying several optimizations to make the AOI search very fast and generate small deltas for the update of the proximity lists.

If there's any idea that comes to mind, post your suggestions here.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
foxboy
Posts: 110
Joined: 12 May 2011, 02:47
Location: Optimal Solution Pte. Ltd.

Re: Network LOD/AOI

Postby foxboy » 25 Jun 2013, 16:08

tichfuie wrote:Thank you Lapo,

That will be great if you guys add this feature as part SFS.

this will enhance SFS,

well, knowing that you guys will add it this year, We can wait and
focus on other stuff then,

thanks and looking forward to this new feature



I am just thinking, but maybe this can be achieved using the Room Groups but with some custom algorithm on the server extension. Where a player will be dynamically joined into a different room/room group depending on the player's movements. We can treat that group as "Within the player's proximity" and only receives updates on that group. Just my idea anyway. But if SFS will support this natively, that would be very helpful. :)
"Dream it, I'll code it..."
Lead Developer
Optimal Solution Pte. Ltd.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 25 Jun 2013, 17:00

It's kind of difficult to map those rooms within a group to a coordinate system ...
Lapo

--

gotoAndPlay()

...addicted to flash games
tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Re: Network LOD/AOI

Postby tichfuie » 26 Jun 2013, 01:42

@Lapo,
well while you requesting suggestions to enhance SFS, i think once you guys add natively support for network AOI, which will enhance and help a ton to SFS support thousands of players in one single room,

the one thing left that comes right out of my head is to SFS support some sort of server side collision detections for unity3d, this will help so much while building a large world/mmo and setup server side collisions to prevent payer walking thru walls to cheat etc, i am not talking about networked physics for gameplay, but a simple and SFS natively easy to use server side collision detections to remove the stereotype that most socket network engines have nowaday to be numb when i comes to server side collisions, i know that this feature may be a game specific feature but most if not 80% of games requires this feature to prevent players from cheating walking thru buildings or walls
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 26 Jun 2013, 07:24

Given a set of coordinates and relative bounding boxes for each player it could be done.
The only problem I see is that these kind of features usually require server and client collaboration. If you shoot the player's key presses to the server and then wait its response to move, it will make the game less smooth.

The best solution is probably a clever mix of client-side collision to allow smooth animations and server-side checks to control that players are not cheating. In case the server detects a user going through a wall it will correct the problem and dictate the new correct coordinates.
Makes sense?
Lapo

--

gotoAndPlay()

...addicted to flash games
tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Re: Network LOD/AOI

Postby tichfuie » 26 Jun 2013, 15:28

yes, it does makes sense,
altho, still i would not know where to start when doing this, and i was hoping that SFS staff make it easier for us to add such a thing by adding this feature natively to SFS,
anyways, i imagine this will be kinda of hard for you guys to add due oif the client/server circunstances, so i assume this will be even harder for us game devs to incorporate,
but anyways, i think with the networked AOI planned feature will be quite an addon for us, one thing less we need to worry about creating it from scratch.

thank you again.
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 26 Jun 2013, 15:55

We have an example of how to deal with this kind of collision detection here:
http://docs2x.smartfoxserver.com/Exampl ... battlefarm

It's done in Flash. Even if you're not familiar with it you can take a look at the code which is very C#/Java like.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Re: Network LOD/AOI

Postby tichfuie » 26 Jun 2013, 16:09

thank you,

anychance for a unity example in a 3d game?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 26 Jun 2013, 18:24

At the moment no, but as I said, it is pretty much irrelevant which language you use. It's more about the logic than anything else.
Lapo

--

gotoAndPlay()

...addicted to flash games
tichfuie
Posts: 26
Joined: 28 Aug 2012, 21:53

Re: Network LOD/AOI

Postby tichfuie » 19 Sep 2013, 05:09

Lapo wrote:Ok good.
Our plan is to create a new type of Room that will be able to handle thousands of players and be based on AOI, so all existing requests (public message, private message, user variables etc...) will keep working although they will no longer use the room's user list but the "proximity list".

In theory one should be able to use a different AOI for each request, if so desires.
We're also studying several optimizations to make the AOI search very fast and generate small deltas for the update of the proximity lists.

If there's any idea that comes to mind, post your suggestions here.

cheers

was wondering if this feature is still planned for next SFS release,? and if so any ETA on the release?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Network LOD/AOI

Postby Lapo » 19 Sep 2013, 08:10

Hi,
yes it is. Since someone else also asked the same questions yesterday, please take a look here:
viewtopic.php?f=18&t=16432

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 49 guests