Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as too broad by Byte56 Aug 18 '14 at 19:53

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

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. – karmington Sep 14 '11 at 23:52
up vote -1 down vote accepted

Anarchy Joystick Widget

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

share|improve this answer
this link doesn't work – jhocking Feb 5 '14 at 5:16
@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. – Icy Defiance Aug 18 '14 at 19:09

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