Moving from PUN to Photon Server creating MMO

I'm currently in the process of creating a MMO / survival / crafting style game (similar to Rust) using Unity 5 and have been using the old Tropical Island demo to give me a starting point so I can focus on the networking and crafting side of the game. I have been using PUN to for the multiplayer support.
The problem I have is I need to be able to persist the world state so players can resume where they left off. So from what I understand (correct me if I'm wrong) I need to go down the PhotonServer so I can do custom game logic. I have read through a good chunk of the Photon documentation and followed a series on Photon Server on Youtube by Christian Richards and I have been trying to look at the Phton Server MMO Unity Island Demo tutorial so I could poke around and work out what I need however I cannot get the Photon Server MMO project to open on Unity 5 nor will the Island demo.
So have come here to try to get some advice.
Does the PUN concepts like PhotonView still exist on PhotonServer or do you have to re-write all the logic to use server operations and events?
Can anyone point me in the direction of any good videos or tutorials.
TIA.
Lee

Comments

  • PUN's concepts are not existing on the Photon Server currently. We want to add that, but it's not trivial.

    You should switch to the LoadBalancing API to create MMOs. Lots of the concepts assumed in PUN won't scale and are not a good solution when you have extreme amounts of objects, players and play time.

    The Photon Server SDK will be updated soon. The demos for MMO got overhauled but the Island demo is gone. It was too outdated to maintain (Unity-version-wise).

    I hope my colleagues from the server side will chime in when the new Server SDK is ready.
  • can't wait for the new Update to come out so I can try to add some Interest Management regions to my games.

    You have nay idea Tobias when the next Update will be out? I know it's fairly soon.
  • yes I am waiting patiently as well for the updated SDK. I need interest management as well... seems the waiting game is a game all of it's own. :smile:

    I do realize that just wishing for something won't make it happen.... but having some boiler plate MMO demos would be so helpful.
  • Thanks for the reply Tobias,
    Its good to hear that the MMO demos are being overhauled. They are certainly in need of it. It would great to have some updated examples. Hopefully some more documentation as well. Also some walk
    As per other comments any idea when this will likely happen?
    You mentioned using the Load Balancing to create this style of game. Whats the rationale for that other then the obvious of scalability. Is it just the demos are more up to date. What about things like area of interest etc thats present in the MMO stuff. Is it just the case of implementing the same functionality in the on top of the load balancing code base?
  • Clu
    Clu
    edited September 2015
    @l33h4ll If you're still working on this, I was able to get the Island Demo to work using Unity 5.1.3
    First, I opened the each of the Island Demo projects independently of one another - so open the Standalone Island Demo and fix the script API update errors that appear. The readme.txt inside this Photon.MmoDemo.Client.UnityIsland directory addresses a couple of them. The others I found involve simple changes to function calls called something like GetVertexStrips to GetVertices (The API intellisense should fill in the proper function).

    Next, once you've done the individual conversion for both the Standalone Unity Island and the Photon Unity Island projects, then copy all of the Assets from the Standalone Unity Island to the Photon Unity Island.

    Compile the Photon WinGrid project.

    Run the 'Default' Server in Photon Control.

    Open the Photon Unity Island project. There may still be some issues but they should be fairly straightforward to fix. I found that sometimes restarting the project helped to clear out some of those problems.

    What you'll find is that there are several missing scripts in the MMOEngine prefab along with the Player prefab (I think thats the name). However, these don't seem to be critical to the networking piece.

    Launch the game inside unity.

    Launch the WinGrid application. Pressing + will add dummy clients to the game. Click and drag them on the map over wherever you happen to appear in the game. You should see different colored tall cubes appear in the game.

    Now I'm just trying to figure out how all the pieces work together...
    Tobias said:

    ... The demos for MMO got overhauled but the Island demo is gone. It was too outdated to maintain (Unity-version-wise).

    @Tobias This implies that there are other MMO demos available - is that true? And if so, could you point me in their direction? I've only seen the Island one.

    Thanks!
  • I am sorry for the late reply and the bad news: There won't be more mmo demos available in the next release. We just refurbished the existing one and removed the island demo.

    It depends on demand and our time, if we do more demos for this, so let us know when you work with the mmo solution as base.

    @Clu thanks for the info how to start things!
  • l33h4ll said:


    You mentioned using the Load Balancing to create this style of game. Whats the rationale for that other then the obvious of scalability.

    Scalability is very important when you release a game. If you publish the game, you might need that.
    Loadbalancing implements some nice features like properties per room and player, cached events, etc.. If you add an interest management to this, you should have a nice foundation for most games.
    Our MMO Solution does not solve everything. It is a layout for interest management for the use case that everyone on a single server could potentially interact. It does not have inventory, etc, so it's not a full blown instant mmo solution. With that said, I think Loadbalancing is the simpler start,

  • Good afternoon. in search of my answer I came here)). I also develop a network game (like rust) only on pun. I had a question how to save the world. How to make that if the last player came out, then the world remained the same (preserved). and the player could return to him back after a while. I came across in the documentation about Photon 4. Here it is told https://doc.photonengine.com/en-us/onpremise/current/version-history/whats-in-photon-4

    EmptyRoomTTL - how long should a room be kept in memory after last player disconnects.

    I correctly understood that this is exactly what I need?
    I can go with Photon Pun. on Photon 4. If so how to do it? Will it be easy or not? Waiting for an answer from you.
  • hi, @Alex333
    EmptyRoomTTL - in cloud we set it to 5 minutes. value depneds on your resources - how many rooms and how long you may keep

    > I had a question how to save the world.
    usually developers take one of ways to serialize entire game state and put it to some db.

    >then the world remained the same (preserved)
    it is totaly up to you.

    we do not create games we create tool to help you with networking. I'm not aware exactly about what rust is, but you may try to start with plugins. it is easier to understand, you have hooks to get notifications from framework, you have ways to run your logic using timers, you have ways to load/save request/get data from external http server.
    Probably it is all what you need

    best,
    ilya