playMaker

Author Topic: Photon Integration Beta [NEW beta3]  (Read 79417 times)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4004
  • Official Playmaker Support
    • LinkedIn
Photon Integration Beta [NEW beta3]
« on: April 14, 2012, 01:01:47 PM »
The Photon integration for PlayMaker is now available for public beta testing!

Notes:

  • You also need Photon for Unity (available on the Asset Store).
  • DO NOT import the demo into existing projects since it can overwrite your assets!

If you want to import this on an existing photon project, delete first the folder "PlayMaker/Photon Networking". The whole system has now moved inside the "Photon Unity Networking" for convenience.

The major improvement compare to previous version is the integration of PlayMaker in the Photon Set up wizard ( accessible either from the menu "PlayMaker/Photon/Set up Photon Networking" and/or the menu "Window/Photon Unity Networking". This wizard will let you know and guide you through the set up of scenes and networked gameObjects and Fsms.

Have fun and please post feedback in this thread...
« Last Edit: January 03, 2013, 12:09:54 PM by jeanfabre »

Swift_Illusion

  • Playmaker Newbie
  • *
  • Posts: 41
    • Midnight Tinkering
Re: Photon Integration Beta
« Reply #1 on: April 15, 2012, 02:08:00 AM »
This is really really awesome to hear and I really look forward to seeing it in action - however.

On a clean project with all packages installed (including photon), I receive the error::
"Assets/PlayMaker/Actions/Network/NetworkSetLogLevel.cs(18,52): error CS0117: `NetworkLogLevel' does not contain a definition for `Off'"
and
"Assets/PlayMaker/Actions/Network/NetworkSetLogLevel.cs(24,33): error CS0266: Cannot implicitly convert type `NetworkLogLevel' to `UnityEngine.NetworkLogLevel'. An explicit conversion exists (are you missing a cast?)"

I then simply commented out that script just to see if I could get any further, and then I received the error::
"Assets/PlayMaker/Photon Networking/Actions/PhotonGUILayoutToolBarWithRooms.cs(52,25): error CS0246: The type or namespace name `RoomInfo' could not be found. Are you missing a using directive or an assembly reference?"
and
"Assets/PlayMaker/Photon Networking/Actions/PhotonGUILayoutToolBarWithRooms.cs(68,34): error CS0246: The type or namespace name `RoomInfo' could not be found. Are you missing a using directive or an assembly reference?"


For the record I am using unity 3.5

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #2 on: April 15, 2012, 07:45:48 AM »
Hi,

Can't verify now, but these errors are because you need the latest playmaker version, or probably the beta version ( will need to verify this).

 And it's likely that you also need to update your photon network package as well, it changed and the roomInfo error is a sign that it's not up to date.

 Bye,

 Jean

Swift_Illusion

  • Playmaker Newbie
  • *
  • Posts: 41
    • Midnight Tinkering
Re: Photon Integration Beta
« Reply #3 on: April 15, 2012, 05:41:19 PM »
Thank you very much, can't believe it was as simple as that.
Didn't realize photon networking had an update-or that it would affect this.
Just brought that to the latest version and the demo ran without any problems, :)!!

Can't wait to play about with this now :)!


-Might want to specify in the post that you need the 'latest' photon networking package,
to hopefully reduce more silly mistakes like this ^^;
« Last Edit: April 15, 2012, 05:44:23 PM by Swift_Illusion »

Yung

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Photon Integration Beta
« Reply #4 on: April 16, 2012, 03:50:27 AM »
Just managed to get it to work and everything seems to work fine! Am I correct to assume that right now, only chat is sent to sync while each player's position and rotation is not sync up yet? The other 'players' seems to appear stuck and not updating.

Very interesting to see this !

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #5 on: April 16, 2012, 05:00:18 AM »
Hi,

 Characters position and rotation are supposed to be synched, so fi you don't see this, something went wrong somehow.

Does the character animation is synched? that is, if a player jumps, do you see this player jump animation played in your scene?

 Have you modified the scene somehow?

In the player prefab, there is a Photon View observing the "variable synch repository" fsm component

from there, the variable inside it are checked "network sync", which means that they should streamed, and other fsm ( position sync, rotation sync and animation sync) should perform properly.


 Bye,

 Jean

