Reading better, my problem is almost the opposite, I think. I should have synchronous communications, since the game is based on turns (as you can see, I'm really not a network engineerand for send event in real time. very quickly concurrently to all the devices.
Reading better, my problem is almost the opposite, I think. I should have synchronous communications, since the game is based on turns (as you can see, I'm really not a network engineer)
Reading better, my problem is almost the opposite, I think. I should have synchronous communications, since the game is based on turns (as you can see, I'm really not a network engineer)
Sorry, I don't know how to explain well what I mean.
I'm trying to develop e websocket client-server turn based game using b4j + b4a.
Let's say PlayerA does his "move"; this info should be sent to all other players; PlayerC does not receive this info because of delay on his connection but the game continues and PlayerB does his move (also, during the game players who do not have the turn can act in other ways, then sending other informations).
So, even if anyway a player will receive all data in chronological order (I hope!) there will be many problems.
Since I think it would be absurd to send the complete state of the game every time (too much data to send and, moreover, it would not be enough since there are also players' extra-game actions), how to handle this?
[So far I had done everything in the local network, no problem, and I had not thought of this]
Thank you
Sorry, I don't know how to explain well what I mean.
I'm trying to develop e websocket client-server turn based game using b4j + b4a.
Let's say PlayerA does his "move"; this info should be sent to all other players; PlayerC does not receive this info because of delay on his connection but the game continues and PlayerB does his move (also, during the game players who do not have the turn can act in other ways, then sending other informations).
So, even if anyway a player will receive all data in chronological order (I hope!) there will be many problems.
Since I think it would be absurd to send the complete state of the game every time (too much data to send and, moreover, it would not be enough since there are also players' extra-game actions), how to handle this?
[So far I had done everything in the local network, no problem, and I had not thought of this]
Thank you
I have had trouble (it seems to be solved).An example we have 5 players, I am the player 4, I need to wait my turn to play, (wait the players 5,1,2,3) for play. so you need something to centralize who will be the next to turn to play. It is a brain storm
I guess Luca is more concerned for these occurences...
user does not respond and holds it's turn
user loses network connection and holds turn or didn't receive the turn info
I will also need to implement this STUFFI fear that each client must send each time a return receipt.
Unfortunately it is not so, it is far from be complete.You have a system which, when there are no delays, works correctly.
but players may also receive this notification too late; of course, the notification may also be composed of only one byte, but it could also be received with delay. Anyway I'll think better of your suggestions, @JordiCP. MANY THANKSIt isn't necessary to send all the info each time there is a movement, but only a notification so that the player A (in fact, to all connected players in that game), that will receive it, will connect to the server and get the latest state.
not so farmeanwhile the player is gone some place in the cyberspace
The track should be right but the implementation may not be so simple.I am guessing again, if we have arrays with data of player A, another array with info of movements of player B and so on. the arrays are data about moves etc .
We can put a counter, and centralize that data of each matrix in one big master array table(the array of all game state). When player A and B are synchronize , all of them will have the same counter number example 100 in their individual arrays and the big master array the same number 100 all of them are synchronized . that counters help to know if we are synchronized
when the player (clarinetist) arrive again with connection example 3 turns late, it will check the high value of counter of big master array table(where convergence all the other arrays) and compare itself, that counter high mean the most updated array. the player clarinetist is behind with the counter 97, that mean for the clarinetist lost 3 compasshaha, hence, it will download the latest matrix data of players A and B to show it in the board game. or perhaps download only the big master array table with all the actual movements. if we need history of movements, we can save each movement player and counter number in the matrix, and show or download to the player clarinetist
Since I'm not talking about disconnection and reconnection but about delays, when the clarinetistwhen the player (clarinetist) arrive again with connection
Instead of banging your head on the wall trying to reinvent the wheel, why don't you use the Google Play Game Services that offer everything you need to handle a turn-by-turn game? You will spend less time to understand how to use the library properly than to create your own server (to store the data shared by the players and dispatch these data each turn) and write all the required code. Even if you decide in the end to rely on your own stuff, that will show you what's needed and how it is supposed to work.
Also this is right and I tried but I just thought that I could not get the above functionality.Even if you decide in the end to rely on your own stuff, that will show you what's needed and how it is supposed to work.
I completely agree. I admit that I'm a bit fed up with the numerous changes introduced in this API since the beginning. That looks like they had not a clear idea of what to do and how to do it when they created the API.a) dependence on Google. Google changes many things often (see Firebase!) and I'd be forced to ask you to update your excellent library;
It depends on what you want to do exactly, but you're right for the main part. That's why some turn-by-turn games use in fact the real-time multiplayer classes.As I understood I would not have the possibility to allow players's actions when it's not their turn; so I thought I'd have more freedom, this way. To give an idea, while the current player "thinks to his move" and a ProgressBar indicates the time that he still has at his disposal, another player should be able to send an "object" to a third player. I think this is not possible using Google Play Game Services, or I'm wrong?
It is already so (also because clients could do some illegal things, like "now I have $ 1,000,000,000" or four acesThe server HAS to run the game and not the clients
Also this is done, using websockets.The clients stay constantly connected, via Node.JS or some other form of connection
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?