Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Thu Jun 20, 2013 4:00 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Mar 01, 2012 6:34 pm 
Newbie

Joined: Thu Mar 01, 2012 6:01 pm
Posts: 2
Hello,

I am sorry if my problem has already been submitted, but I can't find topics about what I want to do.

What I am trying to do is not really difficult, but I am not enough skilled in Ren'py to figure out how make it work the simple way...

I am writing the code for a Visual Novel, and I have some parts of the game with many characters discussing at the same time. To avoid using show and hide commands a lot of time, I would like to divide the characters in different groups, in different screens, and switch between these two or three screens.

To do this, when I am starting from the "main" screen with a background and some sprites, I want to move all the images slightly to the right and fade the screen to black at the same time. Then start from a black screen, and fade to the same background but with different sprites, moving all these images to their respective positions. Thus creating a sight change for the player.

The moving is ok, I have an ugly but working solution. My problem is the fading to and from black screen while moving. My solution displays the background and sprites when I would like to have only black on screen !
I am thinking ATL commands might be better, but maybe I could succeed with only transitions. I don't know... I thought Alphadissolve and Imagedissolve could replace my fade, but I can't figure out how to use it.

Do you have any idea to help me please ? I am opened to every advice ^^

Here is my current and shaky solution :

Code:
   show bg with fade
    show sprite1 at left
    show sprite2 at center
    show sprite3 at right
    $renpy.pause(1.0)
    #start first screen transition
    show bg at Position(xpos = 0.05, xanchor=0, ypos=0, yanchor=0)
    show sprite1 at Position(xpos = 0.05, xanchor=0, ypos=1.0, yanchor=1.0)
    show sprite2 at Position(xpos = 0.55, xanchor=0.5, ypos=1.0, yanchor=1.0)
    show sprite3 at Position(xpos = 1.05, xanchor=1.0, ypos=1.0, yanchor=1.0)
    with ComposeTransition(Fade(0.5,0,0),MoveTransition(0.5))
    scene black
   
    show bg2 at Position(xpos = 0.95, xanchor=1.0, ypos=0, yanchor=0) behind black
    show sprite4 at Position(xpos = 0.15, xanchor=0, ypos=1.0, yanchor=1.0) behind black
    show sprite5 at Position(xpos = 0.55, xanchor=0, ypos=1.0, yanchor=1.0) behind black
    with None
    hide black
    show bg2 at Position(xpos = 0.0, xanchor=0, ypos=0, yanchor=0)
    show sprite4 at Position(xpos = 0.2, xanchor=0, ypos=1.0, yanchor=1.0)
    show sprite5 at Position(xpos = 0.6, xanchor=0, ypos=1.0, yanchor=1.0)
    with ComposeTransition(Fade(0,0,0.5),after=MoveTransition(0.5))
    #New screen


Last edited by Orfaen on Sun Mar 25, 2012 10:08 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sun Mar 25, 2012 9:58 am 
Newbie