Yung

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Photon Integration Beta
« Reply #6 on: April 16, 2012, 05:28:23 AM »
I am quite sure I didn't touch anything, merely build one version to run on another computer. I tested at work earlier, and I will try once again at home, checking the things you've mentioned.

On each client, I could see another instance of another client's player spawning in, but they appear stuck on the ground. There's no movement or animation that is syncing however. But chat system is working.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #7 on: April 16, 2012, 06:50:26 AM »
Hi,

 this is odd indeed. Will keep in touch if I spot anything ( I am working on it at the moment)

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #8 on: April 16, 2012, 07:14:38 AM »
Hi,

 ok, I have found the problem, indeed there is a clash with the system, currently trying to find the reason, it's very obscur actually... so scratching my head at the moment... :)

 Will post an update asap.

 Thanks for spotting this.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #9 on: April 16, 2012, 07:59:53 AM »
Hi,

 Found the issue!

for reference ( scripting knowledge required here):

 Once again, I faced the very annoying problems of the addComponent() feature of Unity that calls the Awake() function before you can set up variables ( I reported this to Unity, but they don't really get it I think). Fine for most cases, but then the variables are all defaults, and you can only set up the variables after the Awake call... which in this case creates problem, since doing things on Start is already too late ( PUN is set up already, and streaming would clash then). So I went for triggering set up in the public variables setters, which turns out working very well AND before the Start() call.

 This slipped during my testing against the latest version of PUN. I'll submit the new package to Hutongs, and the release will follow.

 Bye,

 Jean

Swift_Illusion

  • Playmaker Newbie
  • *
  • Posts: 41
    • Midnight Tinkering
Re: Photon Integration Beta
« Reply #10 on: April 17, 2012, 12:09:17 AM »
Really glad you found that issue, this was occurring for me to as I ran the demo today,
so I'm glad you were able to work out the problem! and hope to be able to get an updated version soon

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #11 on: April 17, 2012, 01:46:04 AM »
Hi,

 Yes, Also Photon released a new update yesterday with methods signatures changes, so the next update will require the latest photon from the server.

 Bye,

 Jean

Yung

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Photon Integration Beta
« Reply #12 on: April 18, 2012, 09:25:09 AM »
Wow, I am very impressed that you found the issue so quick! I look forward to the next release of the Photon integrated Playmaker!

Swift_Illusion

  • Playmaker Newbie
  • *
  • Posts: 41
    • Midnight Tinkering
Re: Photon Integration Beta
« Reply #13 on: April 18, 2012, 05:47:38 PM »
As I really want to get started trying to learn and understand this as soon as possible and there's no
mention of when this will actually be updated yet, I'd like to know, would I be able to recreate this
scene with the same functions as it has now to try and understand it? Is it the order/flow of actions
along with a part of unity that was causing this error, meaning the layout of the demo will be different
in the update, or is it simply a part of the underlying coding that is causing a program, so I can learn
the layout of functions as it is now and that would be the correct setup after the update?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15537
  • Official Playmaker Support
Re: Photon Integration Beta
« Reply #14 on: April 19, 2012, 01:57:57 AM »
Hi,

 Yes, We've been working very closely this week with Photon team, and a new version of the Photon network is available on the asset store as a result ( some issues where found as I integrated playmaker),

 So, rest assure, a lot of effort and energy is put into this to ship it asap and provide something solid. It's just difficult to commit to a release data unfortunatly.

the layout of the demo will remain identical, that's for sure. The error was  a mix of things really, to be precise: I was not declaring the FsmVariables supposed to be synched over the photon network ( the animation, position and rotation of the player) at the right time, and the new photon network had some changes, and miss the implications of them causing bad synchronization of data over the network.

This week, we faced some other issues, especially when leaving reentering a room, photon had a glitch and mixed up player instanciation, which is now fixed in the latest  release of Photon ( available on the asset store now)

 The current state is: on Unity 3.5 all is well, I shall submit today to Playmaker for review and then make it available to you. On Unity 3.4 I am fighting big time with it, for something likely very silly, but just can't nail it, I fear more an more a problem with playmaker when reloading scenes ( which is at the core of the process). Hopefully, I will be fixed very very soon.

So, yes, this is a high priority task, thanks for your patience :)

bye,

 Jean