Multi-User Multiple choice dialogue concept

Hi,

I am implementing Photon completely using PlayMaker (which is great by the way) so I dont need specific code examples as I will need to translate into the PlayMaker way of doing stuff, I need more of a "conceptual" answer, as in HOW I should do this.

Currently I have built in PlayMaker (via Photon) the functionality that 4 characters are spawned to 4 different parts of a map. They can interact with NPC´s via simple multiple choice dialogues. I have a very simple way of doing this with PlayMaker (it may not be a very sensible way, but its easy to understand).

A click on a NPC, brings up 3 starting sentences, as gui buttons, you pick one. This then activates a game object with a sound file of the characters response, a text of the said response, and (after a short delay) 3 more choices for you to click.
This choice simply deactivates the current game object and activates a new one.
I merely copy this game object over and over and change the sound and texts. I end up with one game object per sound file and set of new choices.
Its laborious, but simple.

Now, I would like EXACTLY the same to happen when one clicks on another player. That they can "converse" via multiple choice.
One User needs to start the conversation (click on the other)
This action will give them a choice of 3 start sentences (and should probably disable that other players ability to start a conversation
The User picks a Start Sentence, and this should be displayed on the other users screen, along with 3 responses.
When THEY have made a choice, that choice is displayed on the first Users screen.

The experience needs to feel exactly the same as an interaction with an NPC.

I have completely disabled chat in may game but I know that I need to look at the chat demo, as it contains stuff related to sending text to individual players, its important that only the users involved in the conversation get to see this.

Can you suggest a methodology for this? Or at least what I need to look into?

Mark

Comments

  • What you currently have is a state machine that you walk through by user-interaction. In your case, any pick of an available option triggers the next state.

    To synchronize multiple clients, you would have to send a user's picked option and then replicate it on the remote client(s). If you make sure that users can only pick an option when it's their turn (after receiving the others turn), your state should be the same for all.
    Basically, you could send an RPC for every option picked. Make the "next state" or "option picked" a parameter of the RPC. The sending client will switch state immediately and wait for the other side's input. The receiving client will have to switch state based on the received RPC's parameter and show the options.

    I don't know enough about PlayMaker to provide the right keywords maybe but in worst case, please ask in their forum how to implement this.