playMaker

Author Topic: Creating dual pad controls only using PlayMaker  (Read 30225 times)

meaphly

  • Playmaker Newbie
  • *
  • Posts: 26
Creating dual pad controls only using PlayMaker
« on: May 05, 2011, 09:30:40 PM »
Hi,
    I am totally new and amazed by PlayMaker and would like to ask a question so I don't have to reinvent the wheel :)
Is it possible to create a dual pad control system for iOS using only PlayMaker and no other scripts?

Thanks in advance!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Creating dual pad controls only using PlayMaker
« Reply #1 on: May 08, 2011, 03:56:50 AM »
You should be able to build one using Touch Event, Get Touch Info and some Math actions. However, this is on the list of built-in mobile actions that I'd love to have in Playmaker soon (e.g., TouchJoystick, DrawPath, DragSelection...).

If you tackle it as an FSM, I'd recommend an FSM for each joystick.

Also came across this useful reference (I plan to use it for the TouchJoystick action):
http://www.gamasutra.com/view/feature/6323/a_guide_to_ios_twin_stick_shooter_.php

henk

  • Playmaker Newbie
  • *
  • Posts: 24
    • Dawson 3D
Re: Creating dual pad controls only using PlayMaker
« Reply #2 on: July 11, 2011, 09:11:04 PM »
This would be very useful. Should I look on this thread for an announcement when you've got this done?

gamedivision

  • Full Member
  • ***
  • Posts: 227
Re: Creating dual pad controls only using PlayMaker
« Reply #3 on: December 05, 2011, 03:46:26 PM »
i really would love this,does anyone have any tutorials on creating a joystick with buttons

thanks

Lars Steenhoff

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Re: Creating dual pad controls only using PlayMaker
« Reply #4 on: March 07, 2012, 06:13:45 PM »
Any ETA when this will be ready? Thanks  :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Creating dual pad controls only using PlayMaker
« Reply #5 on: March 07, 2012, 11:37:40 PM »
I'll try to prioritize making some more mobile actions this or next week. I'd definitely like to get some higher level mobile actions out there!

Groo Gadgets

  • Beta Group
  • Full Member
  • *
  • Posts: 175
Re: Creating dual pad controls only using PlayMaker
« Reply #6 on: March 12, 2012, 12:23:34 AM »
I too would love to see this implemented! My 9 year old boy wants to make his own game based on the ios game "minigore" and the would be the perfect starting place for him to get assets working quickly.

Thanks in advance  :-)

slkdudeman

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Creating dual pad controls only using PlayMaker
« Reply #7 on: March 25, 2012, 06:17:51 PM »
Would also like to know when this would be available, or if there is any information out there on how to do it now? Im stumped at even trying to create a simple left/right movement buttons with playmaker.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Creating dual pad controls only using PlayMaker
« Reply #8 on: March 29, 2012, 04:14:07 PM »
It's taking a little longer than I wanted to make a Touch Joystick action...

In the meantime, have you looked at the Device Actions:
https://hutonggames.fogbugz.com/default.asp?W490

For example, to move something around you can use Get Touch Info and Store Delta Position.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating dual pad controls only using PlayMaker
« Reply #9 on: March 30, 2012, 05:27:45 PM »
Hi,

 Actually, if you can in the next release implement the ability to get Vector 2 properties, then this is pretty much sorted.

 The penelope tutorial available from Unity has a joystick script, and you would simply get it with the action get Property from a fsm Object pointing to that joystick.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating dual pad controls only using PlayMaker
« Reply #10 on: April 06, 2012, 02:19:34 AM »
Hi,

 I rolled a quick playmaker action in javascript to plug with the unity joystick controller. I have attached a package with a prefab with the two joystick, texture, scripts and fsm attached. You simply need to extrapolate on this and maybe watch these values from other fsm, or declare the fsm variable as global instead ( I haven't done that to now corrupt your project, simply switch from local to global variable and done).

 One could improve the action to get the number of hit and control the dead zone etc etc. but that's already more advanced and easily done, now that the base is there.


 Bye,

 Jean

eccoecco

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Creating dual pad controls only using PlayMaker
« Reply #11 on: April 22, 2012, 02:56:56 PM »
Hi
New convert ( trying to get everyone in Toronto's indie gaming industry hooked too) to playmaker, unity, even basic programming.  In reading the on-line manual I'm running into the issue of items being described as themselves (vector 3 = a variable for storing vector 3 information) this kind of description isn't as helpful as it sounds (I know now though).  Just above is a suggestion to review "get touch info" with the requirement to store your "delta position".  What is a delta position and where an I find a resource that will fill in these blanks that separate my intro/noob  knowledge from that of a full fledged beginner?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating dual pad controls only using PlayMaker
« Reply #12 on: April 22, 2012, 05:30:17 PM »
Hello!

 Ok, the delta position, is the tiny movement that occured between this frame and the last frame. Say you move with your finger the joystick very fast, ths delta value will have a greater value then if you move your finger very slowly.

 a game runs betwen 20 and 60 frame per seconds (fps), so if your delta position is 1 and you are running at 60 fps, it means that the joystick moved 1 unit within 1/60 of a seconds.

does that make sense?

in the package I sent on this thread, you don't need to worry about that, instead, what you likely want with a joystick controller is the actual absolute position, that is, if you maintain the joystick on its right, you will get 1, constantly ( where your delta position would become 0, because you are not moving the joystick anymore).

 So if you want to control a object to move it, you simply multiply the absolute position of the joystick with a speed factor and use that to translate your object.

 Does that make sense?

 Bye,

 Jean

Archivaldo

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Creating dual pad controls only using PlayMaker
« Reply #13 on: August 04, 2012, 01:28:24 AM »
Hi, i'm really new with play market and unity in general so Jean please if you can explain  to me how to make the character controller with the joystick step by step or something like that i would greatly appreciate it and im sure that information will be really helpful for other members.

sorry for my bad english and thanks.

tom3d

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Creating dual pad controls only using PlayMaker
« Reply #14 on: August 04, 2012, 03:58:15 AM »
Yes a full tutorial would be much appreciated!