Let's build for Android!

Started by eri0o, Mon 08/01/2018 00:35:15

Previous topic - Next topic

Amir

QuoteBut the game looks awful. It wont rotate it stays vertical on the device, so small and pixelated and it runs very slow

@eri0o
I read u can set it to full screen mode and let it rotate, it seems to be due to Android Studio. But can u tell me how I can show that device or the preview mode? I cann't find it.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

#81
Just for checking, are you sure you are using the release builds of the Android libraries? The debug version will run reaaaally slow, it's not meant to be used unless you have a need for debugging AGS Native code and for some reason you are not able to build the C++ libraries yourself.

Other than this, make sure you are using a hardware accelerated renderer and about rotation, make sure you are setting the desired rotation. These are set in the android.cfg file.

Code: ags
[misc]
rotation = 0 // user can rotate
rotation = 1 // portrait
rotation = 2 // landscape


Code: ags
[graphics]
renderer = 0 // software renderer
renderer = 1 // hardware, render to screen
renderer = 2 // hardware, render to texture


These settings are the same since jjsat first wrote this config file in 2012 because the Android Player was made to keep the same settings menu. In the future the idea is to ditch this and instead use acsetup.cfg only, but this changes a lot the Settings menu and requires touch to be a thing accross all systems (which IS, but it's not configurable yet)

QuoteBut can u tell me how I can show that device or the preview mode?

I don't understand, what do you mean? In the emulator?

Spoiler
[close]

You need to go into the AVD (Android Virtual Device) manager and create an emulator for the device you want.

Spoiler
[close]

From there on just the config the phone as you want and hit next to the end.

Spoiler
[close]

Once this is done, just click play in the device you just created in the AVD manager



from there on, the ADB running on Android Studio will pickup and show it as a device available for you to run your stuff. more details here...


About sound not working I don't know, in the past there was a sound cache config in the Android and iOS devices but these are no longer used internally by the engine, but I don't think they would explain sound failing in your case...

Amir

QuoteYou need to go into the AVD (Android Virtual Device) manager and create an emulator for the device you want.

Thank u. but it doesn't matter, I will use my device becoz I enabled VT-x in my BIOS then I got the error: the emulator process for avd has terminated and I tried all solution and it dosn't work, Android Studio is full of bugs. so wherever.

Quoteyou sure you are using the release builds of the Android libraries?
Do u mean this folder: AGS-3.6.0.8-android-libs-release. Yes I am sure.
But I read some solutions to fix that. I will try them later.

rotation = 1 is already there. that means I just have to add rotation = 0 // user can rotate , right?
and add all of renderer 0, 1 and 2.

smoothing and smooth_sprites were = 0 I set them to 1 and now it's clean and no longer pixelated  :-D

But there is a big problem. The English translation doesn't work 8-0 when I change to English, only the English graphics appear but the texts are in German (default) the file English.tra doesn't appear to be recognized.

Sounds are still not complete.

Here is my android.cfg. maybe I can still change something and solve some problems?
Spoiler
Code: ags

[misc]
config_enabled = 1
rotation = 1
translation = default
[controls]
mouse_method = 0
mouse_longclick = 0
[compatibility]
clear_cache_on_room_change = 0
[sound]
samplerate = 44100
enabled = 1
threaded = 0
cache_size = 10
[midi]
enabled = 0
preload_patches = 0
[video]
framedrop = 0
[graphics]
renderer = 0
smoothing = 1
scaling = 1
super_sampling = 0
smooth_sprites = 1
[debug]
show_fps = 0
logging = 0

[close]

translation = default I shouldn't change it to English, right?

And in acsetup.cfg [language]translation= . = nothing?  (wtf) Is that normal?

(I haven't tried AGS 3.6.0 yet and haven't moved and renamed yet)
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

#83
The list of properties I gave was just to explain what each value was, you should only set one value per property in the android.cfg file.

About translation, I don't really know how translation works, would need to check what files the engine looks for.

Edit: internally engine uses the AssetManager for translation so it should work, but my guess is the value you want is English and not default - not sure, maybe there's somewhere where default gets switched to English but I could not find it looking in the source code. :/

Amir

Ok, thank u. I'll try to find it out too.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

#85
Quote from: eri0o on Fri 17/09/2021 19:21:42
Edit: internally engine uses the AssetManager for translation so it should work, but my guess is the value you want is English and not default - not sure, maybe there's somewhere where default gets switched to English but I could not find it looking in the source code. :/

"default" value in config is not interpreted as real default, but as "Default.tra", which probably does not exist. To use default language you should leave the config option empty.

PS. I still suggest to test with the windows version first to see if there are any logical bugs in the new version, as it is more reliable and easier to test.
PPS. by that I mean not necessarily convert the project to 3.6.0, but use its acwin.exe + sdl2.dll to run your compiled game and see how it behaves.

Amir

Thanks for the explanation.

I saw your edit too late. But I copied the project and converted the copied project to 3.6.0. It runs well except for the sounds. it happened like it happenes on the device through Android Studio. Incomplete, you hear 80 percent of the sound. But I noticed that only the sounds that are in the script are not complete aDoor.Play();
The frame sounds dont cause any problems, they are complete.

I tried the files from Data folder from 3.6.0 in Android Studio, hoping something will be corrected, but there is no difference. The .tra file is not read and the game runs very slow including the sounds.

I started working on a new short game. Which version is the safest and can you recommend me? AGS 3.5.1 - Patch 3? Do the sounds work well there?  :)
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

