implement server logic to PUN

Options
Hi,

As the topic says, i need to implement server logic inside PUN. What should i need to know and are there any examples?

The server should basically hand out a number to each player, and remember the number that is given.

Any idea's are welcome

Comments

  • Tobias
    Options
    PUN is not really built with server-logic in mind but it's possible. You will need to host this yourself in any case, as the cloud is PUN compatible but does not accept your own server logic.

    High level overview:

    The way to go is to download the server SDK (latest Photon v3 zip) and run this. Setup PUN to your server to verify it works. Then, you need to start server developing (obviously). Open the LoadBalancing solution and select the Game class of the GameServer. In this, you can implement reactions to Operations. There are blueprints. You could hook up your logic into the Join part, where the event join is sent. Extend it.
    In PUN, the NetworkingPeer class handles all events. Lookout for OnEvent() and check for the join event code. There, grab the new number and use it any way you want.
  • It seems i cant because i need photon cloud as i only have linux server availble. But thanks anyhow for the example, i might need this in future