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: 53
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

The size of my game can impact performance on mobile?

#1 Post by FroGlenn »

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: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

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

#2 Post by isobellesophia »

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.


Image

Image


User avatar
LateWhiteRabbit
Eileen-Class Veteran
Posts: 1867
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 »

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: 53
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

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

#4 Post by FroGlenn »

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: 53
Joined: Sun Feb 25, 2018 2:07 pm
Contact:

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

#5 Post by FroGlenn »

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: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

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

#6 Post by isobellesophia »

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.


Image

Image


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

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

#7 Post by FroGlenn »

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: Ahrefs [Bot]