Just need to do simple TCP calls

I'm working on a trading card game. As of right now, I don't really need much in the way of multiplayer. All I really want to do is make some simple TCP calls, probably just using RPC. The flow would basically be the following:

1.) Client Request a new match giving basic parameters.
2.) Server responds with a gameboard(JSON or whatever format)
3.) Client request to make a move(s)
4.) Server responds with a new gameboard and probably move log.
5.) Repeat 3-5 until game is over.

How can I accomplish this type of thing with PUN? Or is this not really a good framework for this type of thing? Eventually I'll need to do more, but right now I'm just trying to do a basic match.

Comments

  • One possible approach with Photon:
    1. New match is a new Photon room created by one of players.
    2. There is no such thing as server in Photon. But so called 'master' client can works as server. It generates gameboard on room creation
    3, Every client sends moves to master client with RPC
    4. Master client changes games state and sends updates to all clients back.

    One convenient option is storing games state in room custom properties. With it, you do not need send dame state from master client to others. Room custom properties synchronized automatically. Also in that case client who creates room can generate gameboard and set it as properties in room creation call
  • You already said it: Try using RPCs.

    PUN should be fine for your needs. It's actually pretty easy, too. However, you should do the Marco Polo Tutorial to get an impression:
    http://doc.exitgames.com/en/pun/current ... marco-polo