Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PlayMaker - Visual Scripting for Unity

Discussion in 'Assets and Asset Store' started by Alex-Chouls, Dec 31, 2010.

  1. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    Is playmaker optimized for iPhone/mobile development?
     
  2. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Are you asking about runtime performance or workflow? Playmaker is a data driven FSM system, so it tends to be a little slower and takes longer to load than pure scripts (which are slower than C++, which is slower than assembly...). So the answer depends some on your needs and priorities. If you plan on making a cutting edge mobile game that squeezes every last cycle out of the device, then Playmaker may not be a good choice for you! But most games don't live on that cutting edge, and have to weigh many other considerations, like workflow, maintainibility, iteration speed etc. Our number one goal with Playmaker is to empower people to make games that they otherwise couldn't make. To make better, more interesting games because it's fun to explore and refine ideas with Playmaker!

    Having said that, performance *is* important, so we're constantly tweaking and optimizing Playmaker with each update :)
     
    Last edited: May 15, 2012
  3. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    Hmm... I know how to code well in UnityScript, but I'm not good with coroutines. And I heard that those increase performances exponentially. I'm not familiar with "FSM," but it sounds like it could help me there. Does UnityScript run faster than FSM? Plus, by faster, how much faster? A couple milliseconds per frame?

    And also, do all the added scripts add a lot to the file size?
     
  4. Mikie

    Mikie

    Joined:
    Dec 27, 2011
    Posts:
    367
    Has anyone been able to get Playmaker functions(iOS) to work on the Android?
     
  5. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    FSM stands for Finite State Machine, and is just a way to organize behaviors into states (e.g. a light switch has "on" and "off" states, an enemy unit might have "idle", "patrol", "attack" and "die" states...) You can also think of an FSM as a flowchart. They are a very intuitive way to build interesting behaviors.

    Playmaker FSMs use Actions which are modular, mini-scripts that can be combined to create complex behavior. In fact Actions are just C# scripts - they run as fast as scripts because they are scripts! The extra overhead comes from the FSM, but any reasonably complex game needs some organizing framework - Playmaker gives you that framework.

    Actions do not add a lot to the overall file size (scripts are generally the smallest game assets, smaller than textures, models etc.) but you can always remove all unused actions before publishing...
     
  6. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    Is there no extra cost for ios functions? Universe or something had a deal like that... Also any idea in milliseconds how much overhead there will be?
     
  7. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    The biggest difference with Playmaker on mobile devices is loading time. We improved loading times in 1.3, and have some more ideas we want to try... We've also optimized garbage collection on devices, and in the editor. But performance will be an ongoing effort - you're never really done!

    The best strategy is always to test on a variety of devices while you develop - don't leave it to the end!

    Also contact us with any problems you run into - we like to work with developers putting Playmaker through its paces in the real world. There are already a bunch of Playmaker games in the app store and android marketplace!

    It's hard to put a millisecond figure on all of this since you'd have to compare a real world scenario built in Playmaker then built without Playmaker. We're porting some C# Game Examples as samples, so I'll look into doing a side by side performance test on those...
     
  8. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    We tested on a variety of Android devices when we first released the mobile update. Maybe something changed in 3.5 - I'll look into it...
     
  9. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  10. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    Sounds good! I will be picking this up within a week. Do you have templates for joystick controls or dpad?
     
  11. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    Any plans for joystick or dpad controls?
     
  12. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Do you mean for mobile?

    We have actions for regular joysticks using Unity's Input Axis.

    Get Axis Vector even does all the tricky world space transformations for you:
    https://hutonggames.fogbugz.com/default.asp?W453

    We also have Touch actions that you could build your own touch joystick with:
    https://hutonggames.fogbugz.com/default.asp?W490

    But we will release a Touch Joystick action soon to make this setup quicker.

    Also, remember Playmaker can interface with regular Unity scripts very easily using Get Property, Set Property, Send Message, Invoke Method...:
    https://hutonggames.fogbugz.com/default.asp?W44

    For example, you could use Unity's touch joystick control with Get Property, getting the movement vector and feeding that into your FSM...
     
  13. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  14. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Version 1.4.1 is now in the Asset Store. Release notes:
    https://hutonggames.fogbugz.com/default.asp?W311

    Big performance increase for larger projects with a lot of triggers and colliders!
    Quickly find where actions are used in your project!
    Edit saved templates!

    Videos coming soon...
     
  15. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    A reminder that we have a 50% academic discount: http://www.hutonggames.com/store.html

    PlayMaker is used by students and faculty at: Virginia Tech, University of Denver, Chicago Public Schools, Rochester Institute of Technology, Media Institute: College of Media Arts, NDORMS: University of Oxford, SCAD: The University for Creative Careers, The City University of New York, Academy of Information Technology, University of Washington, University of the West, University of Kentucky, Temple University...

    We also have an exciting new educational collaboration that we hope to announce soon! :D
     
  16. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
  17. inkbirdstudios

    inkbirdstudios

    Joined:
    Mar 12, 2012
    Posts:
    20
    Alex i watched the ios fundementals series which is very helpful but im looking to develop for andriod but im stumped on how to get going with playmaker for andriond and mainly still in search of tutorials for andriod setup for playmaker, can you please point me in the right direction..i've been stuck for going on 3 days now trying to setup things
     
  18. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Not sure where you're stuck...

    Do you have the Android SDK setup?
    Are you able to deploy an empty Unity project to Android?
    Have you tried building the PlaymakerSamples/TestLab/Device scenes on Android?

    Or are you having problems getting Device actions to work on an Android?

    We tested the Device actions on Android when we first released them, but it's possible that a Unity update has changed some things. I'll retest with the latest versions asap...
     
  19. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  20. teamwhitesnow

    teamwhitesnow

    Joined:
    Nov 12, 2010
    Posts:
    85
    no i realized it's not playmaker it's unity, i set up the test example from playmaker but when i press build and run it asks for a android sdk root folder, and it pulls up the android folder with program and program tools but no matter what i click the "select android sdk root" keeps reappearing , i have Android sdk installed and java 32 bit but this root folder is my only problem with getting it to my android phone.
     
  21. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Version 1.4.2 is now in the Asset Store. Release notes:
    https://hutonggames.fogbugz.com/default.asp?W311

    Right click a transition and browse "Sent By..." to jump to any action that sends the transition event!
    Right click an action and select "Edit Script..." to quickly open the action script in your script editor.
     
  22. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  23. psyche

    psyche

    Joined:
    May 9, 2011
    Posts:
    10
    Hi Alex!

    Is there a way to load an asset bundle using playmaker.
    I'm tryind to find a way to load an asset bundle and keeping my other Fsm referencing the object contained
    in my asset bundle.
    I hope it's clear enough for you to understand.
    Thanks...
     
  24. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  25. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker is in the Asset Store Madness sale this month - 50% off the regular price!
     
  26. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    is it possible to point additional actions folder? i dont want to copy my custom state scripts to playmaker folder. i want to keep all products folder clean. for example "smoothmoves" has its own actions and it demand to copy files from its own folder to playmaker folder. if it updates its action scripts i have to copy them again.
     
  27. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Does playmaker work well with the new unity 3.5.3 ?
     
  28. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    There are no folder requirements for Playmaker actions. You can put them anywhere in your assets folder.
     
  29. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Off to check that now :)
     
  30. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    I get a crash when using "destroy object" in 3.5.3 on iOS

    I don't know if this is to do with playmaker or unity, I just want to show my findings.
     
    Last edited: Jun 29, 2012
  31. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    I ran some tests and Playmaker seems to be running fine in 3.5.3.

    @Lars Steenhoff: I can't repro a crash using Destroy Object. Are you still seeing this?
     
  32. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    that is great. it was what smooth moves says. so they should put pm scripts as unzipped to their package so it updates automatically.
     
  33. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Playmaker runs fine too in all my test, I think there is another reason why I have this crash, maybe some scripts on the object, I will check this out.
     
  34. yuewah

    yuewah

    Joined:
    Sep 21, 2009
    Posts:
    98
    Playmaker is great, but it miss great tutorials and some great FSM example. i.e. AI Behaviors( Melee Attack, Ranged Attack, Seek, Idle, Follow, Defend ... )
     
  35. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  36. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Latest video of XENOID MAZE, made 100% with Playmaker - no code was used!

     
  37. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Version 1.4.3 has been submitted to the Asset Store!

    Improved editor performance with large projects and more...
    Release Notes: https://hutonggames.fogbugz.com/default.asp?W311

    And a reminder that we're in the Asset Store Madness sale at 50% Off!!
     
  38. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Sweet...!! Do I still have to edit the translate node again?
     
  39. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Afraid so, I didn't get those options into the update...
     
  40. tezer86

    tezer86

    Joined:
    Jul 19, 2010
    Posts:
    90
    Hey im not sure if this has been asked before but I would like to know before purchase.

    Can you use Playmaker along side just coding normal Java? For example can I just code my GUI in Java but then manage all of the enviroment triggers and such in PlayMaker?
     
    Last edited: Jul 9, 2012
  41. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  42. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Reminder: This is the last week to get 50% off Playmaker in the Unity Asset Store Sale!
     
  43. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  44. Uttpd

    Uttpd

    Joined:
    Feb 27, 2010
    Posts:
    114
    Get and Set Property, wow
    Add totally missed it! My coding skills just doubled :)
     
  45. frozenoj

    frozenoj

    Joined:
    Sep 6, 2011
    Posts:
    79
    This sounds stupid, but just for clarification: if I use Playmaker there are no royalties right? So I get to keep any profits?
     
  46. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Yes. And Yes.
     
    Last edited: Jul 19, 2012
  47. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  48. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yeah, we figured these needed more attention! :)
     
  49. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Tutorials are great ! thanks
     
  50. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Just a quick reminder: Last 3 days of the Unity Asset Store 50% Off Sale!