B4A Library [Class] GamePad - Multitouch gamepad

This class implements a multitouch gamepad made of two "joysticks":

SS-2012-07-12_10.06.04.png


The gamepad is made of a transparent panel. It uses Agraham's Gestures library in order to support multitouch.

The gamepad doesn't raise any events. Instead the developer is expected to periodically fetch the two joysticks values with: GetLeftValue and GetRightValue. Usually this is done with the main game timer.

In this example each joystick moves a small rectangle. You can instead use one joystick for movement and the other for different actions.
 

Attachments

  • GamePad.zip
    9.6 KB · Views: 1,599

Toley

Active Member
Licensed User
Longtime User
Hi Erel, this is really cool and works very well. I just have a question, can we make the joystick bigger for large tablet ?
 

JTKEK

Member
Licensed User
Longtime User
how to add the gamepad into a panel?
so i can control the visible of gamepad
 
Top