Client/server architecture for PUN & Server?

Options
I was under the impression that with the regular PUN the first client that creates the room is the server. I need a bit more security so this would be unwanted and started to fiddle around with regular photon server in C# to later connect to it from Unity. But now I came across a video that explained it a bit differently. When a client starts a room it will be the master of that room but the room will still be on the server. Does this mean the server is secure, at least for people hacking there client? Should I worry about this if I want to make a very competitive game?

I still find it strange that I have to write both client and server side logic in a single application, the Unity project. What exactly is the deal with this? I have done quite a bit of Kryonet development and fiddled around with LidGren but this feels really strange to me.

With the Photon server I have been testing out in C# it worked like KryoNet and LidGren. You need both a server and a client application. Yet how does this server actually works? I need to run Photon on my PC and start my server, does it keep communicating with the server binaries I have on my PC? Or is it transferred to some photon server that keeps it running? Are there any tools for Unity to easily integrate with such a Photon server? Or is it just a matter of referencing the the .dll files in Unity and do the same as I would in a C# client?

Thanks in advance,

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @MadMenyo,

    Photon architecture is client/server.
    However, PUN is usually used in a way that logic is implemented on client side by making use of the MasterClient which works as a host of the rooms and can execute some "pseudo authoritative" code which should be placed on the server otherwise.

    You can of course have a server application and self host Photon server(s) yourself or you can choose the Photon server plugins solution.