Page 1 of 1

Multiplayer dialogue system with Photon

Posted: Fri Jun 07, 2024 6:15 am
by Wojciech Grodzicki
Hi!

I need to create a relatively simple dialogue system for a multiplayer game. I'm using Photon PUN2 for multiplayer and I would like to make it work with the Dialogue System for Unity.

The basic idea is that the game will involve 3 players, any of whom should be able to start a conversation with an NPC. The others should be able to join, provided they are close enough. Each player will see the same dialogue lines spoken by the NPC, but they will be presented with different, unique response options. They will talk to each other via a voice chat to decide which option to choose. The final response used in the conversation will be the one chosen by the player who clicks on any of their responses first. So all players will basically act as a single actor, but split into 3 parts.

Since this is only a prototype for now, there are no complex quests and I don't need to store different info for each player in the database. I just want them to share a synchronized conversation and split the available responses among the players. How should I approach this from the point of view of the Dialogue System for Unity and Photon?

Best,
Wojciech

Re: Multiplayer dialogue system with Photon

Posted: Fri Jun 07, 2024 8:47 am
by Tony Li
Hi Wojciech,

There are two ways you could approach this:

1. Run the conversation on one player's client, and "mirror" it to the other clients. This is similar to what I recently described in Multiplayer Synced conversations except instead of making the response menu non-interactable you can make it interactable and send the click result back to the client that started the conversation. You'll probably want to make a custom subclass of StandardUIMenuPanel to override the menu panel's functionality to do this.

2. Or start the conversation separately on each client. Again override the StandardUIMenuPanel to send the response back to all clients in order to keep them in sync.

Re: Multiplayer dialogue system with Photon

Posted: Thu Jun 20, 2024 9:08 am
by Wojciech Grodzicki
Thank you for such a quick response! These sound like good starting points. I'll reach out for more help in case I get stuck.

Re: Multiplayer dialogue system with Photon

Posted: Thu Jun 20, 2024 9:52 am
by Tony Li
Glad to help!