GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2020-Feb-18

Title: Various Android Studio issues (tilt, assets, joy)
Post by: MrPlow on 2020-Feb-18
Hi Guys

I am using GETJOYX(0) to get Tilt working on Android - but no JOY so far (sorry for the pun!)

I tried to do a keycode scan on it too but no luck either.

checking for GETJOYX(0)>.5 and  GETJOYX(0)<-.5
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
use KEY(240) -> KEY(243), and is disabled by default, so dont forget to enable it in strings.xml
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-18
Super! i forgot about the values.xml setting.   :)
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
its was so remapping dont touched it for games that doesent not or not needs to use it. Ads still shows, regaardless what status its have. that was the main reason. Im do should add a java feature to possible to disable/enable code wise.....

PS. Its in Strings.xml settings, not values.xml. All manual settings is being doing in that file. Im more want to use that file ind to insert its in the code.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-18
Just set the value and still no key change or detection of the tilt using Android 6.0 on Nexus 2

    <string name="UseTilt">1</string>

Am I missing something or should this work?
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
im checking what happens. etc with the KEY() function.

Its seens working here fine with this code:

Code (glbasic) Select

LOCAL X%=(KEY(240)+KEY(241))*1000
LOCAL Y%=(KEY(242)+KEY(243))*1000
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-18
Also, not sure if its down to SDL file code changes but now with the new ads code - using Gamepad is crashing app.

Did the Gamepad code change?
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
im havent touched it, but im do can see JOY() using all completly wrongs values which still uses the old version before Android Studio.

For any crash, there should been some Logcat, where it crash. Im do also sends to the ads when gamepad is used. Im do might need to disable the ads thing for that throught as its might can been same issue with admob as not all possible functions might work.

You can remove the ads calling from

public static void reportkeycode(int position, float value

for checking.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-18
Cool - will try that so...

BTW - On another note - just seen you and Rusty Pixels mentioned in my Retro Gamer magazine, talking about the ZX Spectrum Next.

Mine will be the last batch to be delivered - cause I asked for all the upgrades.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
Then im should purchase it, hehe. its very late, but nice they finally begin to send out, and all 3 games is also on presale.

Im have updated the values in JOY, Gernot was just using the scancodes, but should really use the SDL code, but its would been do extractly same thing in the end anyway. The JOY commands was not working due using the old scancodes from before AS. Im today using the standard values used by Google, except the analoge sticks, but wanted to hold it under <255.

And eventuelly move it up to the KeyDown() function instead, where its should works.

Updated the dropbox, which now removed the link and using attachments directly (as its only 260kb), which im remove when a day pushed to steam (im waiting it a bit, which was a good idea).
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-18
hmm, hope it wont affect the nice default Keycode values for Gamepads / Controllers?  :O
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-18
not at all for the KEY() part, its was values for the JOY() commands that was wrong. you do still consider do a remap feature for your app. Gamepads is really threated as a keyboard on Android. Its mostly the right stick and the analoge triggeres that sometimes can been swapped around.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Hi SF

Still not working with your new values on my tablet

https://www.dropbox.com/s/2o0lnx8n72i0mop/app-release.apk?dl=0 (https://www.dropbox.com/s/2o0lnx8n72i0mop/app-release.apk?dl=0)

Does the app above work and show values for the tilt?
K: 0, 0

On my tablet the values remain at zero
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
better to get thh Android Studio project. then im can better checkout. (no, im dont need the glbasic part, only a cleaned Android Studio project).

Its works nicely here on Greedy Mouse testing using this code:

Code (glbasic) Select

LOCAL X%=(KEY(240)-KEY(241))*1000
LOCAL Y%=(KEY(242)-KEY(243))*1000


with those values in values/strings.xml

Code (glbasic) Select

    <string name="Analog_Keys">1</string>
    <string name="UseTilt">1</string>


Analog_Keys does not automatic enabled when UseTilt is used, a deadzone mightbeen used.

PS. The JOY code is still slightly wrong, but can first fix it on tomorrow or afternoon.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
Im have currectly a very sitty day, so im might not want to do anything more today.

This is not just techincal (A Moga joypad refused to work and there was no help to find due, thier homepage was now locked behind a forced account) issues, but also other none techincal issues as well.

Now im need to find a purchase a another android joypad that is NOT a Moga. Howover im do soon get a Android TV, so im should checking xbox and ps controllers works as intended.

PS. Im still have a OUYA controller, that works fine and have no shitty connection issues.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
while have a bit sitty day, im do just got joypad, ads and tilt to working a least on this device, while there was no change to the sdl code required at all. So its should works, a lease on devices that support accelerate sensors (has been since API3).

Its diddent crash, even used the OUYA controller (yes the MOGA newer worked again, but the OUYA is a great test controller).
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Okay -I am testing again - I didn't have the Analog keys setting to 1
Some things are lost in translation...

Also, you mentioned Android TV - If possible can any Android TV changes be separate to the Admob and current Android Controller code?

Just so that any changes wont affect or require roll-back if your Android TV testing runs into any problems...

It might be easier for users to keep up with the code changes/tweaks for Android if each new item was it's own separate code file - AndroidTV.java separate from Interstitial.java and so on...

Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Still no tilt for my Android 6 device - might be a problem with api 6.0 or could be a Nexus issue

Also - suddenly one of my apps for Android 10 getting bad reviews saying no graphics - might be the recent "assets" changes?

"There's no ship!"

I will see if I can test with Android 10 on emulator

If you can Android 10 or close...you  can try it
https://play.google.com/store/apps/details?id=com.GazzapperGames.retro.invaders.classicarcade (https://play.google.com/store/apps/details?id=com.GazzapperGames.retro.invaders.classicarcade)
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
This is strange, and im is not 100% sure why its happens yet. The graphics fails to load in first launch, but do works pretty fine when im load it second+ time when im launch it. Im can take a look if you give me the AS project as this is quite strange to fix that issue.

This is not a issue in your code, but as a workaround by now, Try to add DOESFILEEXIST() before any loading to force copy the media to the internal memory first or try to load it twice if first time failed (do that in a function).

This issue only happens on first launch or when im clear the data.

So im pretty sure the bad reviews is due they wrote allready after the first launch and diddent try to reload it agian. but should allways works even in cleared state of course.

PS. Not all devices might have accelerator, but have other forms for sensors. so here im do might nothing can do.

PPS. Im only saw one bad review.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
No worries, will try doesexists and loadsprite x 2

Hopefully :)

