Memory management?

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.
Message
Author
User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

Re: Memory management?

#61 Post by AlfieMachica123 »

nyaatrap wrote:If you placed all your screen displayables into label main_menu instead of screen main_menu, it might improve memory consumption. And if it really works, then there's an issue on screen caching or prediction, which might need to send a report to Python.
i don't understand this, how do i make this work? sorry :(

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Memory management?

#62 Post by xela »

I personally have a bad experience with that label :(

Why don't you try to exclude menu screen from prediction? It worked well when I tried it in your game. I noticed no difference in main menu loading time on my desktop but even if something like that occurs on slow laptops for example, I recon you could throw a bunch of predict statement in the main_menu label or some label preceding it to predict them only on game start.

Code: Select all

screen main_menu(predict=False):
Tested and it works.

Code: Select all

renpy.predict_screen("main_menu")
Is something you could try putting in the main_menu label or something that precedes it but I've never tested this one since performance wasn't an issue.


I believe that replacing all of your transparent buttons with Null Frames will be the true sources of improvement in the game performance. Making animations smaller might do wonders for it as well.
Like what we're doing? Support us at:
Image

User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

Re: Memory management?

#63 Post by AlfieMachica123 »

by the way, those transparent buttons aren't really transparent, try to use magic wand in your photoshop sir ^^

and uhmm, what is a null frame?

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Memory management?

#64 Post by xela »

AlfieMachica123 wrote:by the way, those transparent buttons aren't really transparent, try to use magic wand in your photoshop sir ^^
Wow! Those are some really complex shapes! You're right. How do they transfer into Ren'Py???

I guess some of those shapes very slightly opaque and the rest of the area is transparent? Then you make buttons that are a prefect fit to the elements in the background? If that's the case, it's not something that you can replace with a frame :(
AlfieMachica123 wrote:and uhmm, what is a null frame?
Frame without a Null for background.
Like what we're doing? Support us at:
Image

User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

Re: Memory management?

#65 Post by AlfieMachica123 »

yeap, it has complex shapes that perfectly fits most elements in the background,

and some images (from animations) can't be croped since they would appear differently when animated that's why some images(frames) are in full 1920 x 1080,

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Memory management?

#66 Post by xela »

?

I know I am bad with graphics but why? If you just crop the same part of the image and place it at the same spot in the picture over the background, would it not look exactly the same? I never really tried... I do my best to make my game pretty by code since it'd take me half an year to draw/photoshop any of the background like in Exo and they still wouldn't be that good...
Like what we're doing? Support us at:
Image

User avatar
AlfieMachica123
Regular
Posts: 56
Joined: Sun Jun 30, 2013 10:15 pm
Contact:

Re: Memory management?

#67 Post by AlfieMachica123 »

its hard to explain but, for example, when it comes to lighting factors, i can't just crop this part, which means making a separate atl each(some with random timing), it would create a odd and not so cool animation(might result to different lighting intervals since it has a random part), so that's what, some lighting affect pixel # 20 up to pixel # 1800,

i don't know if you will get my point but that's the best i can explain it ^^ sorry,

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Memory management?

#68 Post by xela »

I think I understand... Syncing lighting effect with a stationary background is impossible. I have no eye for graphics at all so I didn't notice any lighting effect in a bar picture for example at all but I didn't notice the contours in the seemingly transparent buttons either so you can ignore my rumbling in regards to anything that is related to graphics! :D

Well, the name of this thread is memory management and just removing main menu pics from being cached helps in that regard! Otherwise... all of my other advices are None and Void. I misunderstood the application of transparent buttons and if animations cannot be fixed, there is little else you can do to improve performance in Exo.

Right now the two things remaining are a suggestion by nyaatrap to use smaller images and use transforms to increase their size and my idea to have the pictures on screens you can immediately access from the current screen to be predicted by Ren'Py (most of those are a Total Miss currently according to image log). Otherwise, you are using VERY high quality graphics and Ren'Py is having a hard time managing that. I do not believe that memory management in Exo can be improved much further than those two suggestions, especially if you want to all the functionality game presently has to offer.

I still don't know if that was Exo referred to in the original post but I've kept it running for over an hour minimized to a task-bar (Idle basically) and didn't get any spikes in memory consumptions spikes at all. If it's a different game and you need help in locating the memory leak culprit, I'd need to see the code...
Like what we're doing? Support us at:
Image

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]