Camera panning when scene is bigger than the screen [SOLVED]

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
Filraen
Newbie
Posts: 2
Joined: Sun Apr 08, 2012 6:43 pm
Contact:

Camera panning when scene is bigger than the screen [SOLVED]

#1 Post by Filraen »

Hello, and please bear with my not-first-language English.

I'm using NVL mode and in one scene I have lots of sprited characters (five to seven at the time, in fact).

I want to deal with this by using a background twice as wide as the screen size (1600 x 600 as per the 800x600 default) and have the charcters act in one of the halves, making a preferably smooth transition from left to right side of the scene (background and sprites from both sides of the scene) like when a camera panning, even with the possibility to stop in the middle (half-left, half-right).

Any help with this?
Last edited by Filraen on Tue Apr 17, 2012 8:14 pm, edited 2 times in total.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Scene bigger than the screen, or moving "visible" screen

#2 Post by nyaatrap »

As far as I know, you need to code all movement of each images one by one.
http://www.renpy.org/doc/html/atl.html is a document to do this task.

sciencewarrior
Veteran
Posts: 356
Joined: Tue Aug 12, 2008 12:02 pm
Projects: Valentine Square (writer) Spiral Destiny (programmer)
Location: The treacherous Brazilian Rainforest
Contact:

Re: Scene bigger than the screen, or moving "visible" screen

#3 Post by sciencewarrior »

I discovered there is a way to move a whole layer:

Code: Select all

transform pan_scene_right:
    xpos 0
    linear 2 xpos -800

$ renpy.layer_at_list([pan_scene_right])
Keep your script in your Dropbox folder.
It allows you to share files with your team, keeps backups of previous versions, and is ridiculously easy to use.

Filraen
Newbie
Posts: 2
Joined: Sun Apr 08, 2012 6:43 pm
Contact:

Re: Scene bigger than the screen, or moving "visible" screen

#4 Post by Filraen »

Works great, thanks!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], DewyNebula, Majestic-12 [Bot], Sugar_and_rice