I am making a turn based RPG and am trying to figure out how to integrate multiplayer into our game. I need to send an object(which I can serialize) from one user to the another user(the host). The game will calculate everything on the hosts device then send the result back to the other player. My question is how could I send a string(the object that has been serialized) from one user to another? When I did my initial research, I though that it could be accomplished via pushing, but that seems to only send messages to the users device.
You can use business logic to accomplish something like this.
When a user performs a move, perform a Save request to update the game state in your backend. Then, have a pre-save (or post-save) Collection Hook, which you can use to trigger some action. While the native java library doesn't support push directly, you can use a third-party service to send in a push in this business logic.
over 7 years ago
I actually found a much better way to do this. I can just serialize the object and upload it to kinvey with a key that only the other player has. The other player can then just download the file and deserialize the object. After reading the file, it can be deleted. This avoids the need to use push mechanics and business logic altogether.