playMaker

Author Topic: About the Viability of Playmaker and Some Beginner Questions  (Read 170 times)

traphiclight

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
About the Viability of Playmaker and Some Beginner Questions
« on: October 01, 2017, 08:31:44 AM »
Hi everyone, first thread here, so hope I'm not making any mistakes (please point them out if so).

Anyway, after trying out Playmaker for a few weeks, I'm starting to make a full game with Playmaker, and I've been thinking overall on the viability of using nothing but Playmaker for everything.

My game is pretty small so I'm not really worried that it's possible, considering all the games that have done it already. However, what about a more complex title? Say, if I wanted to make a 3D platformer or a 3D sim, how viable does Playmaker become then? Not really asking in terms of functionality (I'd probably have to create custom actions, but that's not the problem), but in terms of performance and optimization.
How viable is it to have dozens (or more) FSMs running simultaneously?
Does it depend on how complex they are?
Is it better to have a few complex FSMs or a bunch of really simple FSMs running?
When do I know there are too many FSMs on the same object/scene?
Will it always be better to use code or is the difference between them negligible (in terms of performance)?

Another question I have is because of one of the first tutorials I watched (I think it was one of the official tutorials), where the guy is talking about Playmaker and FSMs, and he basically explains that there are some cases where it's better not to use it, because coding can do some things better than a state machine. So I'd like to ask, what are those scenarios?


Lastly, just a more practical question, but I'm trying to make the game check whether or not the player is moving in the X axis, but I'm not using a rigidbody (so I can't do a speed check, because it'll always be at 0), and somehow the system I set up doesn't work properly.

I made an FSM that checks the transform.position.x from my player and stores it in a float, and then another FSM with a Float Change action that checks to see if the X is changing and stores that info on a Bool. However when I test it, the bool is constantly changing between True and False, multiple times every frame.

So, what would be a good way to go about doing this? Should I put a small Wait action after every check in the second FSM? Is there a more elegant solution to all this?


That's about it, thanks for the patience.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2270
    • View Profile
    • jinxtergames
Re: About the Viability of Playmaker and Some Beginner Questions
« Reply #1 on: October 01, 2017, 07:31:24 PM »
Hi,
Quote
However, what about a more complex title? Say, if I wanted to make a 3D platformer or a 3D sim, how viable does Playmaker become then?
For bigger games, here is a sample :
http://hutonggames.com/playmakerforum/index.php?topic=12685.0
Also performance is very good with playmaker,
Jean translated the unity 2d platform game to 100% playmaker and had even better performance than their version :)
Quote
(I'd probably have to create custom actions, but that's not the problem)
You can find many custom actions on the Ecosystem
Quote
Is it better to have a few complex FSMs or a bunch of really simple FSMs running?
Rules for this are similar to c# scripts.
Maybe this topic can help : http://answers.unity3d.com/questions/52234/one-large-script-or-break-it-up-into-many.html
Quote
Another question I have is because of one of the first tutorials I watched (I think it was one of the official tutorials), where the guy is talking about Playmaker and FSMs, and he basically explains that there are some cases where it's better not to use it, because coding can do some things better than a state machine. So I'd like to ask, what are those scenarios?
The official tutorials are pretty outdated (can you give the link of that tutorial)
i am using Playmaker several years now and so far every thing can be done with playmaker.
Sometimes you do need to think/work differently than when you code in c#
Quote
Lastly, just a more practical question, but I'm trying to make the game check whether or not the player is moving in the X axis, but I'm not using a rigidbody (so I can't do a speed check, because it'll always be at 0), and somehow the system I set up doesn't work properly.

I made an FSM that checks the transform.position.x from my player and stores it in a float, and then another FSM with a Float Change action that checks to see if the X is changing and stores that info on a Bool. However when I test it, the bool is constantly changing between True and False, multiple times every frame.

So, what would be a good way to go about doing this? Should I put a small Wait action after every check in the second FSM? Is there a more elegant solution to all this?
"Next frame event" will go to the next frame so its best to use that instead of a wait. unless you want to wait a certain time.
Instead of float changed you could use float compare and set a tolerance and send event on greater and less than.
But this also depend on your game ofc if you can use that.

You can find many tutorials on the user tutorial wiki page to get familiar with playmaker :)

traphiclight

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: About the Viability of Playmaker and Some Beginner Questions
« Reply #2 on: October 02, 2017, 01:58:48 AM »
Hey, thanks for the answer. The Flashing Lights game and Jean's recreation were pretty much the examples I was looking for to motivate me.

Quote
You can find many custom actions on the Ecosystem
Yes, I'm currently going through some of the stuff in the Ecosystem, although so far the basic actions have been doing the job pretty well. But I'll try to expand soon.

Quote
Rules for this are similar to c# scripts.
Maybe this topic can help : http://answers.unity3d.com/questions/52234/one-large-script-or-break-it-up-into-many.html
This is exactly what I needed to know. I was starting to get a little scared about having some 10 FSMs on my player character, wondering if I really needed all that. But it certainly has been helping me a lot with finding mistakes and debugging.

Quote
The official tutorials are pretty outdated (can you give the link of that tutorial)
i am using Playmaker several years now and so far every thing can be done with playmaker.
Sometimes you do need to think/work differently than when you code in c#
Hmm, I'll look for the link, but it was one of the very first videos I watched (I'm not even sure it was an official video), but basically he ends up not explaining at all what are things that would work better as code (which is why I ended up asking here).
It's good to know you've been using Playmaker for so long though, and seeing your activity on this forum, I'd rather take your word for it anyway.
I'll edit here if I ever do find the link though.

Quote
"Next frame event" will go to the next frame so its best to use that instead of a wait. unless you want to wait a certain time.
Instead of float changed you could use float compare and set a tolerance and send event on greater and less than.
But this also depend on your game ofc if you can use that.
That certainly helped. it's been giving a more consistent result at least. I'll keep testing.

I'll go back to diving into those tutorials then, thanks for all the help so far!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2270
    • View Profile
    • jinxtergames
Re: About the Viability of Playmaker and Some Beginner Questions
« Reply #3 on: October 02, 2017, 07:01:16 AM »
Hi,
Happy to help.
If you have questions or issues feel free to aks in the help sections and don't hesitate if you think it is a noob question :)