Photon Server with unity. Beginner

Options
Hello, i want to start a unity multiplayer project using Photon Server.

I already know how to do a client hosted game ( so, with a player hosting for rhe other player). But for this project, i would like to use a photon server. It is a shooter game, for 6 players, (3v3) ,

I already looked at this page : https://doc.photonengine.com/en-us/onpremise/current/getting-started/photon-server-in-5min. but it show how to launch the skd, and i dont know where to make the game "work". Will it launch a unity instance to "manage" my unity fonctionnality (physics, levels...)? Did someone have some good guide to getting started with this ? I'l lost.

i tried setting a sample as "self hosted" instead of "photon cloud". It can connect if i start "my cloud". but how will it "play" my game ?

let's take a simpler exemple; i want the "host "(so the server) to spawn a target, and player have to shoot it. How will i do that ?

Good day
thibaut

Comments

  • Hi @Thibaut,

    if you start the "My Cloud" app, this is basically the same as connecting to the public Photon Cloud. So at this point there won't be any differences between using the Photon Cloud and the Photon Server, except that you have to host the server yourself.

    Will it launch a unity instance to "manage" my unity fonctionnality (physics, levels...)?


    No, the server doesn't run any Unity instance.

    let's take a simpler exemple; i want the "host "(so the server) to spawn a target, and player have to shoot it. How will i do that ?


    When using PUN you can use PhotonNetwork.Instantiate(...) for example, which will instantiate an object on each connected client. What the clients will have to do with the object, is implemented in their game logic.

    Until now there is nothing that requires or benefits from custom server-side logic, so I would recommend you start working with the Photon Cloud instead of hosting the server yourself and extending it with Plugins.