Problem with proximity list updates

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

Moderators: Lapo, Bax

gbarnes
Posts: 16
Joined: 08 Apr 2014, 13:12

Problem with proximity list updates

Postby gbarnes » 09 Jan 2015, 13:31

Hey there,

I recently ran into a problem with the mmo room. On our server we have one zone with a main room called world. In our game the players will be able to create private instances for example a tavern room. I implemented the mechanism that will create a new room for the player whenever he / she wants to enter his / her tavern instance (if it doesn't already exist). The player will leave the world room and joins the tavern room. So far everything works just as supposed to, but whenever the player leaves the tavern again and wants to rejoin the world the rejoined player won't receive any proxmity list updates.

I guess the player isn't correctly "removed" from the proximity list in the world room. Is there any way to retrigger the proximity list update or remove the player from it for the specific player after rejoining the room? I don't know why it even happens in the first place because the player leaves the room anyway so he shouldn't be in the proximity list anymore?

I tried to set a new user position outside the aoi, but the major problem with this is, that I can only do this after the player already joined the tavern room and I have no reference to the room the player was last joined to before joining the tavern room since getLastJoinedRoom will only return the tavern room since this is the last joined room.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with proximity list updates

Postby Lapo » 09 Jan 2015, 16:29

Hi,
what version of SmartFoxServer are you using?

Have you checked for server side errors that may occur during the room changes or immediately after?
Are you both joining and setting the initial position each time? (via setUserPosition...)

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
gbarnes
Posts: 16
Joined: 08 Apr 2014, 13:12

Re: Problem with proximity list updates

Postby gbarnes » 09 Jan 2015, 21:50

I'm using version 2.9.0 and yes there are no server side errors occuring I already checked several times. Everything seems to act normally and our spawning process is working too.
In order to back up my statement about the player never leaving the proximity list of the world room after leaving it I ran some test:

After I rejoined the world room I flew out of the aoi I was in, before joining the tavern room and flew back into the aoi again. This triggered the proxmity list of course so there this tells me that the server still thought I never left my old aoi after rejoining the world room (hope you understand what I mean).

At every spawn process (which happens upon join) the server is told to set the new user position via the mmo room api. So when I leave the tavern room and rejoin the world room the server will set reset the player position.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with proximity list updates

Postby Lapo » 12 Jan 2015, 09:54

Thanks, can you specify which client API / Version are you using?
Lapo

--

gotoAndPlay()

...addicted to flash games
gbarnes
Posts: 16
Joined: 08 Apr 2014, 13:12

Re: Problem with proximity list updates

Postby gbarnes » 14 Jan 2015, 18:15

Hey Lapo,

I just recently updated to the newest Client API Version and the error still occurs. I ran into another error which might be related, but it might be our game code I don't know yet. I just don't know why this happens.

We are using MMOItems to place item spawns around our game world. As mentioned before we currently have multiple rooms representing different sections of the game. In order to test stuff outside the world we have a room called DevWorld which is basically just a playground to test new features. In there our item spawn mechanisms work fine, but in our real game world no item will be every spawned (triggers a proximity list update).

I never receive any proximity updates from those MMOItems as if they wouldn't exist within the world. I double checked everything and I can't determine the source of the issue since everything just works perfectly fine in our DevWorld and it runs the same code. We are using the MMOItems for some other World Entities, too and those work within the World-Room as supposed to. Only the SpawnPoints as we call it never trigger any proxmity list updates when they get spawned or when one player enters the proximity list.
gbarnes
Posts: 16
Joined: 08 Apr 2014, 13:12

Re: Problem with proximity list updates

Postby gbarnes » 16 Jan 2015, 15:08

Sorry for the double post, but I fixed the second problem so this was on our side. Someone just baked the worng item spawn point data and imported that into our database. The first error when switching rooms still persists, though.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with proximity list updates

Postby Lapo » 16 Jan 2015, 17:20

Thanks.
Can you send us a stripped down example that reproduces the bug?

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
gbarnes
Posts: 16
Joined: 08 Apr 2014, 13:12

Re: Problem with proximity list updates

Postby gbarnes » 17 Jan 2015, 16:55

Hey Lapo,

I'll try and strip down a working example for you, but since our project is very big I can't make any promises. The project is under NDA so I need to verify with my CEO first. Maybe an alternative might be to provide you repository access.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Problem with proximity list updates

Postby Lapo » 19 Jan 2015, 09:51

A stripped down proof-of-concept is what we need. If there's an NDA to sign, no problem.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 148 guests