About turn based game with PUN

Hi there?
I'm not good at English. Sorry about that.
I'm making a turn based game with PUN while learning.
I want game like your memory game example.
But, that example is based on Web Flatform.
Also I tried to use DemoRockPaperScissors, but it allowed only 1 turn.
I don't know how to give and take turn continuesly.
Could you answer me about this?
Or If you have any example for mobile, then please let me know.

Kind Regards.

Best Answer

Answers

  • What he means is that RockPaperScissors is not really a "turn based game". In turn based games, each player takes a "turn" to make a play or plays, then passes the turn to the next player. RockPaperScissors is more like a real time strategy that two players share a timer that tracks the time they have to make a move.

    Now, I just downloaded the Memory Demo so I will be checking it out. A few things to get it started:
    1. The Memory Demo game is in a separate SDK package from the one you get from the Assets Store
    2. Open the contents of the demo-turnbased-memory/Assets (found in the SDK package linked above) and place them in the Assets folder in Unity. Don't copy the Asset folder itself, just its contents.
    3. If you are using Unity 2018 you will need to add the || UNITY_2018 to all places that have #define UNITY as:
    #if UNITY_4_7 || UNITY_5 || UNITY_5_0 || UNITY_5_1 || UNITY_2017 || UNITY_2018
    #define UNITY
    #endif
    4. At the MemoryDemoScene scene, click on the Scripts object in the Hierarchy and find Memory Gui (Script). You will need to paste your AppID from Photon there. Also, on the MemoryBoard script I had to set the Flipped Tiles variable to Size 2 or it would cause a null exception.

    I wanted to share this for others who are looking into this as well. I have it up and running now so I am about to delve into it.
  • Hi @Teddymac,

    Thank you for choosing Photon and for the valuable feedback!
    We will update Photon Unity SDK and the Memory Demo.

    1. Yes, that is expected. PUN and Photon Realtime are two separate products and have separate SDKs and demos.
    2. Or open that folder as a Unity project. I know this is not explained very well.
    3. better: UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER. We will update anyway.
    4.
    Also, on the MemoryBoard script I had to set the Flipped Tiles variable to Size 2 or it would cause a null exception.
    Hmm. First time I hear about such issue, we'll investigate.
  • Thanks @JohnTube, for the clarifications.

    I am using Unity 2018 and when I build the Memory Demo for Android it will build and deploy, but the game will not load. It just shows the Memory title at the top of the screen and the rest is black. There isn't even a Unity splash screen shown. It builds and plays just fine on Windows. I haven't tested this yet on all my devices.


Sign In or Register to comment.