The reviews are not showing as live yet - they appear a day late or so on the actual listing but so far two x 1 stars for "no graphics"

I will email them to say I am looking into the issue ....

Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
still im not sure 100% why, so if you send me AS im will do a proper fix. Of course im dont public it at all. Im cant test this on Greedy Mouse, due that one works fine, even on first launch.

But im pretty sure DOESFILEEXIST() / loadsprite x 2 in a function should works as a fail safe for now.

Extractly this is a quite strange as graphics DOES load in second launch without issues.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
No worries - if fail I will send on the project

Also, where is the latest Admob.zip? the one with asset changes etc. Is it on the forum or elsewhere?
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
im edited your post. Its in the attachments in your first post, near the joypad picture (which im edited a bit too). Im just diddent think dropbox was needed for small files like this.

This issue is a little bit different issue throught as as im wrote, loads fine second+ time (this should not been happens as your code seens right). So its a quite strange why that happens.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
As I need to keep trying to fix it before more bad reviews land, I am attaching the SDLGLBASIC.java file I am using

I also added the SDLactivity just in case.

I suspect the problem lies there with the copy asset stuff etc.

This is quicker - I would have clean and put project in dropbox etc. but can still do that if you can't see the problem is those 2 files...



Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
im allways update the file in the other thread, but you can get it here:
https://www.dropbox.com/s/fj5v2xsmd730a61/Admob.zip?dl=0

Dont forget to replace the c++ file lib_glbasic.cpp. Its contains important fixes for SETCURRENTDIR(), used for Assets Loading and also been set in startup before glbasic code starts.

This version works here as intended with ads, gamepad (using KEY) and tilt working as least in Greedy Mouse (which also previous failed to load, due SETCURRENTDIR() diddent works correctly).
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Also logcat here
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
still im believe you diddent update lib_glbasic.cpp?

paths in assets loading seens very fine in logcat. but SETCURRENTDIR() might not have updated it for java.

This is what im can say without project.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
ok so - i will replace older files with newer ones and see if that solves the Android 10 issue...

Happens on my Emulator using Pixel 1 phone and Android 10

Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
oooh dear. there is a // in the file path for some reasons (tried to load Media//scoringyel.png that dont exists).

This is not good:

Code (glbasic) Select

2020-02-19 20:53:02.487 6488-6614/com.GazzapperGames.retro.invaders.classicarcade I/glbasic: Extracting asset file: /displred.png
2020-02-19 20:53:02.489 6488-6614/com.GazzapperGames.retro.invaders.classicarcade I/glbasic: CreateDir() path: /data/user/0/com.GazzapperGames.retro.invaders.classicarcade/files/Media/ File: displred.png
2020-02-19 20:53:02.490 6488-6614/com.GazzapperGames.retro.invaders.classicarcade I/glbasic: in File: Media//displred.png
2020-02-19 20:53:02.490 6488-6614/com.GazzapperGames.retro.invaders.classicarcade I/glbasic: outfile File: /data/user/0/com.GazzapperGames.retro.invaders.classicarcade/files/Media/displred.png
2020-02-19 20:53:02.490 6488-6614/com.GazzapperGames.retro.invaders.classicarcade I/glbasic: Copy Failed


