Multiple rooms issue with proximity list

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

Moderators: Lapo, Bax

CineTek
Posts: 5
Joined: 26 Jan 2020, 22:23
Contact:

Multiple rooms issue with proximity list

Postby CineTek » 26 Jan 2020, 23:43

Hello there,

Overview
-------------------------------
our gameplay is divided into two separate rooms:

1. world room (mmo-room where players walk around)
2. battle room (regular room being spawned whenever two players battle against each other)


The world room uses the proximity list to spawn and remove player entities automatically; when a battle starts, the player stays in the MMO room but also joins the battle room.
-------------------------------
Problem

All goes according to plan except, when one of the players disconnect during the battle while being in the proximity list of each other.
What happens is that the remaining player returns (from a visual POV only) to the world view but the disconnecting player remains apparently in his proximity.

The remaining player receives two OnUserExitRoom events, one for himself and one for the disconnected player. However, the proximity list does not contain the disconnecting player. In fact, the proximity list gets triggered on the client, but with an empty list -> the removedUsers are empty

So my question is, is that the expected/by-design behavior?



I can see a client-side "hack" being to remove the user from the whole game manually when a disconnect happens (our server happens to send the reason why a battle is over (forfeit, disconnect, won/etc) already - however that seems strange in my opinion.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple rooms issue with proximity list

Postby Lapo » 27 Jan 2020, 08:23

Hi,
what version of SFS2X are you using?
What client side platform are you using? And what version of the client API?

Essentially you're saying that two users in an MMORoom don't get updated correctly when one disconnects, whereby the remaining player does not get an update via the removedUsers list passed by the PROXIMITY_LIST_UPDATE event.

Is that correct?
Lapo
--
gotoAndPlay()
...addicted to flash games
CineTek
Posts: 5
Joined: 26 Jan 2020, 22:23
Contact:

Re: Multiple rooms issue with proximity list

Postby CineTek » 27 Jan 2020, 11:46

SFS2X: 2.13.6
Client Unity3d with C# API 1.7.12

When both users are inside the mmo room and disconnect, then everything works fine.

Essentially you're saying that two users in an MMORoom don't get updated correctly when one disconnects, whereby the remaining player does not get an update via the removedUsers list passed by the PROXIMITY_LIST_UPDATE event.
Yes but only:

If they are participating in an additional room (the battle room) at time of the disconnect then the disconnect is not handled properly inside the mmo room.

So key here is the additional (regular) room being active during the disconnect.

I need to verify if the proximity list only affects the users that were in the same battle room or everyone else as well.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple rooms issue with proximity list

Postby Lapo » 27 Jan 2020, 14:17

Ok, thanks, we'll try to reproduce the issue joining both an MMORoom and a regular Room.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple rooms issue with proximity list

Postby Lapo » 27 Jan 2020, 17:54

We were able to reproduce the issue. We'll investigate the problem in the next days and prepare a patch with the fix.
I'll post an update when it's ready.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
CineTek
Posts: 5
Joined: 26 Jan 2020, 22:23
Contact:

Re: Multiple rooms issue with proximity list

Postby CineTek » 27 Jan 2020, 19:44

That is a relief! Would you recommend us upgrading to 2.14?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple rooms issue with proximity list

Postby Lapo » 28 Jan 2020, 08:20

CineTek wrote:That is a relief! Would you recommend us upgrading to 2.14?

No, not for this specific issue at least. It looks like the problem originates in the client side API so, if everything goes well, we'll be releasing a new client update in the next few days.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
CineTek
Posts: 5
Joined: 26 Jan 2020, 22:23
Contact:

Re: Multiple rooms issue with proximity list

Postby CineTek » 29 Jan 2020, 18:06

Thanks for the help and the quick fix! (C# API Patch v1.7.13)
User avatar
Metlmeta
Posts: 9
Joined: 23 Jul 2021, 22:58

Re: Multiple rooms issue with proximity list

Postby Metlmeta » 23 Jul 2021, 23:05

Hey Lapo,

I've encountered this same exact bug! I'm currently working on an updated Haxe client port and was looking to implement your fix: https://github.com/Metlmeta/smartfox-haxe-client

Could you PM me or share details on what causes this bug client-side? Any help or direction is appreciated.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Multiple rooms issue with proximity list

Postby Lapo » 26 Jul 2021, 07:32

We've replied via email, since you already contacted us for another issue.
Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 42 guests