Joined: Thu Mar 01, 2012 6:01 pm
Posts: 2
I found the solution by myself. By replacing the fade by a dissolve, and by playing with ComposeTransition and behind, I was able to create a nice effect. Here is the code :
Code:
    #First show the BG and 4 sprites :
    show bg at Position(xpos=1.0, xanchor=1.0, ypos=1.0, yanchor=1.0) with fade
    show img1 at Position(xpos=0.75, xanchor=0.5, ypos=1.0, yanchor=1.0) with easeinright
    show img2 at  Position(xpos=0.5, xanchor=0.5, ypos=1.0, yanchor=1.0) with easeinleft
    "checkpoint 1"
    show black behind bg
    with None
   
    #Dissolve everything into a black screen with move
    show bg at Position(xpos=3.0, xanchor=1.0, ypos=1.0, yanchor=1.0)
    show img1 at Position(xpos=2.75, xanchor=0.5, ypos=1.0, yanchor=1.0)
    show img2 at Position(xpos=2.5, xanchor=0.5, ypos=1.0, yanchor=1.0)
    with ComposeTransition(Dissolve(0.5), MoveTransition(8.0))
    hide bg
    with None
   
    #Show the second set of sprites behind black screen
    show bg at Position(xpos=-0.1,xanchor=0.0,ypos=1.0,yanchor=1.0) behind black
    show img3 at Position(xpos=0.15,xanchor=0.5,ypos=1.0,yanchor=1.0) behind black
    show img4 at Position(xpos=0.4,xanchor=0.5,ypos=1.0,yanchor=1.0) behind black
    with None
   
    #Show it with move and dissolve
    show black behind bg
    show bg at Position(xpos=0.0,xanchor=0.0,ypos=1.0,yanchor=1.0)
    show img3 at Position(xpos=0.25,xanchor=0.5,ypos=1.0,yanchor=1.0)
    show img4 at Position(xpos=0.5,xanchor=0.5,ypos=1.0,yanchor=1.0)
    with ComposeTransition(Dissolve(0.5), None, MoveTransition(0.5))
    "checkpoint 2"


Now I want ro reproduce an animation 4Leaf team used in Katawa Shoujo. I want to do the same thing than above, but without dissolving into a black screen between the two sets of sprites. I have written a code that almost do it :
Code:
    #First display
    show bg at Position(xpos=1.0, xanchor=1.0, ypos=1.0, yanchor=1.0) with fade
    show img1 at Position(xpos=0.75, xanchor=0.5, ypos=1.0, yanchor=1.0) with easeinright
    show img2 at  Position(xpos=-0.75, xanchor=0.5, ypos=1.0, yanchor=1.0)
    with None
    "checkpoint 1"

    #Move all images, but not simultaneously ! Unfortunely.
    show bg at Position(xpos=0.0, xanchor=0.0, ypos=1.0, yanchor=1.0)
    with MoveTransition(2.0)
    show img1 at Position(xpos=1.75, xanchor=0.5, ypos=1.0, yanchor=1.0)
    with ComposeTransition(Dissolve(2.0),MoveTransition(2.0))
    show img2 at Position(xpos=0.25, xanchor=0.5, ypos=1.0, yanchor=1.0)
    with ComposeTransition(Dissolve(2.0),None,MoveTransition(2.0))
    "checkpoint 2"


You see ? I want to apply different transitions to these images, but I would like these transitions to occure simultaneously. And Ren'py wait for the end of each transition to run the next line...
I found an interesting solution, if I use a "Move()" clause after a "at", I can move several images simultaneously ! But I can't dissolve them at the same time :?
Example :
Code:
    show bg at Move((1.0,1.0,1.0,1.0),(0.0,1.0,0.0,1.0),2.0)
    show img1 at Move((0.75,1.0,0.5,1.0),(1.75,1.0,0.5,1.0),2.0)
    show img2 at Move((-0.75,1.0,0.5,1.0),(0.25,1.0,0.5,1.0),2.0)


I also tryied to use renpy.transition(), but it doesn't do the job. If I write :
Code:
    show bg at Position(xpos=1.0, xanchor=1.0, ypos=1.0, yanchor=1.0)
    show img1 at Position(xpos=0.75, xanchor=0.5, ypos=1.0, yanchor=1.0)
    with None
   
    show bg at Position(xpos=0.0, xanchor=0.0, ypos=1.0, yanchor=1.0)
    $renpy.transition(MoveTransition(2.0))
    show img1 at Position(xpos=0.75, xanchor=0.5, ypos=1.0, yanchor=1.0)
    $renpy.transition(ComposeTransition(Dissolve(2.0),MoveTransition(2.0)))

I see the bg dissolving, and I don't want to. The renpy.transition() function seems to apply to all images currently moving.

So, if someone have an idea, I would be grateful :)
For now, I think I will take a deeper look to ATL ^^


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group