BASIC

Author Topic: GameInput  (Read 575 times)

Online MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
GameInput
« on: 2018-Jun-15 »
Hi
Does anyone have a newest version of the Gameinput files and example snippet of use...
Also if there is a corresponding gameinput.java file?

Thks!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3473
    • View Profile
    • Space Fractal
Re: GameInput
« Reply #1 on: 2018-Jun-15 »
Here is the lastet code im uses in Greedy Mouse. Its all based on Android.Scancode() and KEY().

android.Scancode() (if im remember the correct one), is same as KEY(), but its return a float, rather than a int. Analoge buttons returns anything from 0-1 (so make sure you set a deadzone).

Since Android controllers is not implemented to joy commands is simple becauseā€¦. its 100% impossible to do. that is due they are seen as a keyboard and there is really no mapping standard.

The only quite standard one is one stick/dpad (make sure to checks both) and the 4 face buttons. Rest does not follow a standard at all (unlike Windows)!

GameInput does also have a remapping, but mightbeen a little bit compliced one. In PowerUp Elevation im did even not choice to use this one this time.

But you are very wellcome to use GameInput :-).
« Last Edit: 2018-Jun-16 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3473
    • View Profile
    • Space Fractal
Re: GameInput
« Reply #2 on: 2018-Jun-16 »
but gameinput also works fine for Windows (both keyboard and joypad), iOS, Android and Pandora (without tested it throught). Only Android might require remapping.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Online MrPlow

  • Prof. Inline
  • *****
  • Posts: 1314
    • View Profile
Re: GameInput
« Reply #3 on: 2018-Jun-16 »
Thanks SF,

Looking to offer x box controller / or equivalent bluetooth controller for windows
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs