Ren'Py Renpy Icon in Android

Honey hunters

Member
Jan 23, 2020
118
26
Hello everyone I'm new to Ren'Py Launcher , I completed my game i want to release my game but before that I face a small problem with " Icon " when I installed created app in my mobile for checking I just saw a " default Renpy Icon in my android mobile " I try too much changes in Options.rpy replaced windows icon it's work in pc launcher well then I installed in my mobile it's again showing default Renpy Icon , Soo please help me how to remove or Replace default Renpy Icon in my own custom icon , thank you I wish you will help me Screenshot_20200408-174722~2.png ....
 

9thCrux

--Waifu maker--
Game Developer
Oct 22, 2017
844
3,221
You can find the info here:


It comes down to having two png images named "android-icon_background" and "android-icon_foreground" both must be 432x432 pixels and resize the image in the android-icon_foreground.png so the icon you want to use is at the center of the image and covers about a third of the image canvas... like in a hash # use the center space for your icon; you may have to play with icon sizes until you find one that you like.
 

Honey hunters

Member
Jan 23, 2020
118
26
But I don't know where should I place this in Ren'Py ....? If you don't please help me where should I keep this foreground and background png ...?
 

9thCrux

--Waifu maker--
Game Developer
Oct 22, 2017
844
3,221
But I don't know where should I place this in Ren'Py ....? If you don't please help me where should I keep this foreground and background png ...?
Put them in your base folder; the one that has the "game" folder, and the "project.json" file.
Also include a splash screen:



Name it "android-presplash"
Put it in the same base folder.
That screen will be show while the game loads.
 

Honey hunters

Member
Jan 23, 2020
118
26
Put them in your base folder; the one that has the "game" folder, and the "project.json" file.
Also include a splash screen:



Name it "android-presplash"
Put it in the same base folder.
That screen will be show while the game loads.
Thank you I will try it ......now
 
  • Like
Reactions: 9thCrux

mrvision

WHO'S THE FATHER?
Game Developer
May 3, 2020
324
190
yes, that is a common problem... which phone are you using?
 

mrvision

WHO'S THE FATHER?
Game Developer
May 3, 2020
324
190
hello 9thCrux, I am having the same problem... I don't know if I am making a mistake with sizes or putting them in the wrong file... I was reading your conversation but I'm still stuck....
I have two images: android-icon_foreground.png and android-icon_background.png
Both with the size: 432x432
1. can be less size to solve the problem ?;
2. has it a maximum number of colors for the foreground image ?
does it need a special color surrounding all the square ?
3. what about the background...? just a normal grey/black color or need something special?
4. if both images are 432x432, how to make the foreground inside the background...????

And talking about the file location to place them (maybe this is the problem):
5. Should I have to place both in:
option a) renpy/gui (here I just have 3 files: game, log and project(JSON)...) put the together there...?
option b) renpy/gui/game (put them inside game folder)...?
option c) renpy/rapt/templates...? (Inside templates folder: I used this for the presplahs image and it works !!)
option d) renpy/rapt (inside rapt folder but outside templates)...?

option e) any of the above... in this case, plase help me to find the correct location, PLEASE !!

I'm already crazy, last 4 days trying to change that renpy logo... I think I already hate that renpy logo, please 9thCrux help me with this...! I will really appreciate your help !!!
Thank you so much!
I don't think it is because of the image size...
 

lawfullame

Active Member
Game Developer
Aug 6, 2019
669
986
I'm trying to follow this , but I still see the default icon.
I don't know what I'm doing wrong.

I have two PNG files in base directory:
android-icon_foreground.png
android-icon_background.png

Both 432x432 pixels. The directory is correct because android-presplash.jpg works.
 

Tacito

Forum Fanatic
Jul 15, 2017
5,339
42,958
I'm trying to follow this , but I still see the default icon.
Both 432x432 pixels. The directory is correct because android-presplash.jpg works.
Try with these two as example.
If they work you make some errors creating them.

folder.jpg
 
Last edited:
  • Like
Reactions: DAssman

lawfullame

Active Member
Game Developer
Aug 6, 2019
669
986
So it seems that the only way that works for me is to upload my image to , create icons and use the generated files directly in \ renpy-7.3.5-sdk \ rapt \ project \ app \ src \ main \ backu_orig_res \ res \

NOT in folder of my game
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
I have two PNG files in base directory:
Random guess... you're misunderstanding what the "base" directory is.

It's not the folder where all the game scripts, etc files go. It's the one above it.

So if you've got a structure that looks like:

D:\Dev\RenPy\MyBestProject\
D:\Dev\RenPy\MyBestProject\game\
D:\Dev\RenPy\MyBestProject\game\audio\
D:\Dev\RenPy\MyBestProject\game\gui\
etc...

the "base" folder would be D:\Dev\RenPy\MyBestProject\

I know 9thCrux already pointed this out and it might be that you're already putting them there. But it's the sort of simple mistake where everyone takes for granted the files are in the right place... and they aren't.

I'm probably wrong, especially since you said:
Both 432x432 pixels. The directory is correct because android-presplash.jpg works.
But sometimes it's the simple things that trip you up.

Again, I assume the example icons attached here work. But then I don't do anything with android - so I'm only trying to think of the sort of things that would cause me to spend 10 hours on a 2 minute problem.
 

lawfullame

Active Member
Game Developer
Aug 6, 2019
669
986
Random guess... you're misunderstanding what the "base" directory is.

It's not the folder where all the game scripts, etc files go. It's the one above it.

So if you've got a structure that looks like:

D:\Dev\RenPy\MyBestProject\
D:\Dev\RenPy\MyBestProject\game\
D:\Dev\RenPy\MyBestProject\game\audio\
D:\Dev\RenPy\MyBestProject\game\gui\
etc...

the "base" folder would be D:\Dev\RenPy\MyBestProject\

I know 9thCrux already pointed this out and it might be that you're already putting them there. But it's the sort of simple mistake where everyone takes for granted the files are in the right place... and they aren't.

I'm probably wrong, especially since you said:

But sometimes it's the simple things that trip you up.

Again, I assume the example icons attached here work. But then I don't do anything with android - so I'm only trying to think of the sort of things that would cause me to spend 10 hours on a 2 minute problem.
I chose the right directory. The problem is that the rules for icons have changed with versions of the Android API. And Ren'Py's documentation obout the android version is outdated.
I found a workaround, but it required changing the files directly in rapt.
 

Tacito

Forum Fanatic
Jul 15, 2017
5,339
42,958
So it seems that the only way that works for me is to upload my image to , create icons and use the generated files directly in \ renpy-7.3.5-sdk \ rapt \ project \ app \ src \ main \ backu_orig_res \ res \
I don't have any backu_orig_res in that folder
icon.jpg
 

lawfullame

Active Member
Game Developer
Aug 6, 2019
669
986
Oh, that's the path to my backup directory. The correct path is "\renpy-7.3.5-sdk\rapt\project\app\src\main\res"
 
  • Like
Reactions: SinCensuraX

SvenVlad

Well-Known Member
Modder
Aug 11, 2017
1,787
8,416
This topic came in a good time

I'm trying to make a android version of my game, but I keep getting this error

Code:
While running game code:
  File "game/android.rpy", line 483, in <module>
  File "game/android.rpy", line 269, in android_build
error: Couldn't open D:\User\Programs\renpy-7.1.3-sdk\rapt\project/app/src/main/res/mipmap-mdpi/icon_background.png
The images are there, so how do I fix it?

EDIT:

Kinda fixed it by moving to another drive and then reinstalling Ren'py and the Android SDK.

Then I had another error, a memory one, and this topic here fixed it for me
https://f95zone.to/threads/build-android-version-renpy-failed.31521/page-2

I even found the dev of General Practitioner on Ren'Py's forums while looking for help
 
Last edited:

IbizaCherry

New Member
Sep 15, 2021
4
0
It comes down to having two png images named "android-icon_background" and "android-icon_foreground" both must be 432x432 pixels and resize the image in the android-icon_foreground.png so the icon you want to use is at the center of the image and covers about a third of the image canvas... like in a hash # use the center space for your icon; you may have to play with icon sizes until you find one that you like.
That worked for me, thanks!
One thing I did different was resizing the image on "android-icon_background" instead of "android-icon_foreground".

Without this method, at 432x432 pixels the icon gets cropped off around the sides. After some testing the size I used is 288x288 pixels. It looks like the entire image is used as the icon. Tested on Android 7 &10