reasonable room size limit

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

brandon
Posts: 7
Joined: 28 Mar 2005, 22:47
Location: Portland, OR, USA
Contact:

reasonable room size limit

Postby brandon » 25 Apr 2005, 17:21

will performance suffer by letting a room get very large? for example, say, 500 users autojoin a default lobby room for a game. besides the user experience perhaps being a bit overwhelming by such a long list of players, would smartfox have problems handling such a crowded single room? It's just that I would like to keep from having separate lobbies, but I don't know if that will be a problem until it gets stress tested...

thanks again for the great product, though. soon I'll have a multiplayer drinking game ready to share!
User avatar
Lapo
Site Admin
Posts: 21081
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 25 Apr 2005, 21:39

In general it's not a problem for the server but it might be for the bandwidth to a certain extent.

Mainly the problem could be with the very long user list that a client would receive when the room has 3-400 or more users inside.
Also a single public message would need to be broadcasted to all those clients generating more traffic than a normal room with 30-50 max users.
Not to mention the chaos that is created by hundreds of users in a room sending public messages :)

We've been thinking quite a lot on this possibility and we have a few solutions we'd like to implement in the next releases.
For example you could have one single big room where all clients are connected but they only chat in a one-on-one system, much like instant messengers like icq, msn etc...

The application could be done of a single big room with no limits where all users are connected but they don't see a user list in real time, they browse a list of registered users that is kept on a database. Each time you see a different user profile you are also told if he / she's currently online and you can immediately open a window for chatting.

Also you could create smaller rooms for 5 to 10 people for chatting in groups etc...

In order to create this type of app it would be necessary to add a new type of room where public messages and the other broadcasted messages are disabled, but you can still use all the other functions... This would help in optimizing the data traffic while allowing many thousands users in a single room

In conclusion, the server performance is not going to degrade but if you need public messages in such a big room, network performance could be affected.
Lapo
--
gotoAndPlay()
...addicted to flash games
brandon
Posts: 7
Joined: 28 Mar 2005, 22:47
Location: Portland, OR, USA
Contact:

Postby brandon » 28 Apr 2005, 21:13

ah. thank you for the insight, Lapo.

In my game, I would like to have the lobby list not only the usernames, but also a number of other associated user details such as status, statistics, etc..., and so a player can browse and sort potential opponents while being able to compare them all. I am planning on using flash's data grid component to handle the display of this information, but I am finding that flash is not the most efficient tool for this. And so keeping this information constantly updated in a room of hundreds of players seems unreasonable.

And so I guess I am headed towards having separate lobbies with a limit of, say, 50 players each. Without server logic, how can I set it up so that users autojoin the next non-full room? Do I have to create a fixed number of these lobbies at startup from the config.xml, or can they be created as needed? Also, would it be wise to group them by region, to help the lag between international players?
User avatar
Lapo
Site Admin
Posts: 21081
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 Apr 2005, 12:36

If you're going to have many user profiles to browse in this big main lobby why don't you keep all the user info in a database, and access that through flash-remoting, webservices and similar?

In other words... if you're going to have all these user profiles I suppose you're going to store them in a db or xml file.
When a user enters the "main lobby" he/she can start browsing this "catalogue" of buddies and search them by different keys.
Each user profile will show all the informations plus the status (online / offline) of the buddy.

I don't know if this is what you're looking for. If it is, it wouldn't be too difficult to implement and you could use one single "main lobby"

Having many "main lobbies" could also be feasible. Since you can handle join room errors you could create a new "main lobby" when the join fails. But in general I'd go with the first idea.

Let me know if this helps :)
Lapo

--

gotoAndPlay()

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

Postby Lapo » 29 Apr 2005, 12:39

About the datagrid: the mx2004 version is not bad at all, unless you need to visualize hundreds of rows.
In that case I'd suggest to create a paging system to avoid having too many records in the component.
Lapo

--

gotoAndPlay()

...addicted to flash games
brandon
Posts: 7
Joined: 28 Mar 2005, 22:47
Location: Portland, OR, USA
Contact:

Postby brandon » 29 Apr 2005, 15:41

Yes, user data is going to be in a database, but I figured that each user would pull up his/her data when they connect and then set userVariables in Smartfox. I was thinking about using onUserVariablesUpdate to notify the other players in the room of any changes, and then update the datagrid accordingly.

The problem I see with the master player list pulled from the database is that it will be an extremely large list, mostly filled with players who are not online. I think it would be best to only show the online players.

Either way it seems that there will be far too many records to display in one datagrid, so either pagination or multiple lobbies will be needed. Thanks for the tip on the onJoinRoomError way of making multiple lobbies.

I've also seen some multiuser games solve this problem by having the user choose a room (sometimes based on region, so they click on their nearest country) outside of flash entirely - the list of 'lobbies' is created dynamically (maybe with php, etc.) Once a lobby is selected, the flash game starts but the user is stuck in that one room. Is there a way to retrieve room information from Smartfoxserver without having flash connect?

thanks again. I don't know how you have time to get anything done when you are always so kindly responding to these posts...
User avatar
Lapo
Site Admin
Posts: 21081
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 29 Apr 2005, 20:02

I don't know exactly how many users you think you're going to handle but even with many thousands you could introduce some filters to allow people narrow their search. At least this is what ICQ and similar programs do.

The problem I see with the master player list pulled from the database is that it will be an extremely large list, mostly filled with players who are not online. I think it would be best to only show the online players.

Of course, and even by filtering the on-line only you will have to add more search criteria or it will be frustrating searchin buddies.

Either way it seems that there will be far too many records to display in one datagrid, so either pagination or multiple lobbies will be needed. Thanks for the tip on the onJoinRoomError way of making multiple lobbies.


yep! A datagrid with 30-40 results for each page it's quite usable on the client side.
I've also seen some multiuser games solve this problem by having the user choose a room (sometimes based on region, so they click on their nearest country) outside of flash entirely - the list of 'lobbies' is created dynamically (maybe with php, etc.) Once a lobby is selected, the flash game starts but the user is stuck in that one room. Is there a way to retrieve room information from Smartfoxserver without having flash connect?


Sure, you can connect using any language capable of establishing a socket connection.
For example in PHP you could connect to the server as admin (using the right password) and retrieve informations just like the Admin Tool does.

Also we've already been thinking about adding a couple of extra server commands for external php/asp scripts to allow retrieving simple server data like the number of users for a zone etc... (without loggin as admin)

( We have a quite long wish-list for the future updates! :) )
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 15 guests