Photon Server Unity Tutorials

0bytedna
0bytedna
edited February 2017 in Photon Server
Hello,
I am developing a fast-paced 3rd person shooter game. Its multiplayer (ofcourse). The first prototype of the game was developed using Unity Networking(LAN). After receiving positive feedback and several requests to make it online multiplayer, I decided to move the game to Photon Cloud. However, there were several issues with using Photon Cloud. There were tons of complaints about slow and laggy servers. I was wondering why? If player with slow connection is hosting the game, others player will have latency issues (even though they have high speed connections).

Only way to fix this issue is to use Photon Server. I have been digging since 2 weeks for tutorials on how to write server-side code. No Luck! All i find is "how to setup photon server in 5 mins" videos. Is there any tutorial series that includes setting up server, custom login, matchmaking, player position syncing, custom kill/death logic, gameover, etc? I'm soo frustrated searching for tuts. Hence, posting in the forum...xD. I found MMO Demo in the SDK. But its complex. I couldnt find any documentation on how the demo works. Going through the code and figuring it out yourself is next to impossible for beginners like me. Moreover, the link to Unity client project for MMO Demo is dead. So, i don't know how to test it either.

AAA games like overwatch, DOTA2, etc simulate the game on their servers. Player interactions are sent from the local client to server. Server validates them and executes them on the server. Then server sends results back to client. Is this possible to achieve with Photon server?

Any kind of help is highly appreciated!!
Thank you.

Comments

  • Hi, 0bytedna!
    well, probably this will help you: https://www.youtube.com/watch?v=v7MrbAAvYl4

    You should understand that creation of multiplayer server is not easy tasks especially when you touch details. that is why we have quite a lot of code. and it is hard to understand.

    i would propose to you to do next simple steps

    1. you should understnad how client works with photon. i mean that you may use selfhosted server to host your game. on first stage you do not change anything server side. you get your client working with server. selfhosted solution is copy of cloud version
    2. try to implement your plugin. we introduce plugins to make live of developers easier. they should not to know tones of code, just concise interface.
    3. you may try to do something from scratch

    you should also understand that photon is not magic in sence that if you use photon, then your client almost done - menu, interfaces, game overs and so one.

    Photon just helps you to communicate over global network. You still need to define your own game protocol. i mean what is send when game is started, what is send when it is finished, what to send when player is moved and so one. we just tried to give you tool which will make your life easier

    best,
    ilya
  • 0bytedna
    0bytedna
    edited February 2017
    @chvetsov thanks for the reply. I am going through the video. Is there any documentation on base classes like PeerBase, etc. There must be many more such important classes. Any documentation on such classes explaining what they do and stuff?
    I already have my game running from menu to gameover screen. I wanna know how to simulate the game on the photon server so that all match decisions (like kills/deaths) are made by the server.
  • @chvetsov thanks for the reply. I am going through the video. Is there any documentation on base classes like PeerBase, etc. There must be many such Base classes in the Photon SDK. I want to know what these classes are capable of doing. Any documentation that explains the functionality of base classes?

    I already have my game running from menu to gameover. I want to know if its possible to simulate the game on the photon server, so that all major game decisions (like kills/deaths) are taken by the server and sent to clients.
    thanks
  • 0bytedna said:


    I already have my game running from menu to gameover. I want to know if its possible to simulate the game on the photon server, so that all major game decisions (like kills/deaths) are taken by the server and sent to clients.
    thanks

    not out of the box. the only thing you have is communication layer.so in general you need to fix how you communicate with your players and if you have logic on client, then it will just work. of course you need to fix details, but in generl it is like this

    if you need server logic, you need to implement it your self

    here is entry point for Photon Server documentation
    https://doc.photonengine.com/en-us/onpremise/current/getting-started/photon-server-intro

    it does not contain everything. but ... better then nothing

  • I am on the same boat as @0bytedna. I already have my card game working in Unity using UNet. But I need authoritative server to for input validation. I saw Photon Server as a potential solution but I can't find any tutorials or samples on how to integrate Unity with it.

    Anyone?
  • you should use PUN. it has interface similare on Unit Networking (one existed before UNet).
    here is a link to docs and tutorials: https://doc.photonengine.com/en/pun/current/tutorials/photon-unity-and-networking-links
    best,
    ilya
  • @chvetsov How do you PUN to connect to Photon Server?
  • Thank you! I also posted another question regarding sending messages to server. I posted it on another thread.
  • Hi, I'm interested in this topic as well; however that video is unavailable for some reason - is there somewhere else it can be viewed?