Why is RoomSettings.MaxUsers a "short"??

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Why is RoomSettings.MaxUsers a "short"??

Postby JuliusBtesh » 30 Mar 2015, 21:15

Is there any way I can get a large int value in this setting? Lets say, couple 100,000 users? Or is this value set and done?

I need to get this working.

Thanks!
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Why is RoomSettings.MaxUsers a "short"??

Postby Lapo » 31 Mar 2015, 07:25

There are several reasons:

1) 65K users in a Room is already an unrealistically high value for a single Room. Cramming so many players in a single Room is already a feat!
2) using 32-bit integers, clients could spam your servers with useless Rooms with a 2^31 users capacity and then attempt to spam them

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: Why is RoomSettings.MaxUsers a "short"??

Postby JuliusBtesh » 31 Mar 2015, 14:58

Thanks. I decided to go with the approach of creating room on server side. I noticed now that for some reason my rooms are not being removed from the server once they are empty (As the removal mode is set to "When Empty") . Is there something I can check to make sure the rooms do get deleted?

Thanks!
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Why is RoomSettings.MaxUsers a "short"??

Postby Lapo » 31 Mar 2015, 15:03

Make sure the Room's isDynamic flag is set to true. Otherwise it will be seen as a static Room and never removed.

Are you using MMORooms, I suppose, with such a high user count. Right?
Lapo

--

gotoAndPlay()

...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: Why is RoomSettings.MaxUsers a "short"??

Postby JuliusBtesh » 31 Mar 2015, 19:16

No I am not using an MMORoom, just regular room. I am not actually showing all the users in the room which is why I am using such a high number.

Also, The smartfox client shows that the room has the correct number of users that I set; ie: 500,000. But in Unity, when loading up the rooms. The number is some negative number. I am pulling an int. Why is the number being received wrong?
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Why is RoomSettings.MaxUsers a "short"??

Postby Lapo » 01 Apr 2015, 07:00

It seems to me that if you need an ultra-large Room without broadcast events then you need no Room at all :)

What is the advantage for clients of being in the Room? Couldn't they just login and that's it? What does the Room add for the user?

Thanks.
Lapo

--

gotoAndPlay()

...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: Why is RoomSettings.MaxUsers a "short"??

Postby JuliusBtesh » 01 Apr 2015, 13:24

The rooms are needed to keep track of the games the users are playing in. I believe I fixed my issue by just using a room variable with the amount of users this way I can display it correctly.
I can understand this doesn't make much sense with these large scaled rooms, but this is needed for this project.
I cannot just put users in a zone without rooms because the rooms need to be dynamically created on the fly.

Thank you

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 7 guests