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?

  • \$\begingroup\$ 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. \$\endgroup\$
    – Chuck D
    Apr 5, 2012 at 18:19

2 Answers 2


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".


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!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .