How to implement a scrolling image (like a web page?)

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.
Post Reply
Message
Author
notsureifimme
Newbie
Posts: 3
Joined: Fri Dec 07, 2018 3:07 pm
Contact:

How to implement a scrolling image (like a web page?)

#1 Post by notsureifimme » Fri Dec 13, 2019 4:25 am

An example of what I'm looking for is similar to the scrolling @channel page on Rintaro's phone in Steins;Gate like in this video at 5:19 -> https://youtu.be/7iB966sdP5k?t=319 . The player can actually scroll both up and down on this simulated web page.

Is something like this possible in Ren'Py? The closest thing I found was the animation & transform documentation - could I use those functions on the image with a player-controllable y-position variable to render the image at the desired height each frame? Or is there another way to do it that uses less programming?

Thank you!

User avatar
Alex
Lemma-Class Veteran
Posts: 2494
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: How to implement a scrolling image (like a web page?)

#2 Post by Alex » Fri Dec 13, 2019 2:14 pm

You need a viewport - scrollable area where you can place different content.
https://www.renpy.org/doc/html/screens.html#viewport
Also, it mentioned in a tutorial game that ships with engine.

Try to make a screen with the viewport and show this screen.
https://www.renpy.org/doc/html/screens.html


Kind of sample - viewtopic.php?f=8&t=53959#p505785

notsureifimme
Newbie
Posts: 3
Joined: Fri Dec 07, 2018 3:07 pm
Contact:

Re: How to implement a scrolling image (like a web page?)

#3 Post by notsureifimme » Sat Dec 14, 2019 10:11 pm

Thank you Alex :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]