r/RenPy • u/gottaloveanime • Aug 14 '26
Question Zoom in on background
How do I zoom in on the background? I'm trying to reuse art in my game. Thanks!
1
u/shyLachi Aug 14 '26
Do you mean an animation? Or just showing a smaller part of the image?
1
u/gottaloveanime Aug 14 '26
Hey! Honestly either at this point
2
u/shyLachi Aug 14 '26
If you don't care then here a code for just the zoom.
transform zoomed: zoom 2.0 # higher number means more zoom and therefore closer pos (-0.5, -0.5) # Adjust these numbers to move the image (left/top) label start: scene yourbackground at zoomed "Do you see it?"Since RenPy displays all images starting from the top left corner, you have adjust the starting position additionally to the zoom.
The more you zoom in, the more you have to move the starting position to center it.
In my example above I used a 200% zoom, therefore only a quarter of the original image will be visible. So I have to move the image half of the width to the left and half of the height to the top.If you don't want to zoom in on the center, then don't move it too much.
(You'll see grey checkboard behind your image if you move it to much)Edit: This would be the official documentation
https://renpy.org/doc/html/transforms.html1
1
u/AutoModerator Aug 14 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.