playMaker

Author Topic: Playmaker best practices  (Read 1174 times)

musolo

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Playmaker best practices
« on: March 02, 2017, 01:49:18 PM »
Hi guys i`m learning  playmaker and it`s easy to grasp it. Learning curve is nice.
But i hear that PM can be dangerous if not used in a very specific way. That it`s very difficult to debug if something goes wrong later in developement. I`m new to coding and i like PM a lot as it does the job well so far.
I`m making mobile military shooter game and want to make sure that i can follow
safe PM routines that will not choke me later. PM has all possible plugins and integrations to build a full blown game. Even  Modern Combat 5-ish game could be made with PM with all it`s powers.
But i`m trying to find list of rules set in stone to prevent me from all possible pain.
There are many articles about PM on the net with pro`s and con`s written by different people. As for example you could see this two articles with different approach and opinions that did make me want to find a safest way to use Playmaker.
This:
http://va.lent.in/should-you-use-playmaker-in-production/
This:
http://squarebite.proboards.com/thread/9/playmaker%20playmaker%20warnings-tips

So i thought this forum is the best place wher one could find a list of do`s and don`ts that to follow to get to release withought falling in to the trap along the way.
Hope to hear some guidelines from you guys.
Thanks!


mrminico

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
Re: Playmaker best practices
« Reply #1 on: March 03, 2017, 02:15:30 AM »
I'll be honest You shouldn't worry too much about playmaker being the source of bottlenecks. I've been using playmaker for almost a year now and the same principles that apply to regular coding apply to playmaker as well. The same way you can write bad code you can also create bad FSM's. For example instantiating and destroying every frame versus recycling game objects in a pool for later use in game.

Always keep in mind that having multiple small FSMs is actually a good thing. Its the same thing programmers do with scripts, for every individual game functionality there's always a script. Playmaker FSM's can work in the same manner. Also you may want to keep in mind the amount of times you're calling update on every frame. Only use update on every frame when needed the same way you'll make an FSM with variables that are needed.

And last, always look at Unity profiler if you ever want to actually find the source of your bottlenecks, overhead, and frame drops that's where you'd wanna go versus assuming it may be a playmaker issue. If you're making a game for the mobile platform you may want to budget yourself on many things especially how much verts your models have, what shaders you're using, limit light sources etc.

I definitely encourage you to keep on doing your research and experiment with playmaker, Playmaker is an awesome and powerful asset and by far the best visual scripting tool for unity. And I can testify after using assets like Uscript and Fungus, which were good but playmaker is just better in my opinion.

Fun fact in case you're wondering what can be done with playmaker look at games that utilized playmaker like Hearth stone, Inside, and The Forest. You can do tons with playmaker its literally up to you. Happy game creating and good luck!
« Last Edit: March 03, 2017, 02:19:08 AM by mrminico »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2280
    • View Profile
    • jinxtergames
Re: Playmaker best practices
« Reply #2 on: March 03, 2017, 02:52:15 AM »
Hi,
for the 1st link, i disagree for most of it and also many things has changed since he wrote this.
Avoiding globals i do agree, but for that you can use the get/set fsm string/int/float... actions

Also playmaker does not makes scripts more complicated. it's the user who does that.

On the seccond post :
Most are bugs from older versions and are resolved.
BUT you should ALWAYS backup you project whether you use playmaker or not.

Now there are no rules set in stone, just like normal coding.
and what mrminico said is all true :D

Also very Important is to Document/Name/Comment everything you do.
This will help a lot when you need to change things later. (same as in regular scripting)

Also you can find a lot of tutorial videos on the user tutorial wiki page

Arrays is something you really want to learn about if you did not yet.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Playmaker best practices
« Reply #3 on: March 03, 2017, 04:37:34 AM »
Hi,

 very good answers :)

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Playmaker best practices
« Reply #4 on: March 03, 2017, 04:52:24 AM »
Hi,

Few more things while I am here actually:

It's true that for many "hard core" developers, using something like PlayMaker put them on their toes, but for the vast majority, it's because they don't realize the purpose and scope of PlayMaker well enough, and also because it's kind of cheating and takes away their job as developers... there is a lot of that indeed, how come artists don't need me anymore, and how come they actually produce efficient and well performing titles... oupss... :)

latest great success story with a PlayMaker project:

https://twitter.com/JeanAtPlayMaker/status/836827993607634944

 so: PlayMaker is not just a visual programming system, it's a finite State Machine, it brings more on the table, it brings a paradigm shift in the way to approach development of interactivity, that's bold!! and so you can not really compare it with conventional scripting. You would be able to do a comparison between uScript and c#, yes, but with PlayMaker, you think differently, you don't translate a line of code directly in PlayMaker, you have to understand the full behaviour of your player or ennemy or whatever and then re think the whole approach to do this in PlayMaker, which is why I enjoy so much refactoring all these UnityLearn Project into 100% PlayMaker, because it shows two things:

-- how to build the exact same behavior in PlayMaker
-- how performances compares between 100% scripted and 100% PlayMaker

 and once you do this, you'll realize PlayMaker is almost an absolute killer... full stop. Yes, it has its flaws, yes it's not perfect, but is c# perfect? is Unity perfect?
you have to know and eventually master you tools, that's all there is to it.

I can do everything either in c#, or in PlayMaker or with a combination of both, I always end up using PlayMaker and barely create custom actions and bridges when I strictly must do, because of the Finite State Machine major benefits in rapid development and I can't picture myself building any kind of complex system without PlayMaker being at its core.


 Bye,

 Jean

musolo

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Playmaker best practices
« Reply #5 on: March 03, 2017, 05:43:17 PM »
Thanks Guys!
All you`ve said sounds very encouraging!
As for me i`ve decided to few days back to go with playmaker all the way doing all the stuff i can do with it and try to use some specific plugins for certain things  as some guys advice to max out my chances to reach the goal. Luckily there are more and more stuff added to PM`s arsenal and it gets stronger every day.
Just wanted to know about some things and steps i  should avoid at all time, if there are
such ones.
Thanks!

mrminico

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
Re: Playmaker best practices
« Reply #6 on: March 03, 2017, 07:06:30 PM »
and also because it's kind of cheating and takes away their job as developers...

I agree with everything you said Jean except that "it's kind of cheating". Using tools that only help you build really shouldn't be looked upon as cheating. It's similar to unity game engine which is also a tool that can also replace software engineers job. I'm a newbie programmer and experienced artist, one thing I can say is that playmaker does not make the games for you, YOU make the game. It's still hard and takes time to put things together properly. Now If playmaker ever got to the point that it actually made the game's code based on you inputting strings and just writing what it should do THEN I'd say that's cheating hahaha.

HeathClose

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Playmaker best practices
« Reply #7 on: March 04, 2017, 06:52:19 AM »
the latest greatest success story for playmaker is an ios app store featured game called Spiraloid... I'm not sure you understand the achievement of being featured, but that is a HUUUUGGEEE deal.... and it was 100% playmaker

HeathClose

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Playmaker best practices
« Reply #8 on: March 04, 2017, 06:56:48 AM »
And I would be interested in an actual answer for the original question... what are the best practices?  Why does djaydino say avoid globals?  What else should we be doing?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2280
    • View Profile
    • jinxtergames
Re: Playmaker best practices
« Reply #9 on: March 04, 2017, 11:44:46 AM »
Hi,
One of the main reasons is, that they are easy to hack.
But that does not mean you should not use them at all :)

musolo

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Playmaker best practices
« Reply #10 on: March 04, 2017, 06:39:58 PM »
What do you mean by easy to hack? Are there any examles of that?
Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Playmaker best practices
« Reply #11 on: March 05, 2017, 10:46:14 PM »
and also because it's kind of cheating and takes away their job as developers...

that was meant to be what other says about PlayMaker, I don't consider anything that lets you achieve the goal a "cheat", I mean within the realm of programming only of course, not in real life...

Bye,

 Jean