GameMaker Studio 2 (GMS2): How to Create Nicer Mobile Icons on Windows 10

  1. Download Android Studio.
  2. Create a trash empty Android project and note where it is stored on your computer.
    1. You NEED to do this or else the option for Image Asset Studio will not show up.
  3. Create your icon using Image Asset Studio and save.
    1. https://developer.android.com/studio/write/image-asset-studio
    2. Unfortunately, it doesn’t look like GMS2 supports the background color option nor the round icon options. There doesn’t seem to be a good plug for the generated xml file in GMS2’s .yy file for the Android options. Eventually, I will get to how to get around the background color problem in this post; however, unfortunately, I don’t know if there’s a workaround to the round icons.
  4. Close Android Studio and navigate to your Android project folder and look for that res folder with all your .png files.
    1. Right now, the path is \app\src\main\res.
    2. You could just search .png.
  5. Open GMS2 and go to your Android Game Options.
    1. Right now, I find it in the Quick Access Panel in the Asset Browser.
      1. STRANGELY, this is different than the “Game Options” available from the three bars in the top right of the Asset Browser, so be sure to use the correct one.
  1. In the Adaptive Icons’ section, generate some “trash” icons.
    1. If you would like a background color, this is where you can generate it.
      1. Open up Paint (or whatever image creation program you have that makes a .png) and create a image of the background color you want.
        1. The size of this color “swatch” doesn’t matter, as long as it fills the whole image (i.e. use the bucket tool).
      2. Use this swatch as your background source image when generating your “trash” adaptive icons.
    2. https://docs2.yoyogames.com/source/_build/2_interface/3_settings/game_options/options_android.html.
  2. Open your GMS2 project folder and navigate to the Android options.
    1. Right now, they are at \options\android.
  3. In GMS2, there are three folders for your Android icons:
    1. icons
      1. Non-adaptive icons required for devices that don’t support Adaptive Icons (i.e. older than Android Oreo = 8.0 = API level 26).
    2. icons_adaptive
      1. FOREGROUND images for adaptive icons.
    3. icons_adaptivebg
      1. BACKGROUND images for adaptive icons.
      2. If you generated from a color swatch, you can see the result here.
  4. Now, you need to go around REPLACING all the images in GMS2 with all the respective images in the trash Android project.
    1. Images can be matched by hovering over the image and checking the image’s pixel-by-pixel size.
    2. Make sure you keep the naming scheme of GMS2.
    3. Right now,  here are some example mappings from Android to GMS2.
      1. mipmap-hdpi\ic_launcher.png ==> icons\hdpi.png
      2. mipmap-hdpi\ic_launcher_foreground.png ==> icons_adaptive\hdpi.png
    4. You will notice that the Android Studio Image Asset Studio does NOT produce the ldpi size.
      1. To generate an ldpi size, make a copy of your xxxhdpi image and resize it in Photos (or your image editing program) to the ldpi size.
        1. https://www.groovypost.com/howto/use-windows-10-photos-app-to-resize-images/
      2. To determine the ldpi size, just look at the size of the GMS2 generated file.
      3.  Now for EACH of the THREE GMS2 icons folders, you can xxxhdpi-copy, resize, replace the GMS2-generated ldpi.
    5. You MAY not want to use the Android Image Asset Studio generated images for the lower resolution non-adaptive icons, because your final centered image might be too small.
      1. In this case, just choose whatever image you would have used as the adaptive foreground or whatever new image you want and resize it appropriately.
      2. If you don’t want a flat square icon, make sure you use transparency for the unused part of your icon canvas.
  5. RELOAD GMS2 and you can preview the new icons in the Android Game Options Adaptive Icons section.
    1. Do NOT click “Generate”. Otherwise, all your hard work in replacing all your images will be overwritten.
  6. Compile and test!
    1. Close your Image editor, Android project folder, and GMS2 project folders so you don’t run into file-access conflicts (i.e. errors) during compilation.
    2. Test in emulator before Android Oreo for testing non-adaptive icons.
    3. Test in emulator at or after Android Oreo for testing adaptive icons.
    4. Test on a REAL DEVICE if you have the chance!