I have a problem, i'm trying to run my game on VPS and i have an issue.
I setup my smartfox server like docs said, everything worked perfectly until ...
I decided to send my players positions and rotations with UDP protocol. The packet is being sent suyccessfully (as my trace says), but the client that should receive it , doesn't. I made a lot of Debug.Log (clientside , yes im using unity) and traces (serverside) and it appears that the problem lays somewhere between.
Everything works perfect if i change the protocol to TCP, positions and rotations are sync correctly, but i wanted to use udp instead. Here is my code.
Code: Select all
int userId = obj.getInt("id");
User user = UserHelper.getUserById(actualroom, userId);
//if the user leaves the room we dont send transform anymore
if(user==null)return;
//sending the position with UDP protocol
send("transform",obj, UserHelper.getRecipientsList(actualroom),true);
Of course the client has InitUDP with correct parameters setup correctly, i mean right after the successful login. Also made a debug to make sure its initialized and available and console returns values of true.
So i dont really understand why my client does not receive any information (onextensionresponse) where it should.
I will say another weird things -> when i join with more clients (like 2,3 or more) everything works again, the first clients (like 1-2) dont get any informations, the extensionresponse does not see anything but next ones see everything. Please help.