compacting apk on renpy[SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
beastcarving
Regular
Posts: 122
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

compacting apk on renpy[SOLVED]

#1 Post by beastcarving » Mon Jun 22, 2020 6:40 am

Every time I build my APK it turns out to be 137mb and I only have about a 5 minute long test game on it. How do I get it down to maybe under 50mb at least or at least 70mb?
Last edited by beastcarving on Tue Jun 23, 2020 8:12 pm, edited 1 time in total.
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

User avatar
Remix
Eileen-Class Veteran
Posts: 1455
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: compacting apk on renpy[HELP]

#2 Post by Remix » Mon Jun 22, 2020 7:19 am

It has to include the Ren'Py codebase, Python, graphics and sound apis along with numerous other pieces of code. It needs those so it can run.

If you want to know the minimum filesize, maybe try creating an apk for a blank new project with just one line and no images. I seem to recall even that is over 110mb.
Frameworks & Scriptlets:

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3000
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: compacting apk on renpy[HELP]

#3 Post by Imperf3kt » Mon Jun 22, 2020 4:21 pm

Remix wrote:
Mon Jun 22, 2020 7:19 am
It has to include the Ren'Py codebase, Python, graphics and sound apis along with numerous other pieces of code. It needs those so it can run.

If you want to know the minimum filesize, maybe try creating an apk for a blank new project with just one line and no images. I seem to recall even that is over 110mb.
Nah, the minimum APK size I can get to is about 14MB.
If you want a smaller game, consider compressing your images, optimising your filesizes and use video sparingly.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

User avatar
Remix
Eileen-Class Veteran
Posts: 1455
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: compacting apk on renpy[HELP]

#4 Post by Remix » Mon Jun 22, 2020 5:54 pm

Imperf3kt wrote:
Mon Jun 22, 2020 4:21 pm
Nah, the minimum APK size I can get to is about 14MB.
Dang, I was sure it was much larger... Probably should have tested before writing, oops
Frameworks & Scriptlets:

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3000
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: compacting apk on renpy[HELP]

#5 Post by Imperf3kt » Mon Jun 22, 2020 9:57 pm

Remix wrote:
Mon Jun 22, 2020 5:54 pm
Imperf3kt wrote:
Mon Jun 22, 2020 4:21 pm
Nah, the minimum APK size I can get to is about 14MB.
Dang, I was sure it was much larger... Probably should have tested before writing, oops
It used to be before the switch to Gradle.

Note that's the APK size I'm talking about, not the expanded install size, that's closer to 60MB
https://i.imgur.com/yRE9CCH.png
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

User avatar
beastcarving
Regular
Posts: 122
Joined: Mon May 13, 2019 5:03 pm
Completed: Pulse Cage https://beastcarving.itch.io/pulse-cage-the-full-series
Projects: Your Brother's Religion
Organization: BeastCarving Studio
IRC Nick: BeastCarving
Tumblr: beastcarving
Deviantart: beastcarving
Github: beastcarving
itch: beastcarving
Contact:

Re: compacting apk on renpy[HELP]

#6 Post by beastcarving » Tue Jun 23, 2020 8:12 pm

Compressing images did work. I got it down to 75mb with out changing the image quality. That's about as low as I could get it.
Image Pulse Cage (full game)Image Your Brother's Religion (Demo)
PLAY HERE: https://beastcarving.itch.io/
Love my work: https://www.patreon.com/beastcarving

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3000
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: compacting apk on renpy[SOLVED]

#7 Post by Imperf3kt » Tue Jun 23, 2020 8:51 pm

To get a bit more, you can compose the images within renpy via Composite()
So for example, instead of using three images for a sprite, you could use one image for the base, and three smaller images for the facial expressions.
The trade off is you'll use more RAM, but its generally worth it.

Doing this also partially helps discourage copyright theft as the thieves must recompose the image themself if they extract it from your game.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Free Android GUI - Updated occasionally

Post Reply

Who is online

Users browsing this forum: dGameBoy101b, Google [Bot], robcolton