CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Ren'Py [SOLVED] Screens seems to take time to load for some reason

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,260
More random ideas...

It might be the at eina_pos_library.
counterintuitively is more about than it is positioning.

For example...
show my_sprite at left moves the my_sprite image from it's current position to the bottom left of the screen. That movement is gradual, with the image being seen to move across the screen rather than just appearing immediately there. Most transitions default to being 0.5 seconds long.

Again... A guess. But try removing the at and replace it with pos x,y or align x%, y%.


Nevermind... I was thinking of with, not at.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,009
16,296
For some reason, every time I call my screens, the game take something like 0.5 seconds to load them.
There's something odd. I tried your screen, with a really big image (3744x5616) being proceeded, and it open instantly.


Nevermind... I was thinking of with, not at.
It's a screen, at effectively are used for the transform. And I also suspect that the culprit is "eina_pos_library".
 

nonomo

Newbie
Game Developer
May 2, 2019
43
68
Okay, so I think it was a mix of a few problems at once.

1. The size of the images. Although it's not really a problem with other things it created a bit of a loading time.
2. Not in every case but in some places a transition WAS in fact misplaced as with the parameter "skip... transition" the game runs correctly.
3. Increasing config.image_cache_size and predict_statements also helped.

I also saw that running the game on another pc works better for who knows the reason. My main pc is better but seems to struggle with ren'py.

Okay now thanks everyone for your help. It is fixed now. I just don't know what I need to do to close the thread if anyone can tell me ? Thanks again.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,528
8,066
1. The size of the images. Although it's not really a problem with other things it created a bit of a loading time.
As long as prediction is working correctly, it shouldn't be an issue.


I also saw that running the game on another pc works better for who knows the reason. My main pc is better but seems to struggle with ren'py.
It could be that you tested your game from the editor, and not as a build.


Okay now thanks everyone for your help. It is fixed now. I just don't know what I need to do to close the thread if anyone can tell me ? Thanks again.
Just put a [SOLVED] in your title.
 
  • Like
Reactions: nonomo

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,260
It wasn't prediction, just a combination of things that look perfectly normal but don't flow how you might expect them to.

There were 2 separate misunderstandings, plus one possible cumulative problem.
And because occasionally people search the forums looking for similar threads, I'll explain at least one (since it's the easiest to explain)...

Python:
label my_screen_start:

    scene my_image1 with dissolve

label my_screen_repeat:

    call screen my_screen
    jump my_screen_repeat


label dont_go_that_way:

    "Don't go that way"
    return


screen my_screen():

    imagebutton:
        idle "button1_idle"
        hover "button1_hover"
        action {do-something}

    imagebutton:
        idle "button2_idle"
        hover "button2_hover"
        action Call("dont_go_that_way")

Firstly, I'll point out the way call screen / action ... usually works is to exit the screen and THEN execute the action when the game triggers an action. As with anything, there are exceptions (action NullAction() and action Notify() being two that come to mind). action Call() is even more severe, in so much as you can't chain it together with other actions. But things are easier to follow, if you think of it as "exit THEN action", not "action then exit".

Back to original post...

The issue, as I saw it, was that the background image my_image1 was appearing and THEN half a second later, the buttons button1 and button2 were appearing. It gave a stuttering effect.

The delay appeared to be the screen loading slowly, as the background was already clearly visible.

In reality, it was the background image being shown with the scene ... with dissolve that was introducing the perceived delay and the screen was appearing immediately after the dissolve had finished. But that's not how the brain saw it.

The second misunderstanding was a variation on this theme and there's nothing to be gained by explaining that one too.

Then there was the possible cumulative problem. It could easily have been introducing an even bigger and more noticeable delay than I saw. And it went away when the OP executed "I.T. solution #1"... "Switch it off and on again". There was no clear cause for this, beyond spending too many hours trying to fix a problem that wouldn't go away. It's not even clear it was a RenPy or game thing.

I mention it only to highlight that sometimes just stepping away from the computer (maybe even getting a bit of sleep) can solve the most stubborn of problems and that "switch it off and on again" works surprisingly often.
 
Last edited:
  • Like
Reactions: nonomo