Quote from: Amir on Sat 18/09/2021 14:59:08It runs well except for the sounds. it happened like it happenes on the device through Android Studio. Incomplete, you hear 80 percent of the sound. But I noticed that only the sounds that are in the script are not complete aDoor.Play();
The frame sounds dont cause any problems, they are complete.

I'd really like to document this properly, because we will have to fix this eventually. Could you send us an example sound that does not play?

Quote from: Amir on Sat 18/09/2021 14:59:08
I tried the files from Data folder from 3.6.0 in Android Studio, hoping something will be corrected, but there is no difference. The .tra file is not read and the game runs very slow including the sounds.

Do translations work in windows version?
I cannot talk about perfomance, because haven't tried the new android port alot yet. Can you tell your game resolution? Also, what happens if you run your game with older Android launcher from 3.4 or 3.5 releases (e.g. you may try using one linked to the 3.5.1 release if you've got time to test that).

Quote from: Amir on Sat 18/09/2021 14:59:08
I started working on a new short game. Which version is the safest and can you recommend me? AGS 3.5.1 - Patch 3? Do the sounds work well there?  :)

3.5.1 should be the safest of course.

Amir

#88
QuoteI'd really like to document this properly, because we will have to fix this eventually. Could you send us an example sound that does not play?

With pleasure. send an mp3 file? I only used mp3. Or should I record a video and show what it sounds like?

QuoteDo translations work in windows version?
I cannot talk about perfomance, because haven't tried the new android port alot yet. Can you tell your game resolution? Also, what happens if you run your game with older Android launcher from 3.4 or 3.5 releases (e.g. you may try using one linked to the 3.5.1 release if you've got time to test that).

resolution 1024 x 768.

Yes, translations work in windows version with AGS 3.4... and 3.5.1. it's up to Android Studio, I think a code has to be written somewhere for the translation to work.
I just tried the 3.5.1 version. Everything is going great. The sounds are all complete.

Quote3.5.1 should be the safest of course.

Thank u.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

Quote from: Amir on Sat 18/09/2021 16:32:29
QuoteI'd really like to document this properly, because we will have to fix this eventually. Could you send us an example sound that does not play?

With pleasure. send an mp3 file? I only used mp3. Or should I record a video and show what it sounds like?

Yes, I need the exact file, because I need to observe how it is processed by the engine.

Quote from: Amir on Sat 18/09/2021 16:32:29
Yes, translations work in windows version with AGS 3.4... and 3.5.1. it's up to Android Studio, I think a code has to be written somewhere for the translation to work.

I must clarify, what about 3.6.0 windows version? Because at this point we need to know if the problem is in 3.6.0 engine in general, or Android port only.

Amir

#90
Ah ok.

Edit: I sent a PM.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

In regards to the sound cutting, eri0o has opened a bug report for the sound library we are using, so it's up to them now, unless we find the mistake ourselves earlier...

Amir

Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

eri0o

If you can, replace all audio for .ogg, since I can't say how long it will take for the mp3 library be fixed, test before, but the problem doesn't seem to manifest with .ogg audio.

Amir

I'm trying to get the translation done first, that is much more important, then I’ll test .ogg
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

So, do translations work on 3.6.0 desktop versions? We need a clarification that this is purely Android problem, or general 3.6.0 problem.

eri0o, I heard you have Amir's game project, does it work if you run on Windows/Linux?

Amir

Quote from: Crimson Wizard on Wed 22/09/2021 13:12:54
So, do translations work on 3.6.0 desktop versions? We need a clarification that this is purely Android problem, or general 3.6.0 problem.

eri0o, I heard you have Amir's game project, does it work if you run on Windows/Linux?

To be sure, I just tested again. Yes it's purely Android problem. Translations work on 3.6.0.9-Alpha10 desktop version.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

Quote from: Amir on Wed 22/09/2021 13:52:19
To be sure, I just tested again. Yes it's purely Android problem. Translations work on 3.6.0.9-Alpha10 desktop version.

This is interesting, does your game have any other separate files, like audio.vox and/or speech.vox, and do they seem to work fine on Android?

I think for best testing we need to use a simpliest dummy game that changes between translations and displays text, that way we ensure that no scripting or other factors interfere.

Amir

QuoteThis is interesting, does your game have any other separate files, like audio.vox and/or speech.vox, and do they seem to work fine on Android?

No, I don't have any separate files. Sorry I cann't test that.


Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

Quote from: Amir on Fri 24/09/2021 16:04:23
No, I don't have any separate files. Sorry I cann't test that.

So basically, we would need a game which has extra files outside of the main game package, like tra, vox, or even custom files to open using script commands. Then test if opening these files works.
TBH I got an impression it should work, but haven't tried myself yet.

SMF spam blocked by CleanTalk