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.

Does anyone know a better controller for 2D Games than a virtual on screen joystick? The pros of the joystick are:

  • Easy to implement for developers
  • Familiar interface for users

But there is a huge con:

  • The screen is obscured by thumbs.

And also, is there any library for a quick implementation of virtual joysticks for Libgdx?

share|improve this question
    
I suppose you could port the code from Andengine: code.google.com/p/andengine/source/browse/src/org/anddev/… I think someone has already done this for libgdx, you may want to ask on the badlogic forum for an implementation. You could also target devices like the Experia if you want to avoid the issues you mentioned. –  Rubber Mallet Apr 5 '12 at 18:19

3 Answers 3

up vote 3 down vote accepted

Personally, I've found most "on screen joysticks" pretty lame, no matter how slickly they're implemented. Its a pretty clear case of taking a solution from a different technology (consoles/arcades) and trying to apply it to a new and rather different technology (multi-touch screens), and resulting in a mess. So, I'd add some more "cons" to your list that the joysticks give no natural feedback (e.g., for resting at neutral, or reaching a limit of the joystick on any axis, or knowing if your thumb is "on" the button or not).

On one of the recent Google Android Developer Hangouts (Mar 30, 2012), the Google folks reviewed 'Overkill' and I remember them commenting on how they liked they way it improved on the virtual "joystick".

'Neil Rajah' is a new (libGDX-based) game with a nice twist on the standard joystick. Its like Canabalt in that your character auto-runs, but left and right thumbs control jumping and attack respectively. I thought it was reasonably well done, and a compromise that worked well enough with the limits of multi-touch. (On second thought, it hardly qualifies as a joystick ... but maybe that's my point.)

I suggest you edit the question to be less libgdx specific and more about generic multi-touch (unless I'm mis-reading your intention). There may be games on other multi-touch platforms that do innovative things with virtual input controllers that would be worth"borrowing".

share|improve this answer

From my experience with Libgdx, you will more than likely need to write up your own system. While it may be a solid learning experience, it will not be the fastest route. I suggest you hop on the LIBGDX IRC and ask around. That always helped me. :)

Libgdx is pretty simple to override, however, because it uses the Table-Layout system it may be tricky to handle the positioning of UI elements dynamically.

Good luck!

share|improve this answer

I think libGDX has a default joystick implementation. Check out scene2d.ui Touchpad

share|improve this answer

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.