The size of my game can impact performance on mobile?

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
FroGlenn
Regular
Posts: 51
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

The size of my game can impact performance on mobile?

#1 Post by FroGlenn » Mon Sep 09, 2019 11:57 am

Hi, Renpy community. I've been working on a Renpy game since Jun 2018 and updating it with new stories each two weeks. After all this time, the game as (data from Lint):

- 1,535,926 characters
- 287,970 words
- 900 menus
- 3,000+ images
- 103 screens

The game is avaliable only for Android phones.

Everything was great until I start getting some lag reports from players. Players are getting some sort of delay when changing scenes, after picking a choice in menus and even when the text of the dialogue is being show. I dont have this problem at all when testing on my PC, but on the phone I get the same problem.

I was wondering if the size of the game can impact performance and if it does, what can I do to solve this. Is there a way to "clean" memory or maybe dump unused variables or screens... Or the problem isnt the size but something I'm doing wrong?

Thank you all.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 714
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: The size of my game can impact performance on mobile?

#2 Post by isobellesophia » Tue Sep 10, 2019 11:35 pm

In my opinion, look, it contains 3.000 IMAGES. and SCREENS. AND MENUS,
imagine, they are too many of them, an simple android may or CANNOT handle it, since PC can only do handle it.

Images may take too much data, so i would like to do this for your part.

Make a part 1 or part 2 style of your game, so that each game will divide into 2, lessing its memory data. The scenes may also large, (but i dunno what scenes, or what kind of scene it is for.)

So i hope that'll get fixed, some people make large visual novelgames in PC. But i dont know in android because they take demo version for it, instead.
I am a friendly user, please respect and have a good day..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

User avatar
LateWhiteRabbit
Eileen-Class Veteran
Posts: 1849
Joined: Sat Jan 19, 2008 2:47 pm
Projects: The Space Between
Contact:

Re: The size of my game can impact performance on mobile?

#3 Post by LateWhiteRabbit » Wed Sep 11, 2019 12:22 am

The size of the game can absolutely cause a performance hit on phones.

Think of Android phones like low-end PCs. You are probably overloading the active memory storage (RAM) of the phones.

You can start by making sure all your image files are as small as possible. Webp files are the smallest file format that still supports transparency, and Renpy can use them. If you just convert all your image files to Webp you'll likely cut down the memory footprint by 20-30%.

You can also aggressively code your game to pre-load images and un-load images as needed, instead of relying on Renpy to guess what to keep in memory.

FroGlenn
Regular
Posts: 51
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

Re: The size of my game can impact performance on mobile?

#4 Post by FroGlenn » Fri Sep 13, 2019 12:52 pm

LateWhiteRabbit wrote:
Wed Sep 11, 2019 12:22 am
The size of the game can absolutely cause a performance hit on phones.

Think of Android phones like low-end PCs. You are probably overloading the active memory storage (RAM) of the phones.

You can start by making sure all your image files are as small as possible. Webp files are the smallest file format that still supports transparency, and Renpy can use them. If you just convert all your image files to Webp you'll likely cut down the memory footprint by 20-30%.

You can also aggressively code your game to pre-load images and un-load images as needed, instead of relying on Renpy to guess what to keep in memory.
Thank you. The images are already on PNG-8 or WEBP or super-compressed JPG. The size of the game is only 320 MB, wich I think is small for the content it has.

I will look into the pre-load and un-load you mentioned. This can really solve the problem I think x)

FroGlenn
Regular
Posts: 51
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

Re: The size of my game can impact performance on mobile?

#5 Post by FroGlenn » Fri Sep 13, 2019 1:00 pm

isobellesophia wrote:
Tue Sep 10, 2019 11:35 pm
In my opinion, look, it contains 3.000 IMAGES. and SCREENS. AND MENUS,
imagine, they are too many of them, an simple android may or CANNOT handle it, since PC can only do handle it.

Images may take too much data, so i would like to do this for your part.

Make a part 1 or part 2 style of your game, so that each game will divide into 2, lessing its memory data. The scenes may also large, (but i dunno what scenes, or what kind of scene it is for.)

So i hope that'll get fixed, some people make large visual novelgames in PC. But i dont know in android because they take demo version for it, instead.
Thank you. Make it 2 games is not an option for me cause the game is like an "open world visual novel". Each story can me started at any point and you can stop where you want to begin another. There is a CITY SCREEN where you can go to places and meet NPCs and start their story, and come back to progress with that NPC whenever you want.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 714
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: The size of my game can impact performance on mobile?

#6 Post by isobellesophia » Fri Sep 13, 2019 10:15 pm

Oh i se then, just to make sure you need to low of your script, so that the performance wont get too laggy.
I am a friendly user, please respect and have a good day..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

FroGlenn
Regular
Posts: 51
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

Re: The size of my game can impact performance on mobile?

#7 Post by FroGlenn » Mon Sep 23, 2019 10:15 am

Hi.

I tried some things every time the player goes to the central hub of the game, like:

renpy.free_memory()
renpy.stop_predict("folders/images")
renpy.stop_predict_screen( "some screens" )

And the lag is still there.

If I use *del variable* do you think it can help?

Post Reply

Who is online

Users browsing this forum: Google [Bot]