Multiplayer game that does not look the same for each user or gather the same data from each user???

LokitoesLokitoes Member, PRO Posts: 187

Hi guys,

I'm thinking of making a weird little multi player thing. But I'm terrible when it comes to network behaviours so I'm a bit scared of getting started. So I thought I would seek some advice first about whether this is even possible. This is my idea:

It's not so much a two player game as it is a two phone game, where both are inputting different things. One phone collects accelerometer data, and is displaying text on the screen depending on the accel angle. I've already got this part made. I want that accel data (or the text output itself might be better) to be tabled and sent through the network in order to affect something that happens on the phone of the second player.

So the phones don't mirror each other 's screens - they need to be in different scenes/camera views or even different apps (???) - instead, the second phone is changing its display depending on the accel of the first phone. So the screens don't mirror each other but one can affect the other. The second phone receives the information from the first, and changes what the player can do in the game based on this.

But there's an extra complexity- the accel data of the first phone isn't just constantly updating the second phone, instead, the phones need to wait for the second player to do something (eg press a button) in order for the second phone to update - otherwise the second phone will be just constantly bombarded with accel data if the first phone is being constantly moved around. For example, the first phone says "I am in the -Z state plus +Y plus -X state, so I am saying "blah"" and the second phone says "they are currently displaying text "blah", so your options are to press 1 or 2". The second phone then stops listening to the first phone (or at least stops constantly updating) until the player presses a button, after which the second phone is free to again listen to the data coming in from the first phone. It will then basically say "ok while we were waiting for you to press a button, the other phone changed from "blah" to "hi" due to changes in accel data, so now you have a new set of options to press based on 'hi"'.

GAH am I making any sense what so ever here? lol. To make things clearer (and stupider at the same time), my idea is that player 1, who is collecting accel data, is my DOG, so he can't input stuff, he's just moving the phone around because the phone will be mounted on his harness. The second player is me the human who can make changes on screen but isn't collecting their own accel data, because that 's only happening on the dog's phone. So my dog moves the phone around by walking around, and my phone will essentially say something like "looks like your dog is taking a pee, do you want to go clean it up?" and I click ''yes" and then it says "ok now it looks like your dog is sniffing something. do you want to also sniff something ?" or whatever ... Now that I've given myself away as a crazy person, does anyone think there is a creative solution for this? I'm sure it would be easier to just buy an accelerometer and do this a completely different way, but I'm generally comfortable in GS (much less so in Unity or others) so I'm trying to make it work in GS.

I guess my very first questions would be ... would these two views (screen of player1 and screen of player2) function as different scenes? Or diff camera views of the same scene? Or entirely different apps that are just using the same network? What's the best way to do a multi player game where both phones are displaying something different to each other?

Cheers!

Comments

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,159

    I was worried when the description started, but if I followed, and as it went on, it seems almost doable.

    My main worry was the possibility of constant updates. Unfortunately, GameSalad doesn't have realtime connections, so it has to constantly poll the server for updates (hence it tends to be billed for async multiplayer). Since you're game is effectively turn based, only one player has to "poll" at a time.

    Basics of setup:

    Game Info Table: Used to get info about the current game. I.e. who the other player is and some unique game ID key that is used to grab game state.

    Game State Table: Using the above unique key, send a get table request to get game state. This would include stuff like whose turn it is and information about what the current state of the game is (Player 1 is displaying blah and waiting for their turn. Player 2 is expected to send input for minigame x).

    Game Turn Table:

    This one is used to send the results of player input and is sent to the game.


    Flow:

    Step 1: Player 1 & 2 make a Get Table request from a matchmaking API that populates the Game Info Table.

    Step 2: Once that returns with data, both players make a request for a Game State table using a unique ID send with Step 1

    Step 3: Game goes into it's respective modes. The "active" player will be prompted with their activity (the accelerometer thing). The "inactive" player will start polling for the active player's "move".

    Step 4: Active player makes their move (i.e. result of the accelerometer activity) and send that table info to the game server. Active player then becomes an "inactive" player and start polling game state.

    Step 5: Both players get updated game state and change their display accordingly.


    Hope that helps!

Sign In or Register to comment.