Having a global script that handles the current game state etc.?

Hello,

Just got into Photon Networking after some struggling with UNet and I enjoy it so far. However, I have a question regarding handling the gameplay. Here's a simplified breakdown of what I want to achieve:
  1. Multiple users in a room
  2. Users can send input to the 'server' (single script somewhere that controls the game?)
  3. Server checks if it wants to process the input from the user
  4. Server moves an object
I'm basically looking to control one character in the scene with multiple users in the room. Users can only control the character in certain conditions.

Could anyone enlighten me on the process I'd have to make/think of?

Thanks in advance.

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2018
    Hi @notacompany

    Thank you for choosing Photon!

    First I invite you to go through PUN Basics Tutorial.
    Then you should know one main difference between PUN and UNet: in UNet one client becomes host and others connect to it. in PUN all clients connect to dedicated servers.
    The closest thing to the server/host concept in Photon is Master Client.