Playmaker Forum

Playmaker Updates & Downloads => Official Action Updates => Topic started by: Alex Chouls on April 14, 2012, 10:01:47 AM

Title: Photon Integration Beta [NEW beta3]
Post by: Alex Chouls on April 14, 2012, 10:01:47 AM
The Photon integration for PlayMaker is now available for public beta testing!

Notes:


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...
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on April 14, 2012, 11:08:00 PM
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
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 15, 2012, 04: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
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on April 15, 2012, 02: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 ^^;
Title: Re: Photon Integration Beta
Post by: Yung on April 16, 2012, 12: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 !
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 16, 2012, 02: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
Title: Re: Photon Integration Beta
Post by: Yung on April 16, 2012, 02: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.
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 16, 2012, 03: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
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 16, 2012, 04: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
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 16, 2012, 04: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
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on April 16, 2012, 09:09:17 PM
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
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 16, 2012, 10:46:04 PM
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
Title: Re: Photon Integration Beta
Post by: Yung on April 18, 2012, 06: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!
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on April 18, 2012, 02: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?
Title: Re: Photon Integration Beta
Post by: jeanfabre on April 18, 2012, 10:57:57 PM
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
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on April 24, 2012, 09:52:25 PM
Have been working on recreating the demo to try and get a grip on it and I was just wandering,
I'd imagine this is made for games designed to be played in rooms. Will there be a demo in the
future at all that would guide you towards how to create an authoritative server-something designed for MMO's?
I know it's possible with photon, I was just wandering if that's something we might be able to gain a small
demo to display the basics-or whether it's something we will have to design ourselves?
Obviously it's not expected for there to be a demo of everything possible, but it would be nice if alongside this
demo that's designed for more room-multiplayer designs, for there to also be an example of how to create a
server designed for MMO's.
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on May 03, 2012, 09:27:04 PM
Well not to be a pest, but it's been awhile now, any idea when you will get the revised beta up?
You wrote you submitted it for review, but regrettably nothing has come of it yet and it would be nice
to start playing around with it more and being able to recognize what is caused by that bug and what
is caused by badly setup functions.
Title: Re: Photon Integration Beta
Post by: Alex Chouls on May 04, 2012, 08:21:18 PM
Sorry, I've been busy with the 1.3.3 update. But now that's out I'll get the next Photon beta up...
Title: Re: Photon Integration Beta
Post by: Swift_Illusion on May 04, 2012, 10:04:39 PM
Oh really sorry, didn't realize these were being worked on separately like this.
Great job on the playmaker release (really like that the samples are separate now too), and I'll continue waiting and looking forward to the photon beta update when you get to it, keep up the good work :).
Title: Re: Photon Integration Beta
Post by: justifun on May 07, 2012, 10:13:56 AM
If anyone out there is familiar with photon and unity networking, i think everyone would be very thankful if they could put together a tutorial for a basic networking setup.  But with an explanation of why things get setup the way they are, instead of simply saying, connect A to B.

Perhaps with a real life game example
eg: how to get the walk animation playing on both players screen, and how to spawn and create a grenade or bullet or something so that it shows up on both players screens in sync.

here's hoping :)
Title: Re: Photon Integration Beta
Post by: jeanfabre on May 07, 2012, 10:06:24 PM
Hi,

The demo shipped with the beta integration of Photon networking does this, the corresponding documentation is under way and will explain each Fsm and how they work together as well as the general frame of mind fo adopt when building multi players scenes.

 Just to highlight the basic here:

 Playmaker expose a "network sync" option for variables, simply select the variables you want to have synced over the network and add a network view or photon view component observing the Fsm component declaring at least one network synched variable, and you have your connect A to B partly solved. Within your Fsm you will need to know if you "own" this fsm component or not, to check simply use the "networkView Get Is Mine" or "Photon View Get Is mine" action, and if you own it you can set its value and if you don't you simply read it. this is the typical basic approach.

to spawn a network GameObject, it also need to have a network view or photon view component attached and use "Network instantiate" or "Photon Network Instantiate" to create bullets or players etc etc, as you use this in one of your running instance, all other connected instances will spawn that gameObject and get synched against it ( this is the "owner" thing).

I strongly recommend you use Photon network system, there cloud networking is just a no brainer and works amazingly well. The concepts you'll learn with Unity networking or Photon networking are similar anyway, so you can read documentation and tutorials on both solution without problem.

Bye,

 Jean
Title: Re: Photon Integration Beta
Post by: jeanfabre on May 08, 2012, 01:00:59 AM
Hi,

 As a started, the documentation is under way:

https://hutonggames.fogbugz.com/default.asp?W852 (https://hutonggames.fogbugz.com/default.asp?W852)

Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Alex Chouls on May 08, 2012, 07:51:13 AM
I've uploaded the latest beta:
http://www.hutonggames.com/playMakerBeta/PlayMakerPhotonDemo_beta2.unitypackage

NOTE: Do not import this demo into an existing project since it can overwrite your assets!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 08, 2012, 08:47:50 PM
Sorry a bit off topic here jean, but i tried out the non photon networking example and tried to expand upon it, by adding a new state after the move state, to chance the cubes material color for example. It will would switch locally but not on the remote instance of the game.

I thought by observing the playercube prefab that it would do the same on the remote prefab as well.  and that any states/actions would propagate as well.

Is there a piece of the puzzle im missing?

Title: Re: Photon Integration Beta [NEW beta2]
Post by: Swift_Illusion on May 08, 2012, 09:34:02 PM
Just ran the latest demo.
You guys, rock!
My mind = blown :D
The synch accuracy was by all accounts absolutely perfect. Sure it was a bit slow but this is a local test on my PC and it was hardly anything noteworthy, the actual final positioning and how it tries to keep up with the latest state that the character is in with 3 characters in the scene was amazing :D!

This is truly amazing! I am so happy right now it just can't be expressed :D!
Just hope I'm able to workout how to customize this into a more controlling setup for an MMORPG environment
instead of this room setup, but wow when I saw the accuracy of synch it's just like :O I didn't see that in commercial MMO's I've played. Great job :)! Hope you guys keep moving forward with this cause it's already amazing, I'm so darn impressed, keep up the good work!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 08, 2012, 10:43:34 PM
Hi,

 @Swift_Illusion: We tried to port the demoWorker shipped with the Photon as much as possible in playmaker, and we're glad that it works just as well indeed! It's also allow playmaker to shine and demonstrate how flexible and powerful Fsm's are.

@justifun:
not off topic, unity and photon networking are similar, Photon did a great job making sure the vocabulary and concepts are inlines, while adding this cloud server that simply make it all work like charm...

So, to answer your question: If you observe a cube transform, you will effectivly synch the transform, it will not synch everything that make up this gameObject ( mesh, material, components, fsm states and actions etc etc), for this you will need to observe the Fsm component hosting the color variable and make sure you have ticked "network sync" on that color variable, then you need to learn about the "ownership" concepts of a network view.

This may sound as a cumbersome way of dealing with this, but this is a way to optimize network usage, by only passing the information that really changes.

When you observe something with a networkView component, one of the instance running within the network as to be the owner. For this use the following action:

https://hutonggames.fogbugz.com/default.asp?W803 (https://hutonggames.fogbugz.com/default.asp?W803)

If the network view "is Mine" it means this is the owner and you ought to set the color variable, other instances running on the network will return false to the test, because they are slaved to the owner, and they ought to read, and react to the variable change. That is they should set the material color to reflect the new color, but only the owner is setting the Color variable and slaves simply need to read it.

Having said this, you need to be very careful with synching:

If the variable you want to synch changes all the time, I mean really all the time, like a player movements, or a bullet position, then it's perfectly acceptable to read and write every frame to maintain maximum accuracy within the game.

 IF the variable only changes from time to time, you should not use synching much, because this takes bandwidth and will slow down the game synchronization. Instead use the "sendRemoteEvent" action
https://hutonggames.fogbugz.com/default.asp?W805 (https://hutonggames.fogbugz.com/default.asp?W805)

This effectively send an event across the network, and it means that you don't take up bandwidth at all. So if you want to change the color only when the user is customizing his character, this is perfect, use remove Events, if the color changes as part of the game dynamics and frequently, then you can use variable synch.

 Hope that makes more sense now.

 Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 09, 2012, 07:33:04 AM
Thanks for the explanation jean.

So if i understand correctly.  Player 1 (The player controlling the cube - or the server lets say) would switch to a state that changes a color variable, and updates the color of its own material, but then would send a "send remote action" that would trigger a global event on all other players such as "read the color of all other  players and update those remote players"?  That way it would only update when it happens instead of every frame.

So that on player 2's screen, play one would see his new color?

Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 09, 2012, 08:30:27 AM
Hi,

 Yes, and when you send a remote event, make sure you select "OTHERS", so that the owner doesn't receive this event, no need.

 
Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 09, 2012, 09:32:17 AM
Cool Thanks Jean! ill try it out tonight!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 18, 2012, 01:28:32 PM
I tried out the photon playmaker demo scene this morning and ran into one slight problem.

The syncing between the two instances got a bit messy.  Each construction working on the other's screen was spinning or hiccuping every frame, and it seemed as if the person controlling the player would control both instances, but not 100% the same.  The other player's translation would be affected, but not as much as their own player.

Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 19, 2012, 09:59:25 AM
hi,

 not in front of my dev machine, but will run some tests,

 Have you updated to the latest from photon? I haven't yet, maybe something needs upgrading on the demo too.

 I'll let you know if I could reproduce as soon as I can,

 Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 19, 2012, 11:21:32 AM
Yup latest photon and playmaker beta 1.4.0rc1
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 20, 2012, 12:11:22 AM
Hi,

ok mixed results :)


I tested on both Unity 3.4 and unity 3.5. I do experience hickups only in 3.5 ( investigating whyt prefs in playmaker could be causing this, cause I don't see what else could create these hickups) and ONLY if the instance is running from the editor, if you publish two apps and run them, you will not have any hickups.

Tho, all players control are fine and consistent, that is no input corruption between players.

Have you modified the scene? It's of course fine and I encourage doing so, just need to know because If you haven't, and I can't reproduce it.

Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Swift_Illusion on May 20, 2012, 03:13:05 AM
@Swift_Illusion: We tried to port the demoWorker shipped with the Photon as much as possible in playmaker, and we're glad that it works just as well indeed! It's also allow playmaker to shine and demonstrate how flexible and powerful Fsm's are.

Sure has :D
Speaking of how powerful FSM's are, I've been getting fairly used to the environment now as I developed
a custom character controller and I love the flow and it's flexibility :3.

However on this topic I'm now trying to adapt this to the Photon environment and I'm having a lot of trouble
with an area and I had hoped to be able to ask about this here.
I'm using quite a few global variables that are necessary to send messages between objects,
however it seems when using this character in the multiplayer environment it seems to be sending these
events to both instances of the character (I just replaced the character loading in the demo),
and I'm not sure how I would be able to go about getting and setting necessary global variables,
in a local environment.
Is there any way to go about this, or some other way to send/receive/set/get variables across objects?
I'd really appreciate some advise with this if possible.
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 20, 2012, 05:49:55 AM
@jeanfabre - It looks like running 2 instances of the game fixes that glitching stuttering issue, but the problem with 2 characters being semi controlled at once is still present.

I've made no adjustments to the demo scene or photon, brand new fresh imports

Here's a screen capture demoing the problem

http://www.youtube.com/watch?v=7_w_4b2Lqzo


edit: fixed path

thx
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 20, 2012, 06:59:46 AM
@Justifin, video is set to private, I can't watch it.

@Swift_Illusion,
If the global variables are set to synchronized over the network, then you will need to implement the required logic to know who should read and who should write to this global. Iy that creates problems as to who should read and who should right, then you are missing on the best feature of networking, the "view", Photon View is the way to handle this case. So instead of having a global variable, create a gameObject with a Fsm and a photon View watching this Fsm, in that Fsm create a variable that is synched over the network and read the next chapter on how to work with it ( this is the player set up actually, but this is not just meant for players, it can be anything in your scene).

now, for players, the "is mine" action is the only way to work with variable data being synchronized within a Fsm, one of this instance MUST set it and it is the owner ( "Is Mine" is true), every other instances MUST NOT read this variable and do something to catch up with it ( like the position, rotation and animation sync Fsm).

If you want to send messages, then the chat system is a very good example, and features all the possible ways of sending a message, that is to a player ( the sender will not receive this message), or by group ( ALL, OTHERS, MASTER). so if you want to send a message to everyone but you, use OTHERS, etc etc.

I recommend implementing something similar to the chat system for anything that is not a constant stream of change. Sending one event when necessary is a lot more efficient than having a variable ( global or locale) that is set to synch over the network and never really change every frame.

Hopefully that answers your question. Else, I think it would be good if you explain what you are trying to achieve with these global variables, and we'll be able to provide more useful advices.

Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 20, 2012, 09:21:39 AM
Doh!

Ok fixed the video
http://youtu.be/7_w_4b2Lqzo

Title: Re: Photon Integration Beta [NEW beta2]
Post by: Swift_Illusion on May 20, 2012, 09:31:59 AM
Thank you very much for your informed response :).

I looked through the demo seen looking at all the uses of "is mine"....looks like there will be quite a bit of
setup for a lot of parts of a game running lol..
Though I believe I understand it a bit, and it's certainly something I'll have to setup in a lot of areas,
I don't think this solves my current problems, or at least I don't see how it can.
It's just choosing what to do based on whether your the controller or not, if it sends it's data to a global
variable and has other objects read that variable, they can't also send their data to the same variable and
have you read theirs. So for example one of my global variables tracks your characters state.
If you were only using the "is mine", you'd have to setup an individual character state global variable for
each object for them to set/read...and that won't work.


What I'm trying to achieve with is control over the character and it's areas within the character controller.
This includes keeping track of objects associated with it and objects created by it like weapons,
I also use global events along with global variables to keep track of and change the 'state' of the character.
This all also controls the camera and keeps track of that.
For example with the variables : character state(has it landed on the ground), combat state, combat phase.
And events : land, change state to [some state], return to idle.
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 20, 2012, 11:58:45 AM
Hi Justifin,

 ok, yes, I see, the controller is not disable it seems...

 Can you do one thing.

 Run one instance from the editor, and select the player that should not be controlled by you ( the one player object not labeled with "me" ).

 
 go to the "Behavior set up" fsm. This fsm is responsible fro enabling or disabling the camera and controller script. Can you double check that the variable "is mine?" is indeed set to false.

If it is, can you double check that indeed the "third person camera" script and "third person controller" scrirt are disabled from the inspector?

 I do not understand yet how come you have this glitch. If you can do the steps I described above and get back with the results, I would greatly appreciate this, we'll take it from there.

 Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 20, 2012, 12:31:25 PM
Hi Swift_illusion,

I think you are indeed confused with the network "view" system and what a playmaker global means in a multi player context. I also think that you are confusing Global Events and Global Variables, they do use the same "global" word, but in our case, this is very misleading unfortuntly ( I think global events should be simply called events, and that events should be made "public" for other to see them, not "global").

-- A playmaker global, synched over the network, is something that can not be used to define a property that belong to a particular player. Because there will be several players, EACH of this player would share the same value, because the global variable IS syncehd over the network.
-- A playmaker global, NOT synched over the network, is NOT fine neither, because all players are prefab so they work the same, and they would ALL try to access the same global, so imagine storing the name of your player in a global... you create the room, fine, the global string has your name, if someone else, joins, the global gets overwritten with the name of the new player that joined the room... not good.
 
A global variable synched over the network should only be used to represent a property of the environment in general, not something that is meant to be specific to the running instance ( a player, an enemy, etc etc).

Now,  A Global Event is necessary even within a player Prefab, and even within the multi player envirnoment because, to communicate between Fsm, Global Events are necessary. You can fire a Global event to a very specific Fsm, this is not "global" as "everyone will get it", it's a "public" Event as "I am listening to a Global Event is someone wants to communicate with me".

If these concept are not fully grasp, We need to discuss this more, on another thread, because this is core to playmaker and how Fsm are built.

Now, for your example, completely remove global variables from your thinking process ( for now ).

-- keeping "state" as you describe it: Study how the animation of the character is handled in the demo, this is very much how I would suggest you implement your character state as well.

   1: the current animation playing for the player is stored as an integer, 1 if for idle, 2 walking, 3, running, 4 jumping.
  2: this integer is stored in the "variable synch repository" Fsm of the player in variable "Animation (synched)"
  3: In "Animation synch" Fsm
       IF this player is mine, then I MUST set Animation (synched)
       IF this player is NOT mine, then I MUST read that value and FORCE this player to match the animation integer

So, for states it would be the same, have an integer ( integer are smaller than strings, so they are more efficient to stream over the network then strings, but you can use string if it is easier for you to begin with, not a problem)
make that state variable synched over the network, and have a fsm responsible for either setting that state or reading that state AND force it to reflect that state.

If you don't understand this, I think I will do the following:

 Extend the demoWorker with a weapon. I am thinking that the best way to illustrate fully your dilemma would be to let the player drop a "mine" ( no pun intended (no "PUN" intented) :) ), or let's call it a bomb.

Ok, as the user drops a bomb, this bomb would explode if another player touch it, if you touch it it doesn't explode. This would totally illustrate the "is mine" concept, because the bomb would be instanciated by the same application instance as the player ( I hope you are following me here), the bomb belongs the player. so when a player would hit the bomb trigger, the bomb would check that the player "is mine" or not, if it is not, then it means it's another player, and BOUM.

 In short: A player and ALL objects instanciated over the network by the same running instance ( by running instance, I mean "running application")  would respond to "is mine" to true in that running instance.


I hope I did not wrote any nonsense, it's late here :) I think your question is very important to many to properly grasp how to build multi player apps. So I am really willing to get to the bottom of this and be as clear as possible. So do not hesitate to quote and ask for clarification where you require it.


Bye,

 Jean


Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 20, 2012, 07:40:37 PM
@Jeanfabre

I ran the tests you suggested and it appears that "Third person controller" remains active, while "Third person camera gets deactivated" and "Is Mine" is set to false"

So i guess that's what's wrong.  As you as you disable the third person controller it behaves correctly between both instances.

is it not reading the is mine variable correctly then?

I'm running playmaker beta 1.4.0 beta 3 for debugging purposes and beta 2 of the photon playmaker package

Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 20, 2012, 10:11:17 PM
Hi Justifin,

 uhm odd. ok let's try something, bear with me, cause I can't reproduce ( and that's worrying me to be honest).

select the prefab "Fsm Photon player" in the project browser ( using the search it's direct). and deselect the "third person controller" just like the "third peron camera" is deselected and try, it might solve the issue.

 Also, in the "Behavior set up" Fsm of that player prefab, select the one offending instance when running the game and check if the state "enable thirdperson control" action "set property" is properly configured ( could you make a screenshot actually?).

If that's doesn't help, then I'd like to be able to set up a gotomeeting session if you don't mind? so that I can see what's going on directly.

 Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 21, 2012, 06:17:59 PM
Ok I discovered a few things jean

On the behavior setup fsm, on the "get is mine flag" state, the photon view get is mine action is set to blank for both Is mine event and is not mine event. that's not correct right?

also, on the set property action on the "enable third person controller" state, the object type is filled, however the property is set to "none"

Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on May 21, 2012, 06:29:08 PM
OK good news!

I started with a clean scene again, and everything seems to be working.

There appears to be a conflicting problem though if you import the free photon networking asset along with the standard character controllers default unity asset.  which i think was causing the issues.... It throws a bunch of errors. 

everything works perfect now though with a fresh clean start! (until you import character controllers though)

Title: Re: Photon Integration Beta [NEW beta2]
Post by: Swift_Illusion on May 21, 2012, 09:39:08 PM
@Jeanfabre

Thank you so so much for your response, I've been trying to interpret and look over the demo with everything
you've mentioned in mind, however I still have things I'm unsure about so as suggested I responded with
your post quoted in a new topic - http://hutonggames.com/playmakerforum/index.php?topic=1621.0
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on May 21, 2012, 10:21:21 PM
Ok I discovered a few things jean

On the behavior setup fsm, on the "get is mine flag" state, the photon view get is mine action is set to blank for both Is mine event and is not mine event. that's not correct right?

also, on the set property action on the "enable third person controller" state, the object type is filled, however the property is set to "none"

regards the Fsm setup and the "get is mine flag", here's the related doc:

https://hutonggames.fogbugz.com/default.asp?W875 (https://hutonggames.fogbugz.com/default.asp?W875)
https://hutonggames.fogbugz.com/default.asp?W927 (https://hutonggames.fogbugz.com/default.asp?W927)


I am currently working on this doc, so it's not complete yet, and your feedback is most welcome.

Now if you read the state again, it says "get is mine FLAG" , this actions allows you to store the flag and /or trigger events based on it. In our case, it is easier to store it in a flag and simply set the enable property of the components with that flag. This is quicker than have two different flow one for disabling, and one for enabling.

as for the property set to none, this is then our issue yes. I will report to Alex, and try to replicate here, I always import both the photon and our package, I am not sure what is the procedure that I don't do exactly as you in order to reprodduce it, however I don't think the property should get lost...

Thanks for your time, I am glad we found the issue!

 Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on August 06, 2012, 03:54:59 AM
Hi
This actions are compatible with Photon Server too?
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on August 07, 2012, 06:18:52 AM
Hi,

 It's not been tested with a custom server side.
 
 What kind of servers are you running?

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on August 07, 2012, 02:31:47 PM
Hi Jean thank you for reply.
I´m running and testing Photon Cloud and it´s amazing.
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on August 07, 2012, 02:40:08 PM
I've been out of touch for a while, has anyone made a photon/playmaker tutorial to better understand how networking works between the two?  Have the demo scenes been updated since the initial release?

thx
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on August 07, 2012, 03:20:44 PM
Hi,

 The demo scene is pretty much identical since the beginning since it is an accurate port of the photon demo 100% in playmaker. It was important to demonstrate the use of photon just with playmaker. Now yes, some proper tutorials and screencast should become available. Meanwhile have you checked the help associated with each fsm created for that demo? If you have areas in them pages that you feel needs more explanation, let me know. Thanks.

 bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on August 08, 2012, 09:35:00 AM
Can somebody make a action for get the Players on a room.
Please

Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on August 09, 2012, 01:07:17 AM
Hi,

 ok, done:

http://hutonggames.com/playmakerforum/index.php?topic=2085.0 (http://hutonggames.com/playmakerforum/index.php?topic=2085.0)

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on August 09, 2012, 06:12:05 AM
What you??Made it? :)Damm.I can´t tell you how much I´m thankful
Thank you!
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on August 09, 2012, 07:18:45 AM
Hi,

 Yes, throw it at me!

 I am here to help, If I think it make sense, I'll do it.

 bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on August 10, 2012, 02:53:40 AM
Jean you are an wonderful man.
Thank you.
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on October 08, 2012, 12:16:00 PM
Is this demo working now?

I just downloaded it. Thinking of switchnig my game over to the PlayMaker versin of Photon. Right now IM using the Exit Games Demo, as a base. But as a non-coder (now doing everything in Play-Maker (hurrah!)) I need to change a few things, but cant.

I installed clean, and downzoned the latest Photon Free.

What I got was 5 errors, with "missing actions" however all the actions showed up in the acting browser, just fine! So I added them, but of course little unsure of the settings.
However I made some educated guesses, and built a stand-alone.
Ran the thing in Unity and my Build.. and Voilá I got 2 workers!!
GREAT.. but wait...

One of them is buried wasit deep in mud (half way throw the plane) and the controls only effect the other one, which ever window is focused, you are moving the same character...

This is very wrong... except in a "You are Possesed by an evil entity" typ game.. which could be cool!

Where are we on this now, the thread is a long one do I really need to go throw fixing all the issues, or is there a simple fix?

Mark


Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on October 08, 2012, 11:45:25 PM
Hi,

Ok, this is very odd. I can confirm that I created a brand new project, got playmaker, photon from the asset store,  and the package from this thread, everything works fine, no errors, not funny player burried in the ground. went and add my cloud app id, and hit play and all was working well, player on the ground as it should etc etc.

 so somewhere along the process, something might have been corrupted.

 As for the current state of this, it's pending for an official release with a some nice goodies such as dedicated photon wizard editor for playmaker making it super easy to set up scenes and create Fsms for synching variables.

 It's could be any time now.

bye,

Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: justifun on October 09, 2012, 07:33:13 AM
As for the current state of this, it's pending for an official release with a some nice goodies such as dedicated photon wizard editor for playmaker making it super easy to set up scenes and create Fsms for synching variables.

 It's could be any time now.

bye,

Jean

Cool ! Sounds exciting!!!! can't wait!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on October 10, 2012, 12:00:46 AM
Hi,

 It's could be any time now.


Just made my morning!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on November 07, 2012, 07:27:42 AM
Hows this coming along Jean?

Im about ready to start implementing multiplayer on my new game, and instead of using my old Photon Demo files, Id love to set this up in PlayMaker instead, cos this time Im gonna need functionality that I dont currently have in the Exit Games files.

Im gonna need:

1. Different spawn position for each players.
2. Restrict the Room to MAX 4 players, (any above will create new room, also with max 4 players).
3. Remove (or not implement chat).
4. Give each player a different Player character model.
5. Have interaction between players work EXACTLY like interaction with a NPC, using multiple choice for conversations.
6. And er... killing each other after the period of cooperation is over..

 :)

Mark


Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 07, 2012, 10:00:51 AM
Hi,

 Thanks for popping here :) I am already aware of your requirements actually :) Tobias from Photon contacted me so that I can take over your case, as you wrote on their forum, so allow me to reply tomorrow, I'll need to test and validate few things before giving you a good reply.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on November 07, 2012, 02:46:22 PM
Wow, what service!!!

 :)
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 08, 2012, 04:24:41 AM
Hi,

Ok:

As far as the next release ( likely official release ) of Photon Bridge to PlayMaker, I am not sure when it will be out, since I am not in control of this unfortunately. As I said, it's all ready to be shipped really. Currently the beta version you have is suitable and features everything, the next release is really about editor wizard enhancements and an easier initial setup of Photon and PlayMaker.

Now, to answer your points:

1: Different spawn position is something outside Photon scope of features, it's up to you to decide where to spawn a GameObject really. There are numerous ways to go about this and it really depends on what you have in mind. Can you clarify and give maybe give a use case? Then I'll be in a better position to propose something useful.

2: Regards limited the number of players in a room, this is accessible in the "create room" action actually:
https://hutonggames.fogbugz.com/default.asp?W903 (https://hutonggames.fogbugz.com/default.asp?W903)

You don't have to express yourself in terms of "rooms" in your games' interface or descriptions. "Rooms" is a technical terms, and you can use this room feature the way you want, it can become a chess party, where only two people can be playing, it can be a chat board, or a paint ball party with several players, your game can host numerous parties, and users can join the one they want.  It is really about separating your players the way you need, if two players have to communicate somehow, then they should be in the same room, that's the basic meaning.

3: Removing chat, is simply a matter of deleting the related Fsms. Photon do not implement a chat by default, it's been built for the demo and many other chat variants are possible, tho all relying on the critical action "BroadCast Fsm Event":
https://hutonggames.fogbugz.com/default.asp?W920 (https://hutonggames.fogbugz.com/default.asp?W920)

4: Same thing here, it's up to you how the character is shown on screen. Nothing hardcoded by Photon here. Typically, you will need a prefab for each different character, and all will pretty much need to implement the same principles that applies to the character demo, that is synchronising variables related to position, rotation, animation and possibly other features specifics to your game.

5: This is also something that you have create your self based on the building blocks available with Photon.

6: Killing a character is actually simply achieved by destroying the instantiate player. For this you will need to destroy the owner, all other network instances will follow naturally. But you need to really come up with a plan as to what happens when a character dies: does he leave the room, or is he still there, only not visible/active and some features can make it come back again. In this case, you will likely want a layer of abstraction between the presence of a user in a room and it's actual player, so that when dying the user do not leave the room.

Basically, it's all there for you to create the game and features you want, so maybe you should start independent threads on each of these features, and we'll try to get some more clues as to what should be done to achieve them. Here Playmaker and Photon do not have all these functionality built in, it's really important to understand that Photon and PlayMaker, just like Unity are providing building blocks for you to create your game features. All of what you describe is totally feasible, but very specific to your game, and it can't really be abstracted to something generic enough to become part of Photon, PlayMaker or Unity really. That's where your work starts and where the real deal comes in: to come up with features and a game that is unique.

Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on November 08, 2012, 06:13:21 AM
Thanks Jean for the fantastic overview,

As you suggest, when I get home I'll start on this. First I'll just get Photon working using PlayMaker and then take each issue to a new thread, as I tackle it.

1. Is probably the most important, and will probably solve 4, 5 and maybe 6 in some way too.
2. Is done, as you said.
3. Is done.
4, 5, (See 1)
6. Im not sure of the functionality here yet. Maybe they Re-Spawn at their start point, all achievements reverted to 0. Or stay dead (For a shorter, more artsy game-play) with maybe "ghost mode", being able to view the resulting players finish what you started, and witness the Winners glory?

Off the top of my head I will be looking for ways to "count in" the players as they log in, and assign them Player ID´s. 1, 2, 3 and 4.

From then on I should be able to assign different properties to them dependant on the ID the character holds, from character prefabs to dialogue scripts, to found items.

Does this seem like the right approach?

Mark

Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 08, 2012, 11:49:21 PM
Hi,

 yep, tho you will have get all this information about ID's and roles before you actually instanciate the player really, but that's really trivial. You could have a more complex character set up that when instanciated is not yet assigned an actual visual appearence, and it's only in a second pass that you assign a role and a visual appearance, which would as well be a good set up to have "viewers" dead or alive, participating to the game or not.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on November 09, 2012, 12:52:52 AM
I'm afraid I was too tired after work to get going on this, but thanks for the confirmation that I'm on the right track... you said...
but that's really trivial.

Ha ha to YOU maybe!  ;D
A hint as to how would be great!

But I get the point... The division of roles needs to be done before we instanciate the player prefab.
I was thinking I might move this to later anyway, I need to get the connections as they happen, give them a role, and THEN I thought I would run a cut-scene (one per player... they all have different stories and different goals in the game.) Then at the end of the cut-scene, spawn them into the game at the last position of the animated version of their character.

To be continued...
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 09, 2012, 02:38:36 AM
Hi,

 ok :) for counting players you instanciate:

1: either you rely on the built in stat provided by Photon:
https://hutonggames.fogbugz.com/default.asp?W908 (https://hutonggames.fogbugz.com/default.asp?W908)

2: you want something slightly more reliable:
   -- have an arrayMaker list or hashtable
   -- everytime a player is instanciated, it calls in event to a fsm that increment the arrayList or Hashtable

 so for example, on your character prefab, you have a fsm dedicated to that, that when starting or when it knows its role, will simply add itself to that arrayList or hashtable( like "farmer": GameObject)

If this is still problematic for you, let me know, I can work out a small working sample.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: markfrancombe on November 09, 2012, 03:38:37 AM
Im afraid you are right that I would need an example, but I hate to ask, I feel I have really overstepped the mark when it comes to the amount of help you have given me...
 :)

Hi,
2: you want something slightly more reliable:
   -- have an arrayMaker list or hashtable
   -- everytime a player is instanciated, it calls in event to a fsm that increment the arrayList or Hashtable

I dont know what an arrayMaker or hashtable is, are they Play Maker actions? I understand arrays theoretically, but not sure what you mean here.. sorry.

Quote
so for example, on your character prefab, you have a fsm dedicated to that, that when starting or when it knows its role, will simply add itself to that arrayList or hashtable( like "farmer": GameObject)

OK, this need a little clarification, I would have had 4 separate character prefabs and tried instantiating the one needed for the role they have been assigned, model, location etc... and within this prefab would be the separate functionality for the different characters.. you seem to be saying (but I may be misunderstanding you) that I only have one character prefab, but it handles all characters and all functionality? This seems a little difficult to manage, I would have thought that if the prefabs are kept totally separate, then as long as you get them into the game correctly, you then know that all other functionality would be correct. (The Farmer dialogue would not accidentally pop up in the Doctor dialogue?

Quote
If this is still problematic for you, let me know, I can work out a small working sample.

Anything you feel you have time for would be great!

I'm so thankful for your help Jean.
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 09, 2012, 03:53:35 AM
Hi,

 Don't worry, I am here to help :)

 Allow me few days, and get back to me mid next week if you don't hear from me ok?

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on November 20, 2012, 03:21:52 AM
Hi
I read that now a player in Photon can change is currently region to have better ping and less latency.
Some games have that option already, like UberStrike.
Will gonna exista any acrion to control this feature? Like give ability to player choise is location?
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on November 20, 2012, 05:50:50 AM
Hi,

 Yes, this is something that we will be able to expose I think, I haven't checked this out yet, but should be very straight forward.

 Also, a new PUN update will likely be distributed within the next few days, I will then properly cover the latest additions, and make it complies.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: charmandermon on November 20, 2012, 09:09:47 AM
Yes it should be easy as soon as unity approves the new update in the asset store.  I think photon submitted the new sdk.
Title: Re: Photon Integration Beta [NEW beta2]
Post by: Dev_Sebas on November 20, 2012, 04:23:50 PM
Thank you guys!
Bye
Title: Re: Photon Integration Beta [NEW beta2]
Post by: devotid on December 17, 2012, 11:35:41 AM
I have been testing this with a unity car plugin and it works but the draw calls are 6x as high as a normal scene.  I'm only "synching" the position and rotation of "not mine" players.

My game is about 1200-1500 draw calls without the photon multiplayer on a highly detailed track......but when i instantiate the same "prefab car" into the Photon based scene i have 6x as many draw calls almost 6500!!!!

Any Suggestions.......?

If i could just get the same amount of draw calls that are in a regular scene it would be great.....am i missing something?

Thanks
Kevin
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on December 17, 2012, 03:11:33 PM
hi,

 I thought draw call where linked to rendering, I will investigate this with Photon team.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: devotid on December 18, 2012, 09:35:51 AM
Thanks Jean...:)

i did some more testing late last night with the same results.

i am using the same track and the same car....... I am only "snyching" the rotation and the position of the "not mine cars". 

the draw calls will triple?....... i am learning the profiler as fast as possible but i cant seem to figure out why this is happening or were the extra 4000 draw calls are coming from.

I am not against sending you the project to look into. (i would like to know what you think about my "playmaker coding".)

Thanks again Jean

Kevin
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on December 21, 2012, 02:15:06 AM
HI,

 yes, pm me with a link to the project, I'll have a look,

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: whendricso on December 21, 2012, 12:10:09 PM
No docs!

Hey, can we get some beta docs for the Photon actions?
Title: Re: Photon Integration Beta [NEW beta2]
Post by: nickmartin on December 23, 2012, 05:09:25 AM
Hey everyone,

I just found this thread lately and have been trying to catch up.

I just did the following:

1) New Unity project (Unity4)
3) Imported PlayMaker 1.4.5
2) Download and imported the Photon Unity Networking asset package from asset server
3) Downloaded and imported the PlayMakerPhotonDemo_beta2 from this thread.
4) Setup my Photon Cloud app id
4) Ran the PlayMakerDemoWorker scene

It connects nicely but the chat system seems to be broken? I cannot chat between characters logged into the demo. Or actually:

I can chat from standalone windows exe builds to Unity4, but if I try to chat back to .exe clients from Unity4, then their chat GUI disappears (except the "send to" and the player name buttons). Same thing happens if I try to chat between windows .exe builds. Their chat GUI is just gone and no messages.

Don't know if I'm doing something wrong, or if it's a Unity 4 problem? I get no errors or warnings.
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on December 24, 2012, 02:21:46 AM
Hi,

 uhm, ok, I will run some tests on Unity4 to see if anything broke ( which very well could be actually)


bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta2]
Post by: nickmartin on January 03, 2013, 07:31:22 AM
Hey Jean,

Any updates on Playmaker + Photon + Unity4?

Thanks for all your efforts!!
Title: Re: Photon Integration Beta [NEW beta2]
Post by: jeanfabre on January 03, 2013, 08:25:48 AM
Hi,

 Fixed today actually, verified with U3.5 U4 and current/beta verison of PlayMaker, so it's rock solid. I am waiting now for internal review.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on January 03, 2013, 10:14:45 AM
Hi,

The latest iteration of Photon integration is now available ( first post of this thread). It's a major step as Photon guys have work closely with us to provide a tight integration of PlayMaker for the Photon setup of the project, scenes, gameObjects and Fsms.

You can consult the help here:
https://hutonggames.fogbugz.com/default.asp?W982 (https://hutonggames.fogbugz.com/default.asp?W982)

As always, back up any on going project. If you do have an existing project you want to test this beta on, you will need to delete the folder  "PlayMaker/Photon Networking" first to avoid duplicated scripts which would cause lot of errors. sorry for the inconvenience, but it was needed so that it's easier for user to manage Photon in their various projects.

Bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: Dev_Sebas on January 03, 2013, 02:54:08 PM
Hi,

The latest iteration of Photon integration is now available ( first post of this thread). It's a major step as Photon guys have work closely with us to provide a tight integration of PlayMaker for the Photon setup of the project, scenes, gameObjects and Fsms.

You can consult the help here:
https://hutonggames.fogbugz.com/default.asp?W982 (https://hutonggames.fogbugz.com/default.asp?W982)

As always, back up any on going project. If you do have an existing project you want to test this beta on, you will need to delete the folder  "PlayMaker/Photon Networking" first to avoid duplicated scripts which would cause lot of errors. sorry for the inconvenience, but it was needed so that it's easier for user to manage Photon in their various projects.

Bye,

 Jean
Sweet! :)
Bye
Title: Re: Photon Integration Beta [NEW beta3]
Post by: nickmartin on January 03, 2013, 06:44:28 PM
Just gave it a quick test and everything seems to work :)

Soooooo nice!!!! THANKS!

Playmaker is the best asset I've ever bought :)
Title: Re: Photon Integration Beta [NEW beta3]
Post by: markfrancombe on January 08, 2013, 12:27:13 PM
I just tested the new DEMO.. outstanding!!

I now, of course, have to scrap my changes and start anew with this , but I foresee no problems.
BUT I HAVE ONE QUESTION:
I think I asked this before, but... didnt get an answer..

You have kindly also included the Demo with separate scenes:
demo_lobby
demo_room

Im drawn to this approach as it kind of keeps all (ok...most ) of the networky stuff separate and safe from all your other game logic and shit...
But.. it of course makes testing a bit of a pain as you must do a build and then run the lobby scene to test. I am routinely hitting play once a minute as I go in a tweak an animation, or colour chip, whatever...
So..
>>>HERES THE QUESTION...
What is the REAL reason for separating them into 2 like this? What OTHER advantages are there?

regards

Mark


Title: Re: Photon Integration Beta [NEW beta3]
Post by: markfrancombe on January 08, 2013, 12:43:49 PM
Whoops, one more question about this.
Assuming we use this demo as a basis for networking in our game, what stuff can I remove from this Asset folder to ensure everything works.
DemoWorker folder contains the player you are using, but if assigning a new play char, spose this whole folder can go?
MarcoPolo-Tutorial: Assuming we dont need anything in here?
Is that it really, should I leave the rest as it is?

Mark
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on January 08, 2013, 12:53:44 PM
Hi,

 All Demo folders can go, both from the Photon Networking folder and PlayMaker Photon bridge folder as well.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: markfrancombe on January 08, 2013, 01:34:53 PM
Thanks Jean,

but what about my other.. more pressing question?
Reply #86
 ;)
M
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on January 09, 2013, 01:18:35 AM
Hi,

 Sorry, which one?

 bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: markfrancombe on January 09, 2013, 02:32:44 AM
REPLY 86 i think...

this one!
(hope you didnt think i was being cheeky)

 :)

I just tested the new DEMO.. outstanding!!

I now, of course, have to scrap my changes and start anew with this , but I foresee no problems.
BUT I HAVE ONE QUESTION:
I think I asked this before, but... didnt get an answer..

You have kindly also included the Demo with separate scenes:
demo_lobby
demo_room

Im drawn to this approach as it kind of keeps all (ok...most ) of the networky stuff separate and safe from all your other game logic and shit...
But.. it of course makes testing a bit of a pain as you must do a build and then run the lobby scene to test. I am routinely hitting play once a minute as I go in a tweak an animation, or colour chip, whatever...
So..
>>>HERES THE QUESTION...
What is the REAL reason for separating them into 2 like this? What OTHER advantages are there?

regards

Mark

Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on January 10, 2013, 11:49:50 AM
Hi,

Very good question actually:

One scene to do it all is good for small projects or projects very well organized in terms of elements loading, per context, per needs, etc etc, so to scale properly. A one scene project must be carefully crafted and design prior starting development. A multi scene projects is easier maybe to understand what's going on and somehow relate the user experience per scene ( one scene for the lobby, one scene for a room, one scene for a particular game, etc etc). Multiple scene will be easier to manage for large scale project when you have little experience, and can't really draft a framework to handle it all. Multiple scenes will have a smaller hierarchy content and therefore easier to grasp as you work on it.

 Multiple scenes do not have to be painful to work with as you seem to say: I have designed my first big projects in Unity using one scene per page, and I could launch a single page on its own, because I designed my high level managers to exists in each Unity scene BUT could only exists once during the playback, so when I was working on a particular page, that page had all the managers and setup it needed to run as if part of the app ( and I could even configure them for particular contexts to replicate different states within the application, and when I was really starting the app, as I loaded then pages, the managers inside these pages would simply be destroyed, or disabled, or simply doing nothing, self aware they where part of the running application, not part of the development routine.

So in all cases, large scale projects WILL require some kind of framework, regardless of your approach and a clearly defined way for development and runtime. That is true, even for a one scene project ( as it doesn't seem that difficult to manage at first glance), because then you'll find you can't load it all in one go, else the initial loading time it inacceptable in 99% of the cases, so in the end it's really a matter of taste.

If you are beginning with all this, you will find pros and cons on both approach if you don't have any experience so far. I tend to design using multiple scenes, as I explained, but on the photon case, our goal was to replicate exactly the photon demo sample, to show what playmaker could do.



 bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: Fail257 on January 31, 2013, 02:39:54 AM
hmmm, hi anyone  can help with this Error?

what do i have to import exactly, its not  obvious, i tryed ExitGames.Client and all that but still this error
, any help please?

Assets/Photon Unity Networking/PlayMaker/Scripts/PlayMakerPhotonProxy.cs(39,44): error CS0234: The type or namespace name `MonoBehaviour' does not exist in the namespace `Photon'. Are you missing an assembly reference?
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on January 31, 2013, 02:57:24 AM
Hi,

You should have the photon free version from the asset store:

http://u3d.as/content/exit-games/photon-unity-networking-free/2ey

you have a help section in the wiki:

https://hutonggames.fogbugz.com/default.asp?W928

 it's not documented as, we are likely going to embed the photon network system, so you only need to download the photon from the asset server while we are in beta.

bye,

 Jean
 
Title: Re: Photon Integration Beta [NEW beta3]
Post by: Fail257 on January 31, 2013, 05:14:31 AM
thanks for the  tips. I see you really try to make this an out of the Box  solution... high goals.
A Dll in the end would be awesome.
I subscribe to this thread...

Title: Re: Photon Integration Beta [NEW beta3]
Post by: aceboy6810 on February 18, 2013, 06:39:45 AM
Is there an Easier way, than this? ???
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on February 18, 2013, 09:50:14 AM
Hi,

 Do you mean it? If you struggle, let me know, I'll be happy to clear up things. Networking can be a difficult beast to master, especially if you are new to unity.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: Brighton on May 20, 2013, 07:38:33 PM
Hi,

I'm running into an issue with the PhotonDemo Package.
I am using Unity 4.0.1f2

On a fresh project with only Playmaker 1.6 I receive an error

"PlayMakerThirdPersonControllerProxy.CS(45,17): Error CS0246: The type or namespace name 'ThirdPersonController' could not be found. Are you missing a directive or an assembly reference?"

So, I figured that might be related to the character controller standard assets.
When I import the CharacterController package, I get a separate error over two lines:

PhotonviewGetID.cs(49,56): Error CS1061: Type 'int' does not contain a definition for 'ID' and no extension method 'ID' of type 'int' could be found.

That function contains: 
_getNetworkView();
ID.Value = _networkView.viewID.ID;
IDAsString.Value = _networkView.viewID.ID.ToString();
Finish();

Am I missing a script?
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on May 20, 2013, 10:14:34 PM
Hi,

I imported both playmaker and the character controller and all is fine, so yes, you are having some issues with missing scripts or mad package merge

Delete the "Photon Unity networking" if it is there, and reimport PlayMaker. Or did you try to rename folders or something?


bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: Brighton on May 21, 2013, 06:18:36 PM
I'm not messing with anything outside of just importing the packages.
Here is my process:

1. Create New Project (No packages)
2. Import Playmaker 1.6
3. Import CustomPackage 'PlayMakerPhotonWithDemo'

At this point the ThirdPersonController error pops up.

If I then import the basic characterController package I get the error: PlaymakerThirdPersonControllerProxy.cs(29,57): Error cs0122: 'ThirdPersonController._characterState' is inaccessible due to its protection level
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on May 21, 2013, 09:50:50 PM
Hi,

Hi,
 
Ok, I tried on Unity 3x and 4x, created new project, imported playmaker from the asset store, then photon demo, and all worked very well, I then imported Character controller package as well as the standard mobile pack and still no errors.

Are you sure you have the latest photon demo from the website? that could be the source of the problem.

 There may be a step that I don't do exactly like you I guess. If you can do a screencast or something, it may help identify where the problem is. Thanks.

bye,

 Jean
Title: Re: Photon Integration Beta [NEW beta3]
Post by: jeanfabre on May 21, 2013, 11:18:45 PM
Hi,

 ok, I could repro this when I imported the mecanim samples. There is no "easy" answer here.

 basically the ThirdPersonController.cs script is embedded in the Photon Unity network demo, but is also features in some Unity packages in "Scripts".

So, when you want to study the photon demo, you should delete the version in the "Scripts" folder in your assets if you get this issue. It's always a good idea anyway to never mix demos and projects together as they blow up the assets for nothing, so always keep a demo project with just demos so that these kind of issues ( it's frequent with a lot of assets).

Bye,

 Jean