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
    
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
add comment

1 Answer

up vote 0 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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