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.
I thought it'd be as simple as this but this makes the background all janky and buggy and the game would send the various layers of the background shooting left and right instead of a smooth motion that loops, as well as showing past the very right of each layer.
What I'm guessing is that the layers that are being completed and repeated quicker than the others are affecting those layers as well for some reason?
Any help, I'm sure the solution is simple but I can't seem to work it out.
Ocelot wrote: ↑Tue Jun 22, 2021 9:16 am
Can you show what you mean by that and what you expect? And ideally, a small test project which shows the problem.
This is the result I want except looping (the assets I have loops).
But the code I have at the moment doesn't do that, it looks like chaos where images are being shoved left and right sporadically. The assets are all the same dimension and I thought I could just change the linear speed of layer.
It is slightly hard to understand the problem without seeing it, but I have a guess.
This is less likely one: xalign 0. means "align left side of the image to the left side of the screen" xalign 1. means "align right side of the image to the right side of the screen"
If displayable in those two positions do not look exactly same, you will have jumps.
The more likely one:
0 and 0. (or 0.0 or .0) are two very different numbers. One it integer and represent absolute positioning in pixels. Other one is real number and represent positioning in fractions of the screen or displayable. You must not mix them, because it leads to unexpected results. Replace 0 with 0.0 and see if problem persists.
Ocelot wrote: ↑Tue Jun 22, 2021 9:32 am
It is slightly hard to understand the problem without seeing it, but I have a guess.
This is less likely one: xalign 0. means "align left side of the image to the left side of the screen" xalign 1. means "align right side of the image to the right side of the screen"
If displayable in those two positions do not look exactly same, you will have jumps.
The more likely one:
0 and 0. (or 0.0 or .0) are two very different numbers. One it integer and represent absolute positioning in pixels. Other one is real number and represent positioning in fractions of the screen or displayable. You must not mix them, because it leads to unexpected results. Replace 0 with 0.0 and see if problem persists.
scene bg_parallaxingtest_back1
show bg_parallaxingtest_back2
show bg_parallaxingtest_road
show bg_parallaxingtest_front
with fade
Each layer loops/repeats at different times so the way I was doing it early seemed to messed with each layer everytime a transform animation repeats when another isn't complete yet. If I were to describe it in words, it's like the background was taking 2 steps forwards one step back instead of just moving one direction at a steady pace.