Forum Multiplayer Bug found on concurrent login

Discussion and help relating to the PlayerIO Multiplayer API.

Bug found on concurrent login

Postby prsolucoes » March 26th, 2010, 1:33 pm

Hi,

Im testing my game(Evangel - http://playerio.com/forum/showroom/evangel-t117) on development server and i discover a little bug, when nobody create the room and have too many simultaneous connection the server dont show some users on users list, like the first that make login.

This problem dont happen when you already have a logged user on the room that the other players are logging, so the rrom need one user logged to this bug dont happen.
prsolucoes
 
Posts: 47
Joined: March 18th, 2010, 3:20 pm

Re: Bug found on concurrent login

Postby Toby » March 26th, 2010, 2:42 pm

Hi,

I'm testing my game(Evangel - showroom/evangel-t117) on a development server and I discovered a little bug: When nobody creates the room and there are too many simultaneous connections, the server doesn't show some users on users list, unlike the first that logs in.

This problem doesn't happen when you already have a user in the room when the other players are logging in, so the room needs one user logged so this bug doesn't happen.


Are you constructing this log in system yourself? I didn't quite understand what your problem was but if you mean that, while the first user does see every user who is logged into the room, users who join after do not see those who have joined before them, then this is because when they join they are not, by default, aware of them.

When a new user joins, the join event broadcasts it to all players in the room. So, if a user joins the room after that event has been broadcast, they have no way of knowing that user was ever there. The best way to fix this is to add a player.Send to the playerJoined procedure that sends the newly joined user all the current users in that room.
User avatar
Toby
 
Posts: 86
Joined: January 14th, 2010, 4:01 pm

Re: Bug found on concurrent login

Postby Oliver » March 26th, 2010, 3:02 pm

When nobody creates the room and there are too many simultaneous connections, the server doesn't show some users on users list, unlike the first that logs in.


I don't quite understand the problem either. Can you elaborate?

I can tell you that the development server is much slower at creating rooms (since it needs to update the GUI), so it's a possibility that there is a race condition when multiple players try to create the room at the exact same time on the development server.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer