playMaker

Author Topic: Playmaker to Tnet (networking)  (Read 2099 times)

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
Playmaker to Tnet (networking)
« on: December 09, 2013, 04:08:29 AM »
Hello,

I'm in the process of implementing Tnet into my game prototype. Tnet (as far as I know) won't recognize FSM variables by default so I need to convert FSM variables to C# script variables.

I know there are dozens of threads regarding FSM -> C# and vice versa but my brain is slowly melting reading them, and I seem to have a lot of difficulty getting the most basic scripts to function in monobehavior. (I'm not a programmer if you can't tell)

I have a handful of public variables (gameobject, int, bool) that I need to autosync in Tnet. Would anyone mind spoon-feeding me exactly what I need to do? Once I understand how to do one of them, I'm sure I can figure out the rest.

Thank you


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker to Tnet (networking)
« Reply #1 on: December 09, 2013, 01:41:19 PM »
Hi,

Yeah, bridging a network solution with playmaker is not the easiest thing to tackle for sure.

Do you understand the principle behind the synchronizing? you need one way going from playmaker to the script and the other way, from the script to playmaker.

If you are not a programmer, this will be hard to grasp to be fair.

I whish I could say I can work on that. I eventually will at some point, but not right now I am afraid, I have way too much pending threads and bridges to update for 4.3 first :)

 
Bye,

 Jean

cmy

  • Playmaker Newbie
  • *
  • Posts: 40
Re: Playmaker to Tnet (networking)
« Reply #2 on: December 09, 2013, 07:19:47 PM »
Hi Jean,

Yep, I'm pretty sure I understand the principle of it if you mean what needs to be accomplished. I need two scripts, one that is synced between tnet, and one that is synched between Playmaker and C#.

In a perfect world I would have two gameobjects that would be updating variables every frame, each time I need to sync a new global variable I would add an entry to both scripts, creating a simple bridge.

Is this maybe easier than I thought and I can use get/set property? Or am I looking more at this:

myFsm.FsmVariables.GetFsmString("my string variable").Value = "hello"

or string myString = myFsm.FsmVariables.GetFsmString("my string variable").Value ;

Thanks :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker to Tnet (networking)
« Reply #3 on: December 10, 2013, 01:46:07 PM »
Hi,

 you will definitly need coded version as opposed to get/set property actions. Unless the synched properties are made public via a custom component.

bye,

 Jean