Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

Cheers!

UPDATE

  • 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

put on hold as too broad by Byte56 2 days ago

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

1 Answer 1

up vote -2 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 at 5:16
1  
@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 2 days ago

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