Author Topic: Various Android Studio issues (tilt, assets, joy)  (Read 880 times)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
anyway, while im newer got a change what its happens with the assests and sound, and im newer say the projects (only what im can help now, if still issues), then im now worked a bit on JOY using the OUYA controllers. Im cant test with other controllers before the Android TV arrive.

The values that is on the sticky thread is actuelly a bit wrong. Please update it.

Im used this test code for glbasic:

Code: (glbasic) [Select]
LOCAL xx% = GETJOYX(0)*100
LOCAL yy% = GETJOYY(0)*100
LOCAL zz% = GETJOYZ(0)*100
LOCAL rx% = GETJOYRX(0)*100
LOCAL ry% = GETJOYRY(0)*100
LOCAL rz% = GETJOYRZ(0)*100
LOCAL dx% = GETDIGIX(0)*100
LOCAL dy% = GETDIGIY(0)*100


DEPRINT("name: "+GETJOYNAME$(0)+" x:"+xx+" y:"+yy+" z:"+zz+" rx:"+rx+" ry:"+ry+" rz:"+rz+" dx:"+dx+" dy:"+dy)

Im uses a DEPRINT function for SDOUT here really. Just change it what you want.

Yep, GETJOYNAME$(0) now works with the new c++ version (you should no need recompile it).

in c++ im used those values:

Code: (glbasic) [Select]
        Data->lX = 32767 * (AndroidFloatCode(244) - AndroidFloatCode(245)); // FIX 2020 GOOGLE STANDARD
        Data->lY = 32767 * (AndroidFloatCode(246) - AndroidFloatCode(247)); // FIX 2020 GOOGLE STANDARD
        Data->lRy = 32767 * (AndroidFloatCode(250) - AndroidFloatCode(251)); // FIX 2020 GOOGLE STANDARD
        Data->lRx = 32767 * (AndroidFloatCode(248) - AndroidFloatCode(249)); // FIX 2020 GOOGLE STANDARD
        Data->lZ = 32767 * (AndroidFloatCode(252) - AndroidFloatCode(253)); // FIX 2020 GOOGLE STANDARD
        Data->lRz = 32767 * (AndroidFloatCode(254) - AndroidFloatCode(255)); // FIX 2020 GOOGLE STANDARD

PS. Tilt on Android has been very much offtypic now, but changed the subject to more ontypic.
« Last Edit: 2020-Feb-20 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Hi SP

I tested another app that had no code changes (unless it was pushed) and it crashes on my xbox controller but works fine on ouya - so perhaps my xbox controller has for some reason got a fault maybe - not sure.

However, invaders app is not working for ouya with sticks only dpad - doesn't crash - just wont respond to Analogue stick.
« Last Edit: 2020-Feb-21 by MrPlow »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
this was not what im asked, please confirm the assest files now works again? gamepads is toally different beast, which is hell off annoying on Android. Trust me.

Im have only a ouya controller to test on a wireless device, so you must wait here to next week. That it. im actuelly newer tested with x-box controller as its dont follow the google standard, while ps4 does.

Also its been changed quite a bit with the JOY commands communication with Java and c++, so multiplayer and tilt can been worked.

So except this to been changed to a better tight with the JOY commands and KEYS() would been expands to much much more than 256!
« Last Edit: 2020-Feb-21 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Hi SF

Sorry I didn't understand at the last part of that message.

I thought I said on another post,  the Assets are back loading fine - thanks :)

I updated my AS - but it is a little unstable, AS is crashing from time to time.






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

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
Last time, you said its still broken, but then im might have oversigt it. but phew :-).

AS is quite stable here throught. correctly Using 3.5.3 with only using the Android Studio JDK. Howover using about 1.5gb of memory (im do have 24gb ram, so not a problem).

Im do prepare the gamecontroller code to possible to use multiply gamepads with own values seperated include Tilt (as own joypad). Tilt example now routed to GETJOYX(0) and GETJOYY(0). Normal controllers just use another joynum.

« Last Edit: 2020-Feb-21 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
its would been a very great help, if you can do a simple gamepad testing app. Now im have used a bit too much time in this one (hehe). Etc its must been your turn to help!

Etc its should show a gamepad and the default mappings like this screen:
https://uk.gamesplanet.com/community/resident-evil-7-biohazard-steam-key--3058-1/discussions/70799-xbox-one-controller-key-binds

And then do a "remap" function for the image, if the controller does not working.

Then its would been possible to people to send images to us as im have no changes to testing all controllers that is out to the market.

Im is happy if its just using with KEY() values im have used by default, not by using JOY commands (except for the naming).

For auto remapping, then JOY() commands for those joypads would works out of the box.

Howover for most cases today, right stick and both triggers is seen often been swapped.

You can also get the controller name now with the newest update (Currectly with GETJOYNAME$(0), but later when im update, its would been GETJOYNAME$(1) instead as tilt default, allways enabled, uses GETJOYNAME$(0). So dont hardwire it by number, but with a variable instead.
« Last Edit: 2020-Feb-21 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
Checkout the update. Im got my Android TV, still not connected, but has been possible to checking it with a TV Remove and also multiply gamepads is now possible to do (as tv remove and the ouya was threated as own controllers).

Fell free to update the post. Im choosen to move the gameconroller in the bottom, due the image is near there.

PS. Im have still NOT tested the xbox one controller as im do NOT have a blutooh one, but can only use it wired. Here Google did first officielly support it in Android 10, while Playstations controllers was supported a quite away back.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
im just tested Invaders game again. assets confirmed loaded correctly again. Howover looks quite strected and bad in landscape mode and got cutted quite off on the right screen! Howover the game looks fine the portrait mode.

The only compliements im have is the the controllers is far too bottom on the screen. Here you DONT need to change the graphics, but just  do a higher hitbox for the touch. that it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Thanks SF,
Increase just height of the hitbox for buttons then?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
the icons is placed too much on the bottom on the screen, and im have tendens to touch about 20-30 over the icons. So if you do the touch hit box bigger in height, the  game would been more playable. You dont need to move the icons its self higher. just do the touch hitbox bigger, so you can touch a bit outside the icon as well. mostly when you touch over it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
just got the Android tv, updated the gamecontroller code and its now a least works with ouya, ps4 and xbox one controllers. both last one was wired.

Howover buttons on ps4 can been swapped (example O and X), but this is something im will not touch at all, since this can create new issues instead.

There was a crash when used sticks, but that is fixed too.

Now all im need is remapping more controllers.

Howover this android tv was a liitle bit quite annoying as im could not testing gamepad while using adb connection.

Howover im do have seen a controller might have been connected as Player 3 and not as Player 1 for some reasons. Not sure why, but im have expanded to possible support 8 players, but codewise correctly 6 players.
« Last Edit: 2020-Feb-23 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1660
    • View Profile
Just noticed something from the icon creation

My recent apps are flagged as "may not be optimized for your device" etc.
48 × 48 (mdpi) 72 × 72 (hdpi) 96 × 96 (xhdpi) 144 × 144 (xxhdpi) 192 × 192 (xxxhdpi) 512 × 512 (Google Play store)

Thought it was icon sizes - but they seem fine...not sure why getting flagged for this...any ideas?



« Last Edit: 2020-Feb-24 by spacefractal »
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3827
    • View Profile
    • Space Fractal
no idea actuelly why. property a androidmanifest.xml issue with missing some sceensize me thinks? Im do diddent see the message here, except a game not supporting my Android TV (as excepted). not as im aware of.

Howover im do ran into trouble when not creating a adk bundle.

evetuelly, which devices is its? Google Play should tell what kind it is.
« Last Edit: 2020-Feb-24 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.