Photon Turn-based New User Resources

Options
Hello, I am new to using Photon and Photon Turn based. I am creating a simple game which uses 2 players. Essentially, each player rolls a dice, and based on the outcome various events happen. I have looked at the Memory Game demo for PTB and it pretty much provides all of the functionality I need, however it is not documented well. I am having trouble understanding how PTB is used with Unity to create the multi-player experience. Everything in the memory game is generated via code. I currently have the single player version working to specification, but everything is built in the editor (gameboard, GUI, etc). If anyone can point me in the right direction or provide me with some beginner tutorials/references that I can use to get this project off of the ground, that would be great. Thank you for any information you may have.

Comments

  • Tobias
    Options
    If you defined everything in Editor, you don't really need to sync the things you load with the scene.
    You need to sync moves or turns in some way. This is where you use either Custom Properties or Buffered Events (for anything that is not a state but a sequence of actions, where some might be based of others).

    Did you find our online docs for the Memory Demo?
    https://doc.photonengine.com/en/turnbased/current/tutorials/memory-demo

    Can you let me know something specific, where I could help?
  • jedmonds91011
    edited August 2015
    Options
    Thank you for the response Tobias. As I said previously, I am new to networking/multiplayer as a whole. I have a simple turn based game already set up for single player. What I need to be able to do in my scene is:
    1.Only allows current player to click "spin button" (a uGui element).
    2.Upon clicking the button, a function is called in my GameManager singleton to randomly spin a spinner (so I need to know how to call to that script)
    3. After the spinner is done (handled with bool flags in manager) the active user should be able to play a piece on a prefab in the scene using OnClick events
    4. Once the player has played, I need to switch ownership to the new player.
    5. I also need all GUI elements to contain the same information for each player instance. So, click counts, number of played pieces/wins etc.

    I have been looking at the memory demo scene and documentation. However, I cannot wrap my head around the document. It uses a higher level of language than I can understand... haha. Again this is my bad. Would you recommend looking through Photon real time first? so that i can get a good baseline of the photon system? Or should I use PUN and handle turn based logic on my end?
  • Tobias
    Options
    If you want to create games that can be stored and loaded later on, you need to use the LoadBalancing API from our Photon Unity SDK (not PUN). This is for asynchronous games, too.

    If the match is a few minutes long and all players need to stay in the room to finish a match, then you don't need Turnbased. You can use the LoadBalancing API or PUN in that case.

    Everything you can learn about Photon Realtime will also apply to Turnbased. The matchmaking and communication is the same.

    I don't know where I could help you right now. Can you point out a specific issue you can't solve now?