Is it possible to have a looping background?

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
User avatar
peroxidehead
Newbie
Posts: 20
Joined: Thu Mar 13, 2014 7:29 am
Projects: Cat's Cradle
Tumblr: nekomacradle
Contact:

Is it possible to have a looping background?

#1 Post by peroxidehead »

Out of curiosity, I was wondering if it's possible for a screen to have a looping background? Like for example, my attached picture, I just want it to continuously loop with it moving upwards while more hearts go up from below to enter the screen. Is that possible? I've tried looking around for an answer but I haven't really found anything useful :? Any insight would be much appreciated!
Attachments
somethinglikethis.png

Kinsman
Regular
Posts: 130
Joined: Sun Jul 26, 2009 7:07 pm
Location: Fredericton, NB, Canada
Contact:

Re: Is it possible to have a looping background?

#2 Post by Kinsman »

You can tile your heart graphic with an image manipulator, and use ATL to animate it scrolling.

Code: Select all

# Let's assume the image is 256x256, and the screen is 1280x720
image heartscroll:
    im.Tile("images/heart.png",size=(1280,720+256))
    # i.e. big enough to fill the screen and then add one more row
    xoffset 0 yoffset 256
    linear 2.0 xoffset 0 yoffset 0
    repeat
    # slide up one row and then skip back, creating the illusion of continuous hearts

label start:
    scene heartscroll
Flash To Ren'Py Exporter
See the Cookbook thread

User avatar
peroxidehead
Newbie
Posts: 20
Joined: Thu Mar 13, 2014 7:29 am
Projects: Cat's Cradle
Tumblr: nekomacradle
Contact:

Re: Is it possible to have a looping background?

#3 Post by peroxidehead »

oh , thanks for this! i was wondering though, if it were possible to use this for imagemaps?

Post Reply

Who is online

Users browsing this forum: Google [Bot]