Pun 2 Beta Early Access [December 2017]

Hi Everyone,

We are releasing a beta package of our next PUN version ( will be referred as PUN 2 ) featuring major internal changes, API changes as well as performances and optimization improvements, while retaining the same design pattern principles ( PhotonViews, RPC, Cloud, etc)

You can download it here

Few things to know:

- This version is NOT READY FOR PRODUCTION, use it at your own risk.
- Unity 5.3.7 is the minimal version

Known Issues:

- Only UDP type connection works, TCP and web socket are not leveraged yet

New Features:

- Improved Namespace to avoid clash with other assets
- LoadBalancing (LB) api has been revamped for a better separation between PUN and LB
- The PUN API changed in numerous place
- Performance and optimization is improved with less caching of data and better memory usage to avoid unnecessary allocations where possible.
- Explicit registration for PUN callbacks is now necessary, although automated when using 'PunBehaviour' ( watch out when overriding OnEnable() and OnDisable() you must call the base or registration will not occur
- Demos now using the Unity UI system instead of the deprecated one which had a very design pattern for coding.

Future Features:

- Documentation overall pass to cover all changes and new features
- Completed Demos
- Network Prefab will no longer be required as a Resource but will need explicit registration
- More optimizations and performances improvements

We welcome your feedback on this :)

I'd suggest you keep it in that thread, but if you make a new thread, make sure you mention "Pun 2" so we know where we are.

Bye,

Jean

