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. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Quick preview of the new Debug Flow mode coming soon to Playmaker:



    Pause and step through a visual log to debug the flow of your app!
     
    Last edited: Dec 18, 2011
  2. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    @thelastprogrammer - The UI for FsmQuaternions shows X Y Z angles, but the Value is stored as a Quaternion (so you get nice interpolation etc.). The builtin actions don't use quaternions parameters a lot, but we added support for them at a user's request... Are you writing custom actions?

    @TeamWhiteSnow @pict - We're still figuring out the best way to do a trial version. I'll post when we have news on this front.

    EDIT: Check out the dedicated Playmaker Forums for quicker feedback!
     
    Last edited: Dec 18, 2011
  3. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker is being used for effects in Dueling Blades - which looks amazing!

    http://forum.unity3d.com/threads/115767-Dueling-Blades-A-Revolutionary-Game-For-Facebook

    $playmaker_shot.jpg

    Thanks to Disturbing for letting me post a behind the scenes screenshot! :D

    EDIT: Open the image to see it full size...
     
    Last edited: Dec 19, 2011
  4. nantas

    nantas

    Joined:
    Feb 11, 2010
    Posts:
    124
    Hi Alex,

    I just started using PlayMaker. It's a great product I like it a lot.

    I'm very interested in the API from PlayMakerFsm class that can be used in my own script. But all the information I got is this document:
    https://hutonggames.fogbugz.com/default.asp?W329

    Basically in this document I only get how to access FsmVariable and send event. Is this all we can do from script side? How about getting current state name? (I know there're actions that can do that, but..)

    I think if there're more API available those script reference should be made available to users.

    Again, great work!
     
  5. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks nantas! We're wrapping up the next update, then we'll give the API docs some love!

    In the meantime, join the Playmaker forum and post any questions you have, or describe what you're trying to do with the API and we'll do our best to help.

    EDIT: Also if you use Visual Studio the auto complete will give you a lot of the mote obvious functionality...
     
    Last edited: Dec 20, 2011
  6. TvanM

    TvanM

    Joined:
    Dec 23, 2011
    Posts:
    1
    Hi,

    We are having some difficulties getting a trigger working.
    We aren't sure if this is a bug, or if we are just doing it wrong.

    To reproduce our problem, follow the these steps:
    1. Open the AutomaticDoor example.
    2. Play it, and see that the door opens when you walk through it.
    3. If this all works, add a cube to the scene.
    4. Make sure that the cube has a box collider.
    5. Start it again, and drag the cube in the door collider. If we understood correctly, the door should open now. Because our cube should also trigger the door. For us, however, this is not the case. Nothing happens at all.
    6. However, when we replace the boxcollider with a charactercontroller in the cube and we move the cube in the door collider, the door DOES open.

    Is this a bug, or are we missing something?

    Thanks for your help!
     
  7. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  8. drauschenbach

    drauschenbach

    Joined:
    Dec 8, 2011
    Posts:
    4
    It looks like the current PlayMaker 1.2.1 is not compatible with Unity 3.5 Beta. I can't get any UI to open, and I don't have the playMaker menu. After re-importing my assets I get the error: "Assets/PlayMaker/Actions/StartLocationServiceUpdates.cs(36,40): error CS1501: No overload for method 'StartLocationServiceUpdates' takes 0 arguments".

     
    Last edited: Jan 1, 2012
  9. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    The next Playmaker update is in beta now, and is compatible with the Unity 3.5 beta. We hope to get it into the Asset Store this week...

    It will also have a bunch of new features: Drag and drop to add and re-order actions, Debug Flow to step through the log (see video above), Pathfinding actions, Networking integration, and more...
     
  10. MABManZ

    MABManZ

    Joined:
    Sep 29, 2011
    Posts:
    144

    Sounds great, can't wait! I'm working on a solo project and I am a modeler/animator, with basic programming knowledge (I know the logic but cannot stand using the syntax/structuring for organize code) My gameplay is 100% done in Playmaker FSM's and it has made "programming" fun for me, I could never get it done without it!

    Hopefully the new version won't break anything from my previous fsm's :)
     
  11. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks MABManZ! Send me a PM if you want to test the beta... if there are any problems we'd like to catch them before release!
     
  12. ohmdb

    ohmdb

    Joined:
    Dec 31, 2011
    Posts:
    5
    I am total newbie and I look for visual tool for create game. i try out other tools but them not match for me.
    after that I decision bought Playmaker because this tool look user friendly and has many cool tutorial.
    I use Playmaker about 2-3 days and I know This tool I looking for!!

    I see many people who looking for tool like this. I agree with trial version idea and I think the tutorial is so important.
    I say tutorial, not basic or advance tutorial but complete tutorial for 1-2 games (or more). maybe step by step tutorial or same like Dummies book series.
    I think you may not have time for do that yourself. But you may create campaign for tutorial and get them some prize.

    This only my idea,Don't think about this so much.
    sorry for my poor english

    Ohm
     
  13. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks ohmdb! I know of a couple of full game tutorials in the works using Playmaker... stay tuned!
     
  14. yurgalavage

    yurgalavage

    Joined:
    Jan 14, 2012
    Posts:
    8
    SUBJECT: Starting new project. PC vs Mobile. Asset overhead. MOBILE guidance...

    I am starting a new project. Ideally the project would be able to be played on PC and BOTH mobile platforms (iOS, Android). With that in mind here are some questions.

    1) Is there a good resource to give you the design pre-requistes for creating games with MOBILE in mind? I.E., not every game created in Unity can be played on all platforms. There must be some design and 'rule of thumb' issues for starting projectes within Unity that are to be converted to or are made specifically for MOBILE platforms. Is there some list of rules or things to keep in mind when creating content, levels, and the basic screen layouts, etc.? Development will be on PC with the final program to be ported to MOBILE when done.

    2) Here is what I envision for the on-screen objects:

    a) likely clickable/touchable square 'tiles' that rotate (could be 20 by 20 collection of them, maybe not all visible at once, but within the 'scene' or 'level') that can be clicked or touched on mobile phone. How many 'tiles' can comfortably fit on a MOBILE screen and be touchable without fingers being too fat and pressing too many at once?

    b) the 'player' which is a single object moving about under the control of the user based on the tiles below it. might be several of these that are in motion at one time (maybe 3 at maximum). This might have some small animations and also is a 3d object.

    c) enemies (might be 10 or so at maximum) moving about on the tiles. Again, small animations on them, and a 3d object.

    d) powerups or other such 'items' that are sitting on the tiles, likely just rotating, and are picked up by the player. Maybe 10 of these at any one time. likely a 'square' with texture on it or might be a simple 3d model.

    e) Score, Info, Level information onscreen (i.e. powerups activated, time remaining in level, etc.) always visible. Might have this be on the RIGHT side of the phone if you turn the phone sideways and have it remain there always, but this also diminishes the size of the tiles that can be visible at any one time.

    f) might be some 'eye candy' items, like dark levels that require lights, simulated rain, puffs of smoke, explosions, possible non-playable activty (birds, butterflies, clouds, etc. moving on-screen).

    g) i will likely use assets like playmaker and uscript to help me develop more quickly. Do these create massive overhead and size to apps on MOBILE platforms? What is generally a maximum 'ideally accepted' phone app game size?

    This is pretty much it for now. So in all likleyhood, you have 400 tiles (that can be clicked/touched), max 3 player controlled objects, 10 enemy objects, 10 powerup objects, HUD items (might be 5-10 of these). Is this way too much for mobile phones to have interactivity and display stuff and have good FPS?

    Game is mostly going to be top-down view with user clicking tiles to cause most of the 'actions' that occur, while player objects and enemy objects react to the tiles being clicked, etc.

    Any info is appreciated, especially things to keep in mind with development for MOBILE using Unity.

    I need to know if playmaker is going to make the game size substantially larger, and if so, by how much?

    thanks for your assistance,
    Mike Yurgalavage
     
  15. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker has a runtime component, so it does add to the exe size. Most of the Unity recommendations for minimizing exe size on iOS still apply when using Playmaker (e.g. use Unity Pro to strip assemblies etc.): http://unity3d.com/support/documentation/Manual/iphone-playerSizeOptimization.html

    A minimal Playmaker app on iOS is ~13 MB uncompressed, so there's still room for content in 20 MB. For example, Pat The Talking Cat in the app store uses Playmaker extensively, has quite a lot of content and weighs in at 18.8 MB.

    While we try to find further optimizations in each update (1.3 will eliminate some dependencies), it's also worth noting that mobile apps are getting bigger these days as the content starts to outweigh the code...

    Anyway, hope that helps some!
     
  16. hexdump

    hexdump

    Joined:
    Dec 29, 2008
    Posts:
    443
    Hi,

    I have been reading about playmaker and it seems a pretty nice tool for unity. I'm involve in a IOS game and would like to ask you some qeustions before buying:

    1) I know this is a bit difficult to answer but could you measure the overhead of using Playmaker vs native c# script for gameobjects (for example enemies) AI?
    2) Is this overhead a problem in IOS games? My game is a fast paced 2D scroller.
    3) Does a video showing how to use playmaker for cutscenes exist? If it is creating a bootleneck in my game when playing I can still be using it to script cutscenes.

    That's all, thanks in advance.
     
  17. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Hi hexdump,

    1) The biggest overhead is the extra load time for FSMs, which load maybe 4x slower than native c# scripts, but it depends on their size. The actions themselves are c# scripts, called by the FSMs, so their performance is comparable. Playmaker ships with many modular actions, and there is some overhead to stringing them together instead of writing one large c# script. However, once you have your game working, you could always write custom actions for game specific, performance critical loops. You could even use FSMs to control your c# scripts using Script Control actions like EnableComponent, SendMessage etc., so you get nice visual state editing and debugging with your own c# scripts.

    2) There are quite a few iOS games made using Playmaker. Load time is the biggest issue again, but we've made some big performance optimizations in 1.3. If you're making a cutting edge mobile game that pushes the performance boundaries of the device, or if you want a really small exe (Unity is already fairly big!), then Playmaker may not be your best choice. But, for most games, performance is just one of many factors. In my experience most games are not abandoned because of poor performance, but because the developer can't find the fun and really answer the question: Why should you play *this* game? Playmaker is designed to let you rapidly iterate and *find the fun* - which is the most important part of game development!

    3) We don't have any cutscene tutorials yet. However, Playmaker is being used for cutscenes on quite a few titles (including a Wii title which we're very excited about!). Basically Playmaker lets artists create objects and move them around using Unity commands or iTween actions. The event driven system makes it very easy to change state with delays, triggers etc. to play animations, sounds and particle effects at the right time. Also the new Debug Flow feature coming in 1.3 makes it very easy to step through state changes to see what's really going on.

    Anyway, hope this helps!

    EDIT: Also forgot to mention that Playmaker integrates many advanced Unity tips and tricks to improve performance. For example, caching the results of expensive operations, or making all GUI calls from one OnGUI call in the PlayMakerGUI component. These operations can actually be a lot slower in c# scripts without these optimizations!
     
    Last edited: Jan 26, 2012
  18. Alex-Chouls

    Alex-Chouls

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

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Quick screenshot of the Networking support coming in 1.3. Networking events and actions with visual debugging!

    $NetworkConnect.jpg

    And a sneak peak at the new watermark feature that helps you identify graphs at a glance:

    $Watermarks.jpg .

    Watermarks are the first step in a visual makeover that will turn Playmaker graphs into interactive storyboards!

    Of course you can always stick with the old look if you want ;)
     
  20. Mark_T

    Mark_T

    Joined:
    Apr 25, 2011
    Posts:
    303
    Looks nice. :)

    What do you mean exactly by " interactive storyboards"?
     
  21. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    We're still working on it, but the idea is to develop a visual language for common game operations, essentially images that can be attached to States. Actions will define a default image that represents the action. So as you build your FSM you automatically create a "visual storyboard." And you'll be able to make custom images to make your own storyboard components.

    It won't replace the current graph/inspector setup, it's more like an extra visual layer that makes the graph easier to read at a glance.

    It's also an experiment that could lead to very interesting directions for Playmaker 2 ;)
     
  22. theBrandonWu

    theBrandonWu

    Joined:
    Sep 3, 2009
    Posts:
    244
    Networking events and actions, great! Does this support anything outside of Unity Networking? Will I be able to use it in combination with photon / uLink?
     
  23. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    1.3 will support standard Unity networking. But support for Photon is in the works :)
     
  24. MABManZ

    MABManZ

    Joined:
    Sep 29, 2011
    Posts:
    144
    Good stuff, hopefully all the networking features will be complete by the time I attempt to start on multiplayer for my project :D
     
  25. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Happy to be a part of it!


    Networking support is looking awesome! It already gives me an idea!

    I know I asked earlier, when the 3.5 beta was fresh, but is the plan still to bring Social API and Gamecenter functionality with 1.3?
     
  26. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Social API and Gamecenter probably won't make it into 1.3. However we should be able to get those out soon after, probably 1.3.1...
     
  27. MABManZ

    MABManZ

    Joined:
    Sep 29, 2011
    Posts:
    144
    While we're on the topic, any plans for Openfeint support?

    :razz:
     
  28. yurgalavage

    yurgalavage

    Joined:
    Jan 14, 2012
    Posts:
    8
    I have gotten to the part of my project when GUI is ready to be implemented. Are there already commands to do GUI built into playmaker?

    I have included a screenshot of an 'example' game where there is a 3d area and a GUI area. The GUI is static and overlays the 3d area. You see there is text, score, progress bars, icons/stamps showing lives and special actions, etc. How is this done with playmaker? if this isn't possible with playmaker then this is a SORELY MISSING feature, since this is absolutely required in any game. If there are other packages that can be used with playmaker, are there any tuts on this and using them with playmaker?

    best,
    Mike Yurgalavage

    IMAGE IS BELOW
    ----------------------------

     
    Last edited: Feb 11, 2012
  29. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    We'll definitely look into Openfeint support too...
     
  30. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yes. Check out the GUI, GUILayout and GUIElement actions: https://hutonggames.fogbugz.com/default.asp?W2

    You can actually preview GUI and GUILayout as you build them in Playmaker, which makes them a little easier to work with. If you go this route I recommend you familiarize yourself with Unity's GUISkin setup.



    Or you can use GUITexture and GUIText to build your UI. These lack some of the flexibility of GUI and GUILayout actions, but are very straightforward to setup.

    There are examples of both in the PlayMakerSamples. Import PlayMakerSamples.unitypackage into an *empty* project to check them out.

    Or you could check out some of the popular 2D/GUI libraries in the Asset Store. There are custom actions available for most of these on the Playmaker Forums/Community Wiki.

    In fact, I'd recommend posting questions on the Playmaker forums, since there are many people there who've built GUIs with Playmaker and are willing to share!
     
  31. yurgalavage

    yurgalavage

    Joined:
    Jan 14, 2012
    Posts:
    8
    Alex that video was very helpful. I am wondering if you could discuss further the following concerns:

    Using the GUI actions from playmaker to display text, can you:

    1) pick a font?
    2) change font size?
    3) change text of a label or box 'on the fly' (i.e. update score)
    4) change font color?

    Also, if you have a game and your max resolution is going to be 1900X1200 or something BUT the user can play at lower resolutions, is there a way to 'resize' text logically to fit the new screen resolution?

    You have to admit these are pretty common and important questions for any GUI or score display.

    best,
    Mike
     
  32. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yes to all of the above. Again there are a variety of ways to do each of those things, so you'd need to familiarize yourself some with the underlying Unity systems (GUI, GUILayout, GUISkin, GUIElement). The Unity docs cover those nicely.

    Playmaker exposes native Unity GUI methods as Actions in the State inspector. But unlike the Unity inspector, where you can assign a constant value to a parameter, in Playmaker you can assign a named variable. Then you can manipulate that variable using other Playmaker actions. E.g. set the text to display in a text field, use iTween to animate the scale of a button, etc.
     
  33. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    The GUI discussion has moved here:
    http://hutonggames.com/playmakerforum/index.php?topic=1090.0

    Also keep forgetting to mention that since 1.2 you have generic Get/Set Property actions to manipulate most behaviour parameters.

    For exampe, to set the fontSize, drag the GUIText into the Target Object field, then select the fontSize property:
    $fontSize.JPG
     
  34. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Playmaker 1.3 is live in the Asset Store!

    Works with Unity 3.5 (Flash support coming soon), networking support, drag-and-drop to add and move actions, Debug Flow to scrub back through state changes, performance and load time optimizations... and lots more! Check it out!

    **Please backup projects before importing the new version! This is always a good idea in Unity!**
     
    Last edited: Feb 15, 2012
  35. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    411
    yay! thanks Alex!!
     
  36. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Version 1.3.1 submitted.

    A couple of quick bug and workflow fixes:
    https://hutonggames.fogbugz.com/default.asp?W311

    Full support for the new pathfinding in Unity 3.5 is coming in the next couple of days...

    Playmaker + Unity pathfinding = Super cool AI :)
     
  37. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Sorry to hear that! Have you tried contacting the asset store...
     
  38. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Hutong Games now offers a 50% educational discount to academic institutions and students!

    Please contact info@hutonggames.com for details.
     
  39. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Great update!! Thanks
     
  40. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks Lars!

    I'm really excited about the networking support - can't wait to see what people make with it!

    We also have a few things that didn't quite make it into this update... we wanted to get this out with 3.5 so Playmaker users can upgrade.

    And we have to make some screencasts to help people find all the new features!

    So stay tuned...
     
  41. Alex-Chouls

    Alex-Chouls

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

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Thanks sebastiao97!
     
  43. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Thanks for the update, I would like to read and write global playmaker variables from a unity javascript that has them exposed in the unity editor, how is this possible in playmaker? I would like to tweak some gameplay settings from the unity variable window.
     
    Last edited: Feb 21, 2012
  45. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Here's a quick example:

    Code (csharp):
    1. using HutongGames.PlayMaker;
    2. using UnityEngine;
    3.  
    4. public class AccessGlobals : MonoBehaviour
    5. {
    6.     public int numLives;
    7.  
    8.     private FsmInt fsmNumLives;
    9.  
    10.     void Start ()
    11.     {
    12.         // Get the global fsm variables
    13.         var globalVariables = FsmVariables.GlobalVariables;
    14.        
    15.         // Get the global numLives variable
    16.         fsmNumLives = globalVariables.GetFsmInt("numLives");
    17.        
    18.         // Set the global variable to inspector value
    19.         fsmNumLives.Value = numLives;
    20.     }
    21.    
    22.     void Update ()
    23.     {
    24.         // get the current global variable value to show in inspector
    25.         numLives = fsmNumLives.Value;
    26.     }
    27. }

    EDIT: Just realized you asked for unity javascript, however this shouldn't be too hard to convert... let me know if you run into problems...
     
  46. pudd1nG

    pudd1nG

    Joined:
    Feb 21, 2012
    Posts:
    36
    Are there still plans for photon support? We're building a game using the photon cloud and it would be great to be able to handle its instantiation functions with playmaker.
     
  47. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    Hey Alex,

    I would love to see any support for FingerGestures, NGUI and MegaFiers :)
    Is there any chance to get this done for near updates?
     
  48. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
  49. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    Yes. Photon integration should be available soon.
     
  50. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    There are some custom FingerGesture actions available on the Playmaker forum (M_Stolley posted a link above).

    I'd love to get some NGUI and MegaFiers actions out soon, but I'm not sure when yet...

    There are also generic Get/Set Property actions that can do a lot of work (but I haven't tried them with those systems yet).