The last line say the copy assets has been failed, which is often due wrong path? Me guess, did you used the new c++? Im thinking setPath to SDLGLbasic was not been set from c++, and then its could not find the current path and then its fails copy.

Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Using the new files you sent and the new .cpp I got the images & fonts to load fine...just no sound.

Doing another test to see if the sound is down to the double loadsound command.

I caught that displred thing earlier - it was trying to  load with a "/" prefix - from an old test I had tried when trying to solve path issues with loading last week.

I didn't spot that I still had it there.

Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-19
im by now used SDL sound, not sound pool. Im did do get sound here as well. Not sure its requrie full path or not. if its still a issue, im fix it. But not today.

yes its was the freaking SETCURRENTDIR() spat. the main issue. C++ and Java diddent follow each other.

Im still currious why its could load in second launched attempt. Dont forget to clear any data for testing.

This why im using LOGCAT when assets loading etc fails. Im thinks its quite important. Then LOGCAT do tells you.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Also, meant to ask before - was there a specific reason for
adding...
implementation 'androidx.appcompat:appcompat:1.1.0'

to the dependancies?
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-19
Sound NOT working on my Android 6.0 test device....
Even adverts sound is not playing...
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
I'm haven't touched sound at all. Don't forget to check, if volume is turned off (allways first thing to do).

of course: im cant touch anything sound with ads at all, if there is sound on those. not a change!

Also eventuelly checks LOGCAT if loads have been failed. You dont need to load it twice anymore. But DOESFILEEXIST() is allways good to use eventully if something fails.

Im not sure what androidx.appcompat:appcompat:1.1.0 actuelly does. Its leaved in by Android as default. Its property theme and widget based.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Not volume...

can you see if you have sound on this at all?

https://www.dropbox.com/s/aavcxqmng0791x7/app-release.apk?dl=0 (https://www.dropbox.com/s/aavcxqmng0791x7/app-release.apk?dl=0)

Is there anything in those new java or cpp files that could have affected sound or sound assets ?

Could it be an issue with
<string name="androidAudio">0</string>
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Should I revert back to older files for time being?
Some bad reviews are coming in and I need to fix quickly.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Have you uplaod this new version? Better with no sound than no graphics it it'd should happens.

Sound in greedy mouse also working for android 6 emu..
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
I'm can't install external apk files
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Hi

Here is the logcat from the apk running on Api 28 with no sound but sound from Ads.

Lines around 162 onwards looks like something...
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Load assets seems work for sound as they did not failed at all. So try to load them with full path.

I'm do still much more prefer a playable game with no sound. I'm is not home.

And don't do rate impressions on first launch. It's can been back fired. But after a few launch.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
I have a button to turn off/on the sounds on the menu - so users will expect sound.

But the sounds were playing fine before I used the new versions of the files - so must be something in them causing it?

If assets seem to load then why is sound not playing

By full path do you mean ?
GETCURRENTDIR$()+File$




Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Yes, eventuelt add a does file exists as well.

It's a very old issue really.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
When I said sound wasn't working - i didnt mean only for first launch...

Sound is not working at all after multiple launches...so its something new.

And I tried GETCurr and DOESEXiSTS already - neither work.

I assume sound is working for you?

New compile and now assets not loading once again...

Only thing right now is to switch back my files I think for now, until the cause is found.


Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Pm me the as project. I'm have no idea how you load the files as they are all working here. I'm cannot blind fix a issue I'm cannot reproduce here.

Also I'm is not home before around 2 hours.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
No worries - will do, thanks!
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
About a half hour now. Also later today I'm is out to play some pinball. It's long time ago last time....
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Im have just see a issue in as AndroidStudioMakeApp.exe might delete all assets file in the AS project without updating it again. That is not cool. That is fixed as im just uncommed the killtree, as its not needed at all and im perfer doing this kind of thing manual really. So make sure the assets files actuelly exists in the Android Studio project!

All needed is just recompile it from glbasic and they are back again.

try this version:
https://www.dropbox.com/s/rtygxze0xl1vt41/Admob.zip?dl=0

This version logs much more info as well fixed LOADSOUND as well (fullpath should no longer required, etc if its fails first time. then its try again with fullpath).

This version does a better filter on various cases as im missed some few cases. Now even the internal font should now loads again, which was called before the internal setcurrentdir()).

Now its should not matter you uses full path or not, nor DOESFILEEXISTS().
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Okay, just back at computer now - I will try this asap.
People are flagging my app as spam.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Did you change the controller values too??

