Lack of connectivity - what to do?

0 votes
Hello everyone,

its been a while since Ive statrted using your SDK,  I encountered an issue and I would like to ask for relevant solution

Im developing a Social games, which involve Turn base rooms. Im using appWarp so my clients keep the logic.

sometimes due to lack of connectivity , some Private updates are not recieved, it creates lots of problems, for example im sending 2 private updates between the clients before I start the game, the textures I need are loaded when both sides got "on game stated", sometimes only one client gets it and the other is still waiting, most of the time its ok.

Is there anything i can do to prevent lack of connectivity?

Thanks,

Tamir.
asked Jun 22, 2014 in Discuss & suggest API by tamirsagi (10 points)

1 Answer

0 votes
The clients receive the private update message fine but not the onGameStarted? Do you receive any message after onGameStarted or does the connection break and you need to reconnect?
answered Jun 22, 2014 by dhruvc (1,099 points)
No,I gave one example of "lack of connectivity" , one client sends it successfully and the other party  does not receive  it.
one of the things I've decided is to sends messages in order to start games properly. for instance, one player is inside a game and the other is waiting for "start game" or something like that. So one user sends a message if the other one gets it he will reply  "I'm ready" and then, while the clients gets "i'm ready" he starts the game.

any solutions?
The clients communicate with the server over TCP so you are guaranteed in order delivery unless there is a connection break. In which case the client needs to reconnect.

Is your question that you are missing private updates in between? i.e. if A sends B 3 private messages (M1, M2, M3) then B only receives (M1 and M3) and not M2? You can also look at onSendPrivateUpdateDone and inspect the result code in it.
how will it help me?
I know that the only reason the messages are not received is because lack of connectivity. If i use my Communicator network  and not WiFi it might create problems in some places with bad reception.
Not sure what you mean by communicator connectivity.
In AppWarp if there is a connection loss, then you get onConnectDone with error code connection_error. Are you getting that on the client who you say has "lack of connectivity".
I will try to explain again.

Both users are connected to appWarp.  one of them opens a room and the other one looks for a room(matchMaking)  when he finds him he joins the room. when a user join a room I send several messages ( using Send Private message) before I send "Start Game " command.  when both users are ready , onGameStarted is sent to both Of Them and then my Textures and Rules take place and game starts properly.

Sometimes, because lack of connectivity One player receives the entire messages   and send start game while the other one does not get the OnGameStarted event.
then only one user is inside the game properly, and the other is outside waiting for the message to received.
as i mentioned, I send several messages and sometime  some of them are not received and it ruins my game.
 when I say Lack of connectivity I mean the 3G network /wifi/ reception  around is not so good.

Im looking for a solution, cause I believe there is some solution for those messages that i send and i get  an error.

Thanks for your help
One issue could be that client B's subscribe room is happening just a little after the other client (say A) has issued startGame. If this happens then client B will not get the onGameStarted notification. Can you ensure that the clients A and B do their handshake (using your private update mechanism) after they have got onSubscribeRoomDone with SUCCESS. This way you can be sure that the other client has subscribed the room before you send the startGame request.

In case you are not doing this already, please try it and check.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...