Comments

  • Can I solve synchronization problem with this?
  • Hi,

    Unlikely :) The synchronization principles remains very much the same, PUN 2 is about core performance improvements and leveraging to allow for future growth.

    Can you describe what are your problems? maybe a dedicated post will be better, simply reference that post in here and we'll take it from there on that dedicated post.

    Bye,

    Jean
  • New PUN 2 will still support the same calls/code from PUN 1? I am starting something with Photon right now, but it PUN 2 will make me change a lot of my code, I will think about waiting or changing my network solution. Thanks in advance.
  • Hi,

    PUN 2 is still very early in beta, so I don't suggest you rely on its current form that much, it won't differ drammatically, but over the course of the beta cycle, there is a possibility for breaking changes requiring restructuring your code, but I don't expect full any major neither.

    I would stick with PUN if your deadline is short for your new project, PUN 2 is mid term vision, so be careful, do not use PUN 2 in production environment, this would be very dangerous.

    The principles remains the same, but internally a lot has changed to improve perfs and code structure, for example now you need to explicitly register for callbacks, no more magic callbacks like Unity does using sendMessages, if you are using PunBehavior, then it does it for you.

    Also the api has changed in places with leveraged naming conventions and improve signatures, for example, room list is not cached anymore so you can't query it, you have to listen to the callback and deal with caching yourself if you want.

    Bye,

    Jean
  • Thanks for the feedback Jean. Ok, I will stick with PUN 1 for now, since I want to do some more tests in 1-3 months. By the way... is there any way that I can download the documentation? I tried printing in PDF, but it does not work good (mixed letters). I wanted to check tutorials while I am in a flight.
    Cheers
    Alex
  • Hi,

    nop, I don't think there is an offline doc document available, I'll shout back here if indeed there is.

    Bye,

    Jean
  • Yosh!
    As a early adopter, I am happy to see PUN 2 Project!
    I will use it in my personal game project, and will give feedbacks as many as I can do :)
    Cheers
  • Hi,

    Excellent, looking forward to your feedback :)

    Bye,

    Jean
  • We have a problem finding one Asset 'asset'
    UnityEngine.Debug:LogError(Object)
    PunStartup:FindAssetPath(String) (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:80)
    PunStartup:LoadPunDemoHub() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:65)
    PunStartup:OnUpdate() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


    ArgumentException: Scene file not found: ''.
    UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:40)
    PunStartup.LoadPunDemoHub () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:66)
    PunStartup.OnUpdate () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:109)

    999+ Erorrs
    Unity 2017.1.0f3 Personal
    Mac OS OS X Yosemite 10.10.5
    unitypackage has been imported to new fresh project with standalone build.
  • Is Pun 2 has no Lobby count down timer that I can steal?)) I'm about lobby count down timer which is like: List of player in awaiting room and all sees "Game begins in: 5...4...3...2...1...GO" Match Starts.
    Not InRoomRoundTimer which is Photon engeeners suggest to look at!
  • Nice! I have working with PUN like 6 years now of course I'll give a try to this new version,
    I hope you guys improve the Network Culling in this new version, that is a very promising feature for Battle Royal games, also what about send / receive RPC on lobby or Friend List system improves? you have any changes on these?

    Regards.
  • Will this have support or documentation for usage with the new C# Job system?
  • We have a problem finding one Asset 'asset'
    UnityEngine.Debug:LogError(Object)
    PunStartup:FindAssetPath(String) (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:80)
    PunStartup:LoadPunDemoHub() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:65)
    PunStartup:OnUpdate() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


    ArgumentException: Scene file not found: ''.
    UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:40)
    PunStartup.LoadPunDemoHub () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:66)
    PunStartup.OnUpdate () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:109)

    999+ Erorrs
    Unity 2017.1.0f3 Personal
    Mac OS OS X Yosemite 10.10.5
    unitypackage has been imported to new fresh project with standalone build.

    Hi,

    I can not reproduce this, I started a fresh project with 2017.1.0f3, imported PUN 2 package and all went well. Did Unity ran the api updater dialog? maybe that's the issue?

    Bye,

    Jean
  • Is Pun 2 has no Lobby count down timer that I can steal?)) I'm about lobby count down timer which is like: List of player in awaiting room and all sees "Game begins in: 5...4...3...2...1...GO" Match Starts.
    Not InRoomRoundTimer which is Photon engeeners suggest to look at!

    Hi,

    The closest demo for this is the Asteroid Demo, but it doesn't have a count down timer, it starts straight away, you could instead add this count down to all client as the prior routine to start the game.

    I have asked the developer of Asteroid to check if a count down timer could be added, it would be a good addition to give a base for this typical scenario.

    Bye,

    Jean
  • Lovatto said:

    Nice! I have working with PUN like 6 years now of course I'll give a try to this new version,
    I hope you guys improve the Network Culling in this new version, that is a very promising feature for Battle Royal games, also what about send / receive RPC on lobby or Friend List system improves? you have any changes on these?

    Regards.

    Hi,

    PUN 2 doesn't have any change on Network Culling, nor RPC nor FriendList. It's about leveraging the core fundation of the LoadBalancing with other sdk from Exitgames to make maintenance and evoluatio easier, as well as performances improvments. This is not to say that nothing will be done on these topics, but they are not on the todo list right now.

    Maybe you could open threads on how you would see improvments on these features? that will help bring the discussion on the table for sure. Make sure you create one thread per feature to keep the thread on point. Thanks :)

    Bye,

    Jean
  • TJHeuvel said:

    Will this have support or documentation for usage with the new C# Job system?

    Hi,

    c# job is still very new, and there is no plan for supporting this currently. This will interesting to see how this can be applied to Network solutions, as the set of problems and issues network brings on the table are not the same that the c# jobs is meant to address. C# jobs wants to address the limitation of the GameObject/Component based approach to be able to push the limits on the number of Components that can be processed.

    With Network solution, this is different, the number of components will never explodes, as for a given network GameObject, the number of componenets will alwasy remains in a sweet spot of some sort. It's not like network games are going to turn every particles into a network object and expect to run hundreds of thousands of these particles over the network and sync them on every client.

    also, While on the graphics side, it is expected that you want more and more on screen and more and more happening. On the network side of things, we are always limited by the network itself, which falls outside Unity reach, so the goal is to always minimize the impact of your game on the network bandwidth, which is very much like not trying to overload Unity with network based components, thus making the job system maybe not such a clear cut improvement for so few components over the current approach.

    It would be good to have some hard data on whether even one GameObject and One Component sees a clear advantage in using the c# job, If that's the case, then yes, PUN is likely to support c# job in the future.

    Bye,

    Jean
  • TJHeuvelTJHeuvel
    edited February 27
    Thanks a lot for the quick reply!

    It could be something to keep in mind, especially multiplayer games often have a high playercount (32 or more). That makes playersystems a good, but very difficult, target for the multithreaded job system.

    Maybe the PUN side with its components wont be in the job system itself, but at least the API is usable from a job somehow.
  • Hi,

    We'll investigate the job system for sure.

    Bye,

    Jean
  • edited February 28
    > @jeanfabre said:
    > We have a problem finding one Asset 'asset'
    > UnityEngine.Debug:LogError(Object)
    > PunStartup:FindAssetPath(String) (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:80)
    > PunStartup:LoadPunDemoHub() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:65)
    > PunStartup:OnUpdate() (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    > UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    >
    >
    > ArgumentException: Scene file not found: ''.
    > UnityEditor.SceneManagement.EditorSceneManager.OpenScene (System.String scenePath) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorSceneManagerBindings.gen.cs:40)
    > PunStartup.LoadPunDemoHub () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:66)
    > PunStartup.OnUpdate () (at Assets/Photon Unity Networking/Demos/DemoHub/Editor/PunStartup.cs:40)
    > UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:109)
    >
    > 999+ Erorrs
    > Unity 2017.1.0f3 Personal
    > Mac OS OS X Yosemite 10.10.5
    > unitypackage has been imported to new fresh project with standalone build.
    >
    > Hi,
    >
    > I can not reproduce this, I started a fresh project with 2017.1.0f3, imported PUN 2 package and all went well. Did Unity ran the api updater dialog? maybe that's the issue?
    >
    > Bye,
    >
    > Jean

    Hi, I'm sorry I didn't get comment notify, maybe because of slow internet connection I was out of town.

    About Unity API updater dialog, I'm sorry I don't remember). I even didn't press Play button because of errors. It were unstoppable errors.
    Thank you for count down timer. I was able to create CountDownTimer from current Pun 1 demo RockPaperSissiours. There is a timer text with loading bar. But timer which will come with Pun 2 demo will be better. Thanks again
  • Any chance you will add an easy way to run a headless server in PUN, or am I still going to be faced with having to upgrade to Bolt?
  • Hi,

    no, PUN was not designed to be running a headless Unity application, you can do this, but you are on your own to host these headless application and plug that all together in your clients.

    The whole point of PUN is to not have to developer a dedicated headless Unity application acting as the server. So yeah, make sure you weight the pros and cons for each multi player solution and pick the right one for you.


    Bye,

    Jean
  • Hi,

    When it will be released /out of beta phase ?
  • Hi,

    We don't have any eta on this.

    Bye,

    Jean
  • roomeraroomera
    edited 7:32AM
    Hi Jean - some quick feedback/questions after spending some time with the beta:
    - Really appreciate the work that's been done to decouple LoadBalancing from PUN.
    - The callback classes and members are currently marked as internal - which means that putting them in a different assembly definition file in Unity will prevent the ability to add new callbacks. We tend to keep our third party scripts separate - I was wondering if there's a reason to keep that access internal?
    - Overall, do you have a roadmap for the evolution of Photon Realtime vs. PUN? We are doing a lot of custom work, so Realtime ends up working better for us.

    Thanks!
Sign In or Register to comment.