App will crash when I use XBox controller - when before it was perfect.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
DONT USE JOY() commands. Here Im do cant testing it until im got my Android TV.  Property first next week!

Only changes was im slightly changed for analoge deadzone controls from 0.1 to 0.001, due tilt. but a Log.i im inserted to void reportkeycode() might have crashed it for spamming it too much? Remove that log in SDLGlbasic.java.

You should take the app off until it fixed, and then reenble it again when its fixed.

PS. Im accidently edited your post. sorry.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Okay - will try those to see if they resolve.

Unpublish app can have bad effect on store placement - only as a last resort.
Also, over 1000+ users will be getting the back version today, so I need to fix before they see it.

It's also 50minute compiling now - never took so long before.

Nothings, going right today :)
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
its too late. allways testing before doing it launch. currecly should have set it as a beta rather than official.

here its dont take that long time throught. about 3-4min for Greedy Mouse (which is quite big) and much less for the Break Bricker game (howover need do a new AS for that eventuelly for testing). Im also have a I7 CPU here.

You only would need to unpublish for a day or two, then republish the app again. people that do have it can still use it.

Howover im do long time unplushed all my games and property do complete new id for those when they are back again.

Now im is out for 5 hours or such. So im cant help you codewise until im home, if im is not tired......

Hopefully this one work, im tried all fail cases im could find for the assets loading. This is a blindfix, so hopefully works.

PS. Im also updated Android Studio to newest version without issues.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
just wondering if you have this on your android studio

14:00   Android Studio is using this JDK location:
         C:\Program Files\Android\Android Studio\jre
         which is different to what Gradle uses by default:
         c:\Program Files (x86)\Java\jdk1.8.0_151
         Using different locations may spawn multiple Gradle daemons if
         Gradle tasks are run from command line while using Android Studio.
         More info...
         Set Android Studio to use the same JDK as Gradle and sync project
         Do not show this warning again


rebuilding and cleaning now before trying again.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
I'm  don't have a jdk installed at all, but using that open source version  android studio has been installed by default. So I'm not seeing it. This could been the reason for the long compile time.

Grandle should use same path as as uses.

You should also not need to clean for a c++ update as well.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Okay - compiled and loading assets controller STILL broken change .0001 to .1 and removed logging.

What else was changed?
Was there a cpp change involed....?

Update: Just missed a admob show in the keydown code - removing now...hopefully that will fix controller issue
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Now I have absolutte no idea, except its that cradle issue and or you did not update as.

Checkout logcat what it's try to do.

There was c++ change to fix sound thing.

Now I'm out soon and is in bus.
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
If still issues you need to send the project. But not home in later today. I'm is out not. See you.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Its the remapjoyaxes was removed from SDLGlbasic.java that is causing the error, I think.

update: please ignore - thought missing - I located it...

Does yours work with Xbox okay?

A,B,X,y buttons okay not Dpad or Sticks - last week they worked perfectly before the new files.
I will check another app - to see if my Android Studio is causing it.
Title: Re: Tilt on Android
Post by: MrPlow on 2020-Feb-20
Words with Gamepad okay just not xbox now for some reason "sticks or dpad"
Title: Re: Tilt on Android
Post by: spacefractal on 2020-Feb-20
Again: im can first fix it when I'm get android TV, then I'm checking with both xbox and ps controllers. So im have no currectly focus with game controllers at all. Im have no devices recently to testing, only a OUYA controller, which uses totally none default values.

But if you do remapping/binnding feature to the game, any sticks etc should works again. This is very important anyway as YOU CANNOT relay on the defaults values anyway. Im will only garentee xbox, ps3/4 and Ouya would works out of box when im fix it using Android TV (as well of course the remote), when im also get the devices. Im orderd one recently, but its a bit delayed.

Those kind of devices have been some kind of heavy selling in Denmark recently, due a recently TV War between to companies (That include Apple TV).

Im is aware the JOY() is currectly broken, but use the KEY() instead. They should been uneffected.

Its much much much more perfered to im know the assets and the sound is working again, so im can push this verson to steam. Im have hold it back until im know its working as intended.

PS. Im have done a mini "review" how users can fix the game.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-20
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: MrPlow on 2020-Feb-21
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-21
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!
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: MrPlow on 2020-Feb-21
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.






Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-21
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.

Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-21
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-22
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-22
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: MrPlow on 2020-Feb-23
Thanks SF,
Increase just height of the hitbox for buttons then?
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-23
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-23
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.
Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: MrPlow on 2020-Feb-24
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?



Title: Re: Various Android Studio issues (tilt, assets, joy)
Post by: spacefractal on 2020-Feb-24
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.