Thumbstick-template (with capx)

0 favourites
From the Asset Store
Fruit Slicer Template & Quality fruit and slice graphics (c3p,png,illustrator files)
  • I've come across many questions in the "How do I"-section about analog-stick/thumbstick/onscreen joysticks and decided to make a capx showing how to create such onscreen controls for all build-in movement behaviours Construct2 has.

    Thumbstick template preview online

    (Touch the behaviour name to toggle between the different behaviours)

    I'd like your opininions to improve upon this example before posting it online.

    Which extra options are needed/wanted?

    How could I make it better?

    I'd like to thank you for your input and thoughts about this, so I can make it a one-stop solution for those wanting to implement these kind of controls to their (mobile) C2 projects.

    Update 5-2-2014

    I won't be able to work on this any further, so I have decided to share the capx without any comments and or further improvements/adjustments.

    Here's the link

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Great work, That's a really good demo, nice feel to the travel of the "stick"

    To improve, maybe a continuous scrolling in all directions as you soon run into the edge and a sprite change to match the various modes, but they would just be mainly cosmetic.

    As I said well done.

  • pixel perfick,

    Thanks! I know the graphics are crap at the moment and the area is probably too small, but they are actually only there to show it's working.

    For improvements I was thinking of things like being able to put the stick anywhere you want on-screen easily, or adding adjustable speed for the different behaviours depending on distance to the center of the stick (only bullet behaviour has this implemented now).

    Also I wanted to know if the response to user input is as expected, but your comment about the nice feel makes me think I chose wisely.

  • Oh, well if you put it like that...Oh and I didn't say the graphics were crap! lol.

    A trim to adjust the dead zone

    A toggle for button / joystick jump on the platform behavior.

    Jump / movement velocity sliders , giving readouts of variables used.

    Platforms in the platform section...

    Dual joystick option...

    If anything else springs to mind I'll post it up...

  • Just keep them coming..

    Dual joystick-implementation could be fun..

  • For the retro freaks like me...digital type D pad option...

  • For the dual thumbstick option I have chosen to make an example with a tank of which the top can rotate freely..

    Update (hopefully coming soon)

  • pixel perfick

    I'm not planning to make a digital D pad, for it should be possible for anyone knowing the basics of Construct2 to create it themselves.

    At least from what I understand it would just be sprites with on touched behaviour.

  • Looks really good. First I tried it on my computer and everything worked fine. But then I tried it on my iPhone - only the fire button worked, I couldn't get the thumstick to move at all...

    It might be nice if the controls went almost completely invisible when there is no touch event in progress - so you can see more of the background.

  • AllanR,

    I have only tested on desktop and Android, for I haven't got apple-products. It should work, though. I'll look into what the issue could be, probably something different with touch ID.

  • I tried it out on my iPad with Safari and I'm having the same issues as AllanR. I can shoot, but I can't move. Works great in Chrome for PC.

    I like the duel joystick idea and the idea to create the joystick on touch. Might be cool to allow the player to adjust a location of a fixed joystick on the screen and change it's opacity.

  • Are you tracking the touch by ForID or are you just judging based with the simple and only OnTouch and OnEnd. If you don't use Touch.ForID to track a direct touching instance you can't effectivly do any gamepad conrtols.

    It's why I wrote my tutorial in the first place to overcome the Touch.ForID hurdle.

    good fortune though. Mine only covers the principles and more robust CAPX is a good addition :)

    If you haven't integreated the ForID multi touch. You can build off of the tut and capx from this tutorial :)

    scirra.com/tutorials/398/touch-stick-controllers

  • jayderyu,

    Ofcourse I'm using touch ForId, that's one of the most important parts, as you well put it. I will look into why this isn't having the desired effect on iPhones.

    I will also look into your tutorial to see if it has any new angles on the subject to look into.

  • Discovered a small irregularity in the events, which I didn't think would have any influence but changed anyway.

    For people with Iphone and Ipad and such please try again to see if the multitouch now works. (You'll probably have t refresh the page a few times, at least I always have to with dropbox)

  • I just tried it again on my iPhone and it does work now. There were a couple times when I just missed the thumbstick and thought that it has locked up or something. It might help if the middle circle of the thumbstick was slightly bigger... other than that it looks great! :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)