First Phone App Ever - Just Need Help Starting

Discussion in 'GameMaker Studio 2 Community Tech Support' started by GOD-sSs-END, Sep 5, 2019.

  1. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Hello, all:

    I've played around a lot with building little games for PC, but I've never built an app for a phone. I understand that the most popular resolution is 1920 by 1080, but I want my app to be vertical. So, do I set the room resolution for 1080 x 1920?

    Also, my graphics are smaller than this resolution. About half the size, actually. Basically, I'm asking how to set up. Once I know the best room size, I'll be good to go.

    But any other tips would be helpful.

    Thank you.
     
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    In general, for phone apps I use a resolution of 960x540 (or 540x960) then expand or contract the width/height to fit any resolution that is outside of this. You can find a good tech-blog that deals with this subject here: https://www.yoyogames.com/blog/66/the-basics-of-scaling-the-game-view It's also worth checking out the previous blog in that series too, as it deals with the GUI layer.
     
    GOD-sSs-END likes this.
  3. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    You know, I think I may have unnecessarily opened a can of worms. Maybe you can guide me here. But I downloaded the Android Studio and am in the process of sorting out my SDK, NDK and JAVA requirements. I was hoping that all I had to do was build the app in basic GameMaker in a specific resolution (like what you recommend above) and just export to Android.

    Is this not the case, or do I really need all this stuff?

    Great link, by the way. That will come in handy.
     
    Last edited: Sep 6, 2019
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    By "stuff" do you mean the NDK, JDK and Android SDKs? If so then very definitely! GMS2 requires those components to actually build your app for Android and without them it would be impossible to actually create the APK or AAB that is required. The setup isn't too difficult, just time consuming, and all you need from Android Studio is the SDK 28, NDK and Support Library, and the Jave JDK you can download from the Oracle website (the setup doc on the helpdesk should have a link). Once you've installed them you never need to touch Android Studio again.
     
  5. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Thank you so much for your time, brother. I just finished installing the JDK and am going to set up my paths now. You've been a great help.

    I had already started my project in GameMaker Studio with a resolution of 1080x1920, thinking that this would give me a vertical layout for my app. Do I have to start over in Android Studio?

    I've gone back into GameMaker per the instructions, so I'm sorting it out now -- the paths.
     
  6. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    Nope! Like I say, Android Studio is simply to get the build tools to make your app. Everything else is done in GMS2, so you literally just install the required things and then forget all about Android Studio! You can use any size you want in GMS2 and it will make no difference to the way the game is built.
     
  7. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Sorry, that's a stupid question. Give me some time, and I'll get back to you if I need any additional help.

    You've been GREAT!!!
     
  8. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    Lol! No such thing as a stupid question when it's been asked with an interest in actual understanding! ;)

    Happy to help!
     
  9. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Awesome!!!

    Thanks again, bud. . . You rock!
     
  10. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    One more thing:

    I've got everything setup, apparently. My phone is good to go. All I'm missing is Arm64??? It's asking me to add it.

    Oops! I found the solution. I just had to click on the Architecture under "Architecture" --> Game Options --> Android.

    I then tried to run what I have and got nothing. I opened my phone and tried again, and the Compiler Errors tab said GMS2 was downloading something, and when done, it spit out "Error: Build Failed.

    Any ideas?

    Here's the Output log:

    X://bin/GMAssetCompiler.exe DONE (0)
    Release build
    PlatformOptions
    Options: Z:/Enigma_GOD_7A114F79_643439FD\PlatformOptions.json
    Options: Z:/Enigma_GOD_7A114F79_643439FD\MainOptions.json
    displayname
    hostname
    runtime
    OptionsIni
    PlatformOptions
    X://bin/GMAssetCompiler.exe /c /zpex /mv=1 /iv=0 /rv=0 /bv=0 /j=8 /gn="Enigma_GODHAC 001" /td="Y:/" /cd="Z:/Enigma_GOD_7A114F79_643439FD" /zpuf="C:\Users\User\AppData\Roaming/GameMakerStudio2\davidallenfarrell_1968336" /m=llvm-android /tgt=8 /llvmSource="X://yyc/" /nodnd /cfg="default" /fU="Z:/Enigma_GOD_7A114F79_643439FD\functionsUsed.txt" /o="Y:/Enigma_GODHAC_001_2EA445CF_YYC" /optionsini="Y:/Enigma_GODHAC_001_2EA445CF_YYC\options.ini" /baseproject="X:/BaseProject\BaseProject.yyp" "D:\my Games\Hell Let Loose\Apps\Enigma_GODHAC 001\Enigma_GODHAC 001.yyp" /arch=18 /bt=exe /rt=yyc
    Reading project file....D:\my Games\Hell Let Loose\Apps\Enigma_GODHAC 001
    Reading project file....X:\BaseProject
    Reading config delta 'D:\my Games\Hell Let Loose\Apps\Enigma_GODHAC 001\options\main\inherited\options_main.inherited.yy'
    finished.
    Compile Constants...finished.
    Remove DnD...finished.
    Compile Scripts...finished.
    Compile Objects...finished.
    Compile Timelines...finished.
    Compile Triggers...finished.
    Compile Rooms...finished.
    Compile Extensions...finished.
    Global scripts...finished.
    finished.
    collapsing enums.
    Final Compile...finished.
    Writing Chunk... GEN8
    option_game_speed=60
    Writing Chunk... OPTN
    Writing Chunk... LANG
    Writing Chunk... EXTN
    Writing Chunk... SOND
    Writing Chunk... AGRP
    Writing Chunk... SPRT
    Writing Chunk... BGND
    Writing Chunk... PATH
    Writing Chunk... SCPT
    Writing Chunk... GLOB
    Writing Chunk... SHDR
    Writing Chunk... FONT
    Writing Chunk... TMLN
    Writing Chunk... OBJT
    Writing Chunk... ROOM
    Writing Chunk... DAFL
    Writing Chunk... EMBI
    Writing Chunk... TPAGE
    Texture Group - Default
    Writing Chunk... TGIN
    Writing Chunk... STRG
    Writing Chunk... TXTR
    0 Compressing texture... writing texture texture_0.png...
    1 Compressing texture... writing texture texture_1.png...
    Writing Chunk... AUDO
    ClangExeLocation=C:\Android NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe
    Using NDKDir = C:\Android NDK
    Using PlatformDir = C:\Android NDK\platforms\android-29
    Using ARMToolChain = C:\Android NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64
    Using ARM64ToolChain = C:\Android NDK\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64
    saving file Y:/Enigma_GODHAC_001_2EA445CF_YYC\Enigma_GODHAC 001.droid
    'C:\Android' is not recognized as an internal or external command,
    operable program or batch file.
    Stats : GMA : Elapsed=733.5165
    Stats : GMA : sp=26,au=0,bk=0,pt=0,sc=0,sh=0,fo=0,tl=0,ob=14,ro=1,da=0,ex=0,ma=16,fm=0x200000000000
    X://bin/GMAssetCompiler.exe exited with non-zero status (1)
    elapsed time 00:00:02.3131564s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.3.344/bin/Igor.exe" -j=8 -options="C:\Users\User\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Android Run started at 09/06/2019 14:23:58
    "cmd" /c subst Z: /d
    elapsed time 00:00:00.0370264s for command "cmd" /c subst Z: /d started at 09/06/2019 14:24:00
    "cmd" /c subst Y: /d
    elapsed time 00:00:00.0370420s for command "cmd" /c subst Y: /d started at 09/06/2019 14:24:01
    "cmd" /c subst X: /d
    elapsed time 00:00:00.0360355s for command "cmd" /c subst X: /d started at 09/06/2019 14:24:01
    FAILED: Run Program Complete

    I see this part:

    'C:\Android' is not recognized as an internal or external command,
    operable program or batch file.

    But "C:/Android" was suggested (if it's actually a problem and not an expected error note).
     
    Last edited by a moderator: Sep 6, 2019
  11. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    What are your paths in the GMS2 Prefs?
     
  12. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    All three are showing "Found":

    C:\Users\User\AppData\Local\Android\Sdk
    C:\Android NDK
    C:\Program Files (x86)\Java\jdk1.8.0_202
     
  13. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    I suspect it's the space in the NDK patrh that may be the issue. You might want to make that "Android_NDK" or something instead.
     
  14. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Things were definitely different. Here's the output:

    FAILURE: Build failed with an exception.
    * What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:
    -----------------------
    Error occurred during initialization of VM
    Could not reserve enough space for 2621440KB object heap
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    C:\WINDOWS\system32\cmd.exe exited with non-zero status (1)

    |||||||||||||||||||||||||||||||||||||||||||||| NOTE

    I did notice this warning earlier on:

    ---
    Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 14 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16.
    ---

    I'm not sure if they're connected. The FAILURE notice above is probably more useful.

    By the way, I really appreciate this. . .
     
  15. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    I'm sorry, the above is from YYC. The previous was from VM.

    I ran as VM again, and I got the same result as my first output post. The path change didn't fix things.

    Will I still be able to export to Android???

    I can test everything in GMS2 as I would a regular game, and then export, upload to Google Play, and download for test.

    It's ugly, but what else am I going to do?
     
  16. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    What are the settings in your Game Options?
     
  17. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    What should I be looking at, exactly?

    By the way, I changed my keystore. I guess there was an old bug that had to do with different passwords under common and alias. They need to be the same. Also, I had hyphens in my alias, so I took those out as well.

    But, yes. What do you want me to look at?
     
  18. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,865
    Just a screenshot of the General Game Options would be fine... Just want to see what your SDK settings are more than anything else....
     
  19. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Here's the pic. I'm also installing a few more APIs, as I'm using a Pixel XL. I'm not sure what API fits this or if I have to install anything more, but I'm trying in the meantime.

    Capture_GMS2 Support - Android 001.PNG
     
  20. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    I'm sorry, SDKs.

    I've got APIs on the brain.
     
  21. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    I've tried a bunch of things since, but nothing seems to be working. Here is another snippet. Any info I can give you, just ask. I need to get this straightened out. The heap size is 2, by the way. And I do get that seemingly classic error about heap size being too small. And when I increase it, I get the error for it being too big. But I don't know if that's the whole of my issue or what. I'm at a loss and exhausted. WHY CAN'T THIS JUST WORK!

    lol. . .

    Capture_GMS2 Support - Android 002_platform.PNG
     
  22. GOD-sSs-END

    GOD-sSs-END Member

    Joined:
    Mar 16, 2019
    Posts:
    72
    Okay, I may have fixed this thing. Not sure. But I just tried to preview my project again, and I'm stuck on:

    Preparing "Install Android Support Repository"

    It's not in the SDK manager, under tools as the most recent (2 months ago) documentation form GameMaker Studio 2 shows. So, how do I get this and where to I put it?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice