Difference between PUN and Server

Options
Hi Guys

iam new to Unity and Photon, at the moment iam doing a tutorial to a multiplayer FPS game and there i got in contact with PUN.
i connect to a server with the command:
PhotonNetwork.ConnectUsingSettings ("Version 1.0.0");
PhotonNetwork.CreateRoom (null);
PhotonNetwork.JoinRandomRoom ();

So i actually dont wanna do a FPS so the tutorial dont show everything iam interested in. Thats why i have some questions.

if i connect to the server with the commands above, who is actually the Host of the server ?
i wonder what the difference is between PUN and a normal Server ?

Lets say i wanna spawn items and AI, normally these are things that does the server, is it even possible to use the server like that with PUN ?
what do i need if not ? someone know a good tutorial to server sided things like item spawns ?

Comments

  • vadim
    Options
    Hi,

    PUN client connects to the server to be able to communicate with other PUN clients. You can't run logic or spawn objects on server. Everything should be run on clients.
    You can make one of clients work as server (master client). It should run all logic and send current game state changes to other clients.
  • Markus
    Options
    As addition - with Photon Server you can run a game server yourself. You have to take care of hosting etc. then.
    In that setup you can add whatever logic you want to your Photon Server.

    Our other Photon products (Realtime, PUN, Turnbased, ...) by default connect to the Photon Cloud, where we do the hosting. No server side logic with that, so you would have to handle all game logic in the clients.