If you're having trouble or run into any bugs with the code, post a comment here! I will try to get back to you within a few days.

Use the mousewheel or pinch gesture to zoom in and out of a viewport. · By
Hello! The zoom viewport and parallax viewport can coexist in the same project with no issues, but their functionalities can't quite be combined - if you nest them then I believe one viewport is prioritized for the input. It's not a bad idea though, so I'll put that in my back pocket to potentially combine! I might need to adjust the behavior of the parallax so the zoom looks nice too, since it's currently designed just for one depth level. I will reply to this comment if I do make a combination one!
Delightful news, I had a chance to smash the two viewports' code together, and with a few tweaks, it's working fantastically! I want to do some more testing yet, and I think I'll add a property or two specific to this iteration of the zoom/parallax combo, but I imagine it should be out within the week :D
Hello! Thanks so much for your interest. Honestly the parallax+zoom viewport has been sitting around on my computer in an almost-completed state; I just need to finish adding some examples and make a page and screenshots for it. I appreciate the prodding so I can bump it higher on my list to just get out! I'll aim for this month so it's not just sitting around gathering dust.
Hello, sorry this question is somewhat unrelated to the tool itself. I wanted to ask how you did the flowchart showcased in the gif? I want to implement one for my own game, but can't think of an effective approach that can adapt easily to any script changes.
Thank you for all the wonderful tools by the way, I've used them for all of my games so far <3
👀👀👀 Haha you have discovered my secret tool I've been working on since early this year - I'm hoping to release it in the coming months! The flowchart tool will be paid - it's incredibly feature-rich, and I've put a lot of time and effort into making it extremely flexible, to give you a heads up. And I'm delighted to hear you've gotten use out of my tools ✨
Not directly, though that's something I've considered for a future update. You can, however, use the zoom_callback feature to update displayables - for example, if the provided current zoom is 2.0, then you'd know you should zoom your image by 1/2.0 = 0.5 so that it stays the same size visually. This will also likely mean you need to make sure your anchor points are set correctly so the image doesn't also look like it's wandering around the viewport. Hope that helps you get started! I'll try to remember to reply here if I do add a simpler/built-in way of having displayables update their size when the viewport is being zoomed.
Hey!
What's the best way to get the zoom movement really smooth? No matter what I try it's always quite sluggish. Even the included example has exhibits this jerky motion. Many thanks in advance! :)
Edit: Just in case someone stumbles on this later, I "solved" it by setting zoom_speed to 1/30.0 in the zoom_viewport and zoom_amount to 0.2. Lots of small steps instead of fewer big steps basically. I tried 1/60.0 but it causes some glitches for me
Hi.
I am playing with your tools in my demo project.
It seems relatively easy to make zadjustment value consistent between game reload. Is it a good idea to backport the zadjustment save compatibility support to your codebase? Or add a kinda example.
ZoomViewport where zadj saves - https://github.com/snowinmars/PlanescapeTormentRmk/blob/master/src/game/00_screens/01_zoom_viewport.rpy
Usage - https://github.com/snowinmars/PlanescapeTormentRmk/blob/master/src/game/screens/location_map.rpy
Hey! So I finally gave this a shot by swapping out my existing flowchart viewport with zoom_viewport.
While zooming out immediately worked as expected, I ran into the following issues:
I'm sorry, but an uncaught exception occurred. While running game code: File "renpy/display/render.pyx", line 494, in renpy.display.render.render_screen File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/accelerator.pyx", line 1020, in renpy.display.accelerator.RenderTransform.render File "renpy/display/accelerator.pyx", line 439, in renpy.display.accelerator.RenderTransform.render_child File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/render.pyx", line 170, in renpy.display.render.render File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "renpy/display/accelerator.pyx", line 1020, in renpy.display.accelerator.RenderTransform.render File "renpy/display/accelerator.pyx", line 439, in renpy.display.accelerator.RenderTransform.render_child File "renpy/display/render.pyx", line 267, in renpy.display.render.render File "game/script/system/plugins/zoom_viewport/01_zoom_viewport.rpy", line 383, in render File "game/script/system/plugins/zoom_viewport/01_zoom_viewport.rpy", line 319, in redraw_adjustments File "game/script/system/plugins/zoom_viewport/01_zoom_viewport.rpy", line 343, in adjust_pos_for_zoom IndexError: list index out of range
The error appears while the zoom-in animation is already happening, if that helps.
I'd also be happy to send a game build to figure this out in more detail in DMs! (My Discord username is kigyodev.)
You can try changing the line xpos, ypos = self.offset[0] into
try:
xpos, ypos = self.offsets[0]
except IndexError:
## Didn't finish rendering/doesn't know where children are
renpy.redraw(self, 0)
return (0, 0)
and see what happens. I made some updates to ZoomViewport a while back that might have addressed this problem though - I'll get in touch on Discord to test things out!