Jibble

Author Topic: Let's build for Android!  (Read 6277 times)

Re: Let's build for Android!
« Reply #20 on: 09 Apr 2019, 14:28 »

Re: Let's build for Android!
« Reply #21 on: 09 Apr 2019, 16:57 »
Thanks a lot, @eriOo. Nice job!!!

Re: Let's build for Android!
« Reply #22 on: 26 Oct 2019, 18:22 »
This post and the Android Studio project was very helpful! I got my game up and running on Android without a lot of effort.

However, I keep getting an error about the midi driver. My game config has midi disabled, and the Android.cfg has it set to Enabled = false. I’m not sure what I’m doing wrong here?

Anyone have any ideas?

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Let's build for Android!
« Reply #23 on: 26 Oct 2019, 18:24 »
However, I keep getting an error about the midi driver. My game config has midi disabled, and the Android.cfg has it set to Enabled = false. I’m not sure what I’m doing wrong here?

Normally if you disable MIDI it should not try to initialize.

Could you post config file and what is the error message?

Oh, and what version of engine/AGS are you using?

Re: Let's build for Android!
« Reply #24 on: 26 Oct 2019, 21:41 »
However, I keep getting an error about the midi driver. My game config has midi disabled, and the Android.cfg has it set to Enabled = false. I’m not sure what I’m doing wrong here?

Normally if you disable MIDI it should not try to initialize.

Could you post config file and what is the error message?

Oh, and what version of engine/AGS are you using?

The error I get is:
Warning: cannot enable MIDI audio.
Problem: No compatible drivers found in the system.

I'm using AGS 3.5.0.18 (RC2) and I used the Android engine labeled 3.5.0.18 from https://cirrus-ci.com/github/adventuregamestudio/ags

My acsetup.cfg file:
Code: Adventure Game Studio
  1. [misc]
  2. game_width=320
  3. game_height=200
  4. gamecolordepth=32
  5. antialias=0
  6. notruecolor=0
  7. cachemax=131072
  8. user_data_dir=
  9. shared_data_dir=
  10. titletext=Rogue by Rob Colton
  11. [graphics]
  12. driver=D3D9
  13. windowed=1
  14. screen_def=scaling
  15. game_scale_fs=proportional
  16. game_scale_win=max_round
  17. filter=stdscale
  18. vsync=0
  19. render_at_screenres=0
  20. [sound]
  21. digiid=-1
  22. midiid=0
  23. usespeech=1
  24. [language]
  25. translation=
  26. [mouse]
  27. auto_lock=0
  28. speed=1
  29.  

My android.cfg file:
Code: Adventure Game Studio
  1. [misc]
  2. config_enabled = 1
  3. rotation = 2
  4. translation = default
  5. [controls]
  6. mouse_method = 0
  7. mouse_longclick = 0
  8. [compatibility]
  9. clear_cache_on_room_change = 0
  10. [sound]
  11. samplerate = 44100
  12. enabled = 1
  13. threaded = 1
  14. cache_size = 10
  15. [midi]
  16. enabled = 0
  17. preload_patches = 0
  18. [video]
  19. framedrop = 0
  20. [graphics]
  21. renderer = 0
  22. smoothing = 0
  23. scaling = 1
  24. super_sampling = 0
  25. smooth_sprites = 0
  26. [debug]
  27. show_fps = 0
  28. logging = 0
  29.  

Re: Let's build for Android!
« Reply #25 on: 31 Oct 2019, 05:11 »
Tried it with the RC3 files in the release forum, and I'm still getting the MIDI driver error. I have it disabled in both cfg files, so I'm not sure what else to do to suppress it.

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Let's build for Android!
« Reply #26 on: 31 Oct 2019, 08:59 »
Are you using launcher APK or created APK exclusively with your game? I am not sure how it works with the latter (where it gets config from).

Re: Let's build for Android!
« Reply #27 on: 31 Oct 2019, 11:36 »
If someone stumbles on this thread even more updated instructions are here: https://github.com/ericoporto/teafortwo

Other than this I can't help without seeing code. The files looks correct but my guess is you are not placing it in the correct directory.

An even more more updated Android Studio project is in the works.
« Last Edit: 31 Oct 2019, 11:47 by eri0o »

Re: Let's build for Android!
« Reply #28 on: 31 Oct 2019, 15:35 »
Are you using launcher APK or created APK exclusively with your game? I am not sure how it works with the latter (where it gets config from).

I'm building an APK specifically for my game. It works and launches the game, which plays fine after I dismiss the MIDI driver error.

The config files are in the src/main/assets folder with the obb file.

I'll go over eri0o's updated instructions and make sure I'm not missing anything.

Re: Let's build for Android!
« Reply #29 on: 31 Oct 2019, 16:13 »
I got it to work!

The trick was I had to put both the android.cfg and acsetup.cfg files into the obb along with the ags file. Once I did that, no more MIDI error.

Thanks for putting together your instructions. They were invaluable in getting this working.

(That just leaves iOS to get up and running...)
« Last Edit: 31 Oct 2019, 16:15 by robcolton »