Altitude Game: Forums  

Go Back   Altitude Game: Forums > Altitude Support > Tech Support
FAQ Community Calendar

Tech Support Trouble running the game? Found a bug? Post here.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2010, 09:23 PM
phong phong is offline
Senior Member
 
Join Date: Jul 2009
Location: Chicago
Posts: 372
Default JSON ClientAdd/Remove Issue

If a client joins one of my servers, then switches to one of my other servers without disconnecting first, the new server clientAdd entry is processed before the old clientRemove.

I initially join server 1 (port 50006):

{"port":50006,"time":78596016,"player":0,"nickname ":"phong","vaporId":"xxx","type":"clientAdd","ip": "xxx:12219"}

I hit escape to open the server list while still connected and go directly to another one of my servers (port 50001):

{"port":50001,"time":78603527,"player":1,"nickname ":"phong","vaporId":"xxx","type":"clientAdd","ip": "xxx:12219"}

{"port":50006,"time":78603803,"player":0,"reason": "Client left.","nickname":"phong","vaporId":"xxx","type":" clientRemove","ip":"xxx:12219"}

Is that the normal process?
Reply With Quote
  #2  
Old 02-26-2010, 09:43 PM
lamster lamster is offline
Administrator
 
Join Date: May 2008
Posts: 1,655
Default

That looks like correct behavior to me. Is it creating a problem for you?

Here's a typical situation that would produce these log entries:
1) Client is playing on server #1, trying to auto-join server #2 which is currently full
2) Client sends an automatic "I want to join #2" message periodically while auto-joining
[150 milliseconds later]
3) Server #2 receives join request from client and says "I've got a slot open that you can use, go ahead and connect" -- clientAdd entry appears in server logs as slot is reserved for new client -- notification packet "you're clear to join #2, come on in" is sent to client
[150 milliseconds later]
4) Client receives "clear to #2" message, sends server #1 a disconnect message, and begins synching up with server #2
[150 milliseconds later]
5) Server #1 receives disconnect message from client, clientRemove entry appears in server logs
Reply With Quote
  #3  
Old 02-26-2010, 09:44 PM
Shogi Shogi is offline
Junior Member
 
Join Date: Jan 2010
Location: Brazil
Posts: 19
Send a message via Skype™ to Shogi
Default

I think it makes sense if you think that, the game will try to connect first, see if you can get a spot on the new server and only then disconnect you from the current.

This way, if you try to join a full server, you won't be left hanging on the Server Browser screen.

There must be way of asking the server first, but it would fail in case two players tried to join simultaneously.

2c.

EDIT: Lamster was faster.
Reply With Quote
  #4  
Old 02-26-2010, 09:57 PM
phong phong is offline
Senior Member
 
Join Date: Jul 2009
Location: Chicago
Posts: 372
Default

That's what I assumed I just wanted to verify. It's a problem with the current code but I'll fix that so no prob, thanks.

Last edited by phong; 02-26-2010 at 09:59 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
2008 Nimbly Games LLC