playMaker

Author Topic: Converting Playmaker fsms into c#  (Read 12224 times)

SKaterSam

  • Playmaker Newbie
  • *
  • Posts: 14
Converting Playmaker fsms into c#
« on: March 09, 2013, 08:31:42 PM »
I think this would be a great feature to be able to just click a button, and have it convert all of your Playmaker stuff right into c# code.
« Last Edit: March 09, 2013, 08:39:26 PM by SKaterSam »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Converting Playmaker fsms into c#
« Reply #1 on: March 19, 2013, 01:09:56 AM »
Hi,

 I think it would become totally unreadable  ;D

 Playmaker is great because it helps you visualize the links and relations between "states". In a scripts, you never have this level of abstraction.

 I recently made the mistake of starting a quite large feature in a project all in c# where I had the possibility to do it in playmaker. What a mistake... I realize now from experience how incredible playmaker is, and how powerful it is when it comes down to design processes in your system. Scripts will never be able to compete in that arena. Scripts will always be better than playmaker for intensive algorithm and complex data handling, but anything where you can think and describe it using the word "event" is a job for playmaker because of its visual nature, not because it uses the FSM technic.

 What would you do with a c# equivalent? I am curious

bye,

 Jean

Maart

  • Junior Playmaker
  • **
  • Posts: 88
Re: Converting Playmaker fsms into c#
« Reply #2 on: March 19, 2013, 05:07:18 AM »
I think it will be usefull to publish a set of tools without having to worry if the clint has playmaker or not.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Converting Playmaker fsms into c#
« Reply #3 on: March 19, 2013, 05:53:31 AM »
Hi,

 for this, we are likely to see some great progress on that front very soon, a viewer version is currently under beta :)

bye,

 Jean

Maart

  • Junior Playmaker
  • **
  • Posts: 88
Re: Converting Playmaker fsms into c#
« Reply #4 on: March 19, 2013, 09:13:55 AM »
could you elaborate on the viewer version?

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Converting Playmaker fsms into c#
« Reply #5 on: March 19, 2013, 06:02:50 PM »
I do like the idea but given that this is all modular, wouldn't the scripts/code generated be more difficult for an experienced coder to read?

It reminds me of the shaders you'd get from Strumpy... they'd work, but they'd be a nightmare to understand (though, to be fair, i am not a good programmer... which is why i went with PlayMaker.)

fran.mts

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Converting Playmaker fsms into c#
« Reply #6 on: November 01, 2013, 02:22:14 PM »
Hi Jean,

We are also interested in the conversion of Playmaker FSMs to C#. Have you worked any further on this functionality? Or is there any repository (Git) where we could colaborate for achieving this exporter in a near future?

Regards!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Converting Playmaker fsms into c#
« Reply #7 on: November 04, 2013, 12:56:47 AM »
Hi,

 Could you elaborate your use case for using a c# based conversion of a Fsm

 Bye,

 Jean

Banduck

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Converting Playmaker fsms into c#
« Reply #8 on: November 14, 2013, 09:05:32 AM »
Hi,

 Could you elaborate your use case for using a c# based conversion of a Fsm

 Bye,

 Jean

better reusability

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Converting Playmaker fsms into c#
« Reply #9 on: November 15, 2013, 06:20:06 AM »
Hi,

 To what extends it would make it more reusable? I am not sure I follow. I am all up for an xml representation of fsms for example, but I don't see how a c# conversion would be beneficial.

 This would end up typically like other engines like Sencha Architect ( not related to 3d nor unity, just a very similar example with this case).. Sencha is a js framework, and Sencha Architect is a visual Editor that produce js code but all is done with a visual interface. EVERYONE complains, because they expect the final code to be tweakable YET still have control over it via Sencha Architect. There is clearly a problem of editing and where editing comes from. In PlayMaker, if fsm where converted to c#, the first thing I would want to do is modify this conversion to implement my own stuff on top, but that would break any chance to edit again this converted code with PlayMaker, so the net results would obsolete codes.

 That's why I think it's important to give a very clear use case of where a c# version of a fsm would make sense, and how this would retro fit with maintaining the ability to edit it with Playmaker.

Big headache when I think about it :)

bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Converting Playmaker fsms into c#
« Reply #10 on: December 19, 2013, 03:42:24 PM »
I think the main thing that he's getting at is finding a way to take the FSMs made, convert them into C# and then applying that to another game engine or another non-unity program.

It'd be a neat idea but I think that'd kinda lead to it being used for things it was never intended to be used for (not only that but it could also represent some level of liability if the code generated was being used for less-than-noble purposes.)

Darkworth

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Converting Playmaker fsms into c#
« Reply #11 on: August 08, 2016, 04:45:30 PM »
Hi,

 Could you elaborate your use case for using a c# based conversion of a Fsm

 Bye,

 Jean

I can :D 

My favorite animation artist does amazing animations and makes very smooth fluid controllers for them, but he's not a programmer so he makes the controllers in Playmaker.  As a programmer who doesn't use visual scripting systems for the most part, it is more hassle than anything to try to make changes to his controllers for additional functionality, interaction with other systems and such.

While I know that playmaker can do all of that, including interacting with other scripts and systems... I have not spent enough time in it to really learn it, nor do I have a strong desire to base my characters in playmaker when everything else is coded.  So in the end, I end up doing my own controllers from scratch instead of basing them on the ones he provides for his animations and sadly the results are never as good where the blending, fluidity, and just flat out attention to detail in every little aspect of the animation is concerned.

I have been tempted to wade my through his playmaker controller and rewrite the full scope of his controllers in C# many times but just seem to always have too many things on my plate, usually attached to deadlines sadly, to spend the time dissecting playmaker.  One of these days I will do it as his attention to fine detail in the animation control is just too good to NOT eventually do it. 

While I do not know how feasible or reliable an endeavor like this would be, I do know that I for one would make quick work of the feature if it existed just for this scenario alone lol.  :)

Who knows... perhaps one of these days I'll have ample free time and decide to instead, just dive into playmaker and get intimately familiar with it.  *shrug*  As it stands now though I find it aggravating using visual scripting systems because I will end up spending way more time trying to figure out how to do something inside of the VS system that I know I could have already written in plain code several times over and been long on my way to the next task lol.
« Last Edit: August 08, 2016, 04:48:42 PM by Darkworth »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Converting Playmaker fsms into c#
« Reply #12 on: August 10, 2016, 03:16:58 AM »
Hi,

 Ok. At Unite Europe, we had a session dedicated to the use of PlayMaker in a big project where they had a core developer team, and artists. And they managed to find a way to combine PlayMaker and pur c# frameworks, and they seem very happy  with it.

https://twitter.com/smalljellygames

http://www.smalljelly.com/home/2016/5/26/introduction-to-prototyping-with-playmaker


 I would contact them and ask more infos if possible. They came up with a protocole  between PlayMaker and c# which allow them to communicate. It's not difficult in essence, it's basically events that you forward between c# and PlayMaker, and is likely based on the typical IOS api.

"OnSomethingWillStart"
"OnSomethingDidStart"
"OnSomethingWillStop"
OnSomethingDidStop"

With this kind of broken down approach to executing a specific feature, your core framework can call PlayMaker related feature, the artist has its entry point, do its animation, and sends back an event to c# when done.

If you create such "Contract" between developers and artists, then you'll get the best of both worlds. Your artist will be free to do his/her job, and you'll be free to develop the core of the game in c#.


 Bye,

Jean