Various Android Studio issues (tilt, assets, joy)

Previous topic - Next topic

spacefractal

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).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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

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

MrPlow

#17
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
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#18
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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

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

spacefractal

#20
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

#22
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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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



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

spacefractal

#24
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).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

Also logcat here
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

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

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

spacefractal

#28
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.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

#29
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.

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