Rays of light
How did we do that in Ren'py?
It's actually surprisingly easy:
- First, we have the interior of the bus with transparent windows (here white) that we call bg bus2:
- Then we need a (mostly transparent) picture with the light rays and some more light effects. I would show it here, but it would be white on white, so you wouldn't see much. ^^; To draw the rays of light, you can use the light brush option in Procreate (or similar functions in other painting softwares).
- We also need two pictures for the moving effect. Here's the first one (busbg), the second one is a bit simpler (just vertical):
- Finally the sprites of the girls in the foreground.
- Now we need to put everything together with a little program. First, I show it without any animation, just so that you can see how to arrange everything into the right order, from back to front:
scene bg bus2 show meilin happy at left show karina happy at right show busbg behind bg show busbg2 behind bg show buslights 6. Now we only need the animations. First, the flickering: here we just switch the alpha value back and forth in a kind of random manner. How you do it precisely doesn't matter, it should just not repeat to quickly, since otherwise it would look artificially regular. That's the only reason why the program looks a bit lengthy. It's only important to have some switches of alpha and some pauses in between!
show buslights: alpha 0 pause 1.9 alpha 1 pause 0.1 ease 0.2 alpha 0 pause 0.3 ease 0.1 alpha 0.5 pause 0.1 alpha 0 pause 0.2 ease 0.1 alpha 0.8 pause 0.1 alpha 0 pause 1 alpha 0.8 pause 0.1 alpha 0 pause 0.4 ease 0.2 alpha 0.4 ease 0.2 alpha 0 repeat
show busbg behind bg: xpos 0 ypos -350 linear 2 xpos -600 ypos -80 repeat
show busbg2 behind bg: xpos 900 ypos (720-1000) linear 1.9 ypos 0 repeat
That's it! The animation is complete!
This example shows that Ren'py can actually achieve quite complex animations with few lines of code and a bit of planning. I didn't know this initially at all and spent quite some time with other software producing video clips that I could have done much faster directly in Ren'py.
There are a couple of advantages to this "direct method":
- You can very easily change things later on! If you want to improve something on a picture, e.g., you don't need to change the code at all. If you made a video with an external software, you would have to redo the video which might be much more work!
- It takes much less memory than a video!
- You can easily copy paste and adjust the animations to similar scenes.
Have fun coding!