Hello!
I`m developing a game and this is how it works:
1. User connect to the server, join to the main room and wait "start".
2. When playercount in the main room is 3, the server send a name of the game room to all connected players.
3. All 3 players disconnect from the main room and connect to a new game room.
4. game start.
And all works fine while I`m use the limit on players not more than 3. But when I`m try to change it to 5, some players doesnt connect to the server. Sometimes they dont get "start" from the server (80%), and sometimes they get it but cant connect to the new game room (20%).
This is a code that I`m use on server side:
if (PlayerCount == 3)
{
this.timer2 = AddTimer(delegate
{
PlayerIO.BigDB.Load("racer", "game_name", delegate(DatabaseObject user)
{
game_count = user.GetInt("count", 0);
user.Set("count", game_count + 1);
user.Save();
foreach (Player u in this.Players)
{
u.Send("start", game_count, info_list);
}
});
}, 3000);
}
I`m add timer because I thnk that this may help to sync players but it doesnt help.. (
If you need I can provide you all code with my connect from AS3 and the server side code too.
Please advice what can be the reason of this issue...