Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Playmaker for Unity - CodeStock 2015

Playmaker for Unity - CodeStock 2015

Updated slides for my Playmaker for Unity talk at CodeStock 2015 at the Knoxville Convention Center. This is an hour long version of the talk that I previously gave at the Knoxville Game Design meeting.

LD Smith

July 11, 2015
Tweet

More Decks by LD Smith

Other Decks in Technology

Transcript

  1. About Me • Hobbyist Game Developer since 1995 • Unity

    and other environments • Ludum Dare participant • Occasional Knoxville Game Design speaker
  2. About Unity • Free • Unity 5 Personal • Pro

    License • Build for multiple platforms
  3. Playmaker Background • Cost: $95 – Often discounted • Requires

    Unity 3.5 or higher • Created by Hutong Games (@HutongGames) – Alex Chouls and Erin Ko •玩
  4. Editor Pane • FSM State Diagram • FSM • State

    • Events • Variables • Preferences
  5. Creating an FSM • FSM (Finite State Machine) – Zero

    to many FSMs – States – Events – Transitions – Variables • Creating New FSM
  6. States • Examples – Light Bulb – Game Character •

    Only active at a time • Contains a collection of actions • Actions executed top to bottom
  7. More on States, Events, and Variables • Active is highlighted

    • Manually transition to state • Global Events • Global variables
  8. Action Browser • Standard Unity methods • Additional helpful methods

    • Actions are “Code” • Execute Scripts
  9. Using Actions • Every Frame – Similar to Update •

    Send Event • Delay value – Avoid infinite loops • Find Game Object
  10. Managing Actions • Disabling actions • Copy and paste into

    FSMs • Navigate with Project hierarchy • Lock an FSM • Show debug values
  11. Operator Actions • Number comparison – Most data types •

    Boolean comparison • Events for each comparison • String operators
  12. ArrayMaker • Storing array type information • Not included with

    Playmaker • Downloadable from Playmaker website – https://hutonggames.fogbugz.com/?W715
  13. Making a Light Bulb • Create FSM • Off and

    On states • MOUSE DOWN transitions • Point light as a child • Activate Game Object actions
  14. Moving a block • Add cube • Add a RigidBody

    • Add a PlayMaker FSM • Add Moving State • Input > Get Axis – Transform > Translate • Or Get Axis Vector – Map to Plane • Order of actions is important • Double line button to toggle – Constant values – Variables
  15. Follow Camera • Add FSM to Camera • Smooth Follow

    Action • Target to player • Set Damping
  16. Character Tips • Capsule collider • Freeze rotation axis –

    Avoid “falling over” • Default terrain map – Zero to 600 • Character controller vs Rigid Body
  17. Jumping • Idle State • Jumping state • jump event

    • Get Button Down action – Send jump event – Transition to Jumping • Add Force action • Transition back to Idle • Self / World space
  18. First Person View • Disable Smooth Follow Action • Set

    Parent action • Set the Camera’s Parent to player
  19. First Person Controls • Mouse Look action • Action must

    be on the player object, not the camera! • Uses airplane joystick view control by default • Sensitivity values – Negative Y for traditional controls
  20. Fade In / Out • Add action to camera •

    Set Color and Time • Event when completed – Reload level – Game over screen
  21. Audio Actions • Play Sound • Audio Play – One

    Shot Clip • Other actions – Mute – Pause – Stop – Play random – Set pitch, – Set volume
  22. Getting Help • Playmaker Forums http://hutonggames.com/playmakerforum/index.php • Playmaker Tutorial Videos

    http://www.hutonggames.com/tutorials_game_design_with_playmaker.php • Playmaker Documentation https://hutonggames.fogbugz.com/default.asp?W1