Ren'Py Slow loading

Mr. MiBo

Formerly 'Bory_S'
Feb 25, 2023
1
0
I have a question about loading game saves. Here's how it goes. I started creating a game in Renpy, at first everything was fine, but the longer the game became, the longer it took to load the saves ( about 10 seconds ). The code is not complex, I would even say it is very simple, and that is why it annoys me so much. I've probably tried everything, today I even reinstalled the system and it's still the same.
Any ideas how to solve this?
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,196
3,080
Before anne o'nymous comes in and solves it for you, I'll take a stab in the dark. Call stacks? (You use calls but don't return from them.)
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
993
2,095
I have a question about loading game saves. Here's how it goes. I started creating a game in Renpy, at first everything was fine, but the longer the game became, the longer it took to load the saves ( about 10 seconds ). The code is not complex, I would even say it is very simple, and that is why it annoys me so much. I've probably tried everything, today I even reinstalled the system and it's still the same.
Any ideas how to solve this?
Are you trying the game outside of the SDK environment? It's possible you have done lots of changes and what not and the Ren'py SDK is caching variables and call stacks etc. When I am working on code, I sort of have a habit of recompiling the rpcy files and also deleting any persistent variables after I do some major changes to the code.

I've never seen a long save load before though. I see lots of games that go over-board on the coding and they end up taking 2 minutes or more to load in when you first run them.

My feeling is it must be some sort of accumulative effect from coding and making changes. To troubleshoot, I would run a build off and then try and play it normally, without the SDK running. See if that makes it any faster.

I'm curious to find out what it is.
 

poolfk

New Member
Jul 18, 2024
1
1
I have a question about loading game saves. Here's how it goes. I started creating a game in Renpy, at first everything was fine, but the longer the game became, the longer it took to load the saves ( about 10 seconds ). The code is not complex, I would even say it is very simple, and that is why it annoys me so much. I've probably tried everything, today I even reinstalled the system and it's still the same.
Any ideas how to solve this?
You can check whether the stack is affected by writing the following to the console after loading - `watch len(renpy.get_return_stack())`.
But I believe that your problem is related to something else.

Have you defined the `after_load` label? Maybe you added some callbacks?
 
  • Like
Reactions: osanaiko

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,582
2,219
I'll take my random guess.

You're using show for background images instead of scene.

show adds an image to an existing screen.
scene replaces the screen with an image.

The difference being that when you've shown 1,000 images using scene, only the final one is actually being shown (and therefore tracked). Whereas 1,000x show means RenPy would be tracking 1,000 active/current images.

For a better answer, build your game using the RenPy SDK BUILD and upload it somewhere. Doesn't matter if it's not finished or not working. Then upload a save file from the /save/ folder to the same place. Then post the links here. If you'd rather not post it publicly, send a PM to the people in this thread you trust to know enough to diagnose it. F95 is a pirate site, but we're more of less trustworthy (at least for a completely unfinished game).

That way, we can look for ourselves. No offence, but "my saves don't work" isn't really much to go on. The details matter, and seeing the game AND the saves are likely needed to solve this one (assuming it isn't a problem with your computer).