I can't seem to find any well executed code examples for Android joystick controls.

Whatever it may be, algorithms, pseudo code, actual code examples, strategies, or anything to assist with the design and implementation of Android joystick controls; I can't seem to find anything decent on the net.

What are some well executed examples?

More specifically,

  • Pseudo Code
  • Current Examples
  • Idea/Design
  • Functionality Description
  • Controller Hints Related Directly to Android Architecture

What kind of classes will I have making this? Will there be only one? How would this be implemented to the game architecture? All things I am thinking about.



  • I've found this on the subject Joystick Example1, though I am still looking for different examples/resources.

  • Answered my own question with a link to the code of the above video. It's a fantastic start to Android Joystick Controls.

  • \$\begingroup\$ That looks like the basic idea for the most accepted analog 'mushroom' joystick. The granularity of -10 to 10 is a bit sad : old analog joysticks from the 80s were -127 to 127 square. Aesthetically the controller should probably also be neatly constrained inside the circle, with distance from center for the values instead of a square measure. \$\endgroup\$ – karmington Sep 14 '11 at 23:52

Anarchy Joystick Widget

The link above is code for implementing a Joystick. You can see this code in action with this video.

  • \$\begingroup\$ this link doesn't work \$\endgroup\$ – jhocking Feb 5 '14 at 5:16
  • 1
    \$\begingroup\$ @jhocking For now, the wayback machine should let you see the page as it was. It would be nice to have an answer that is a little more thorough than just a link, though. \$\endgroup\$ – Icy Defiance Aug 18 '14 at 19:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.