Animated Title Screen?

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.
Message
Author
crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Animated Title Screen?

#1 Post by crimsonnight » Sat Sep 08, 2012 7:48 am

Hi,

As I've done with the content of my novel, I've saved various layers and I'd like them to display/animate at set times on the title screen, how can I achieve this?

Further explanation: I want an image to be displayed, then another image to replace the original image ('flashing' in in time with the music) then a few seconds later I want the logo to fade in, and potentially animate a layer (such as clouds) on the final image - is this possible? Thank you!
alwaysthesamebluesky.com

User avatar
FatUnicornGames
Miko-Class Veteran
Posts: 576
Joined: Sun Mar 25, 2012 7:54 pm
Projects: Club Shuffle
Contact:

Re: Animated Title Screen?

#2 Post by FatUnicornGames » Sat Sep 08, 2012 1:51 pm

I think this could be accomplished with atl.

http://lemmasoft.renai.us/forums/viewto ... 84#p202683
Image
Developer Blog for Club Shuffle - Follow and Share?
-Also! You can call me Crystal if you want.-

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#3 Post by crimsonnight » Sun Sep 09, 2012 3:53 pm

Thank you :)

The post in that thread says 'youranimatedbgpic is defined where your other images are defined' - now I'm totally new to this - where is there? I tried underneath and in the script tab and neither worked.

Cheers!
alwaysthesamebluesky.com

User avatar
Victoria Jennings
Miko-Class Veteran
Posts: 715
Joined: Mon Jul 02, 2012 9:40 am
Contact:

Re: Animated Title Screen?

#4 Post by Victoria Jennings » Sun Sep 09, 2012 3:56 pm

Where did you define the images for your characters (image xxx = "xxx.png")? That's what I imagine they're talking about.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#5 Post by crimsonnight » Sun Sep 09, 2012 4:23 pm

Under:

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"

in the script.rpy tab
alwaysthesamebluesky.com

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#6 Post by crimsonnight » Tue Oct 02, 2012 7:43 am

Hi guys, I'm still having problems, could you please let me know how I keep the second image up whilst having the animated dandelions over the top?

init:
image title = Animation("titleipod.jpg", 1.25,
"title.jpg", 0.25,
"dandelion")

init:
image dandelion = SnowBlossom(Animation("dandelions.png"))

Also how do I edit functions? Does anyone have the right settings for dandelions floating across the screen? Cheers :)
alwaysthesamebluesky.com

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#7 Post by crimsonnight » Thu Oct 04, 2012 3:44 am

Help would be greatly appreciated, I really wanna get this sorted :(
alwaysthesamebluesky.com

Levrex
Veteran
Posts: 280
Joined: Mon Jun 18, 2012 12:16 pm
Contact:

Re: Animated Title Screen?

#8 Post by Levrex » Thu Oct 04, 2012 5:47 am

Sorry, but i don't really comprehend what you're wanting to do. The others too, probably.

Are you trying to keep that first animation thing up or what?
What are you trying to do with snow-blossom dandelions?
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#9 Post by crimsonnight » Thu Oct 04, 2012 7:39 am

Thanks for responding :)

Basically I want to show the first image for a certain amount of time (titleipod.jpg) then switch it to the full title screen image (title.jpg) then animate dandelions (dandelions.png) across the top of it and finally have the logo fade in.

My issue at the moment is that the dandelions aren't animating over the top, they replace the previous image - ie they're currently spawning on a black screen, how do I remedy this?

And secondly the dandelions are currently behaving as snow/cherry blossoms, I was wondering if anyone had a code for dandelions (ie travelling horizontally across the screen)?

*EDIT* Well to be precised I'd like to have the title animation zoomed into a certain area of 'title.jpg' then zoom out to the full image - this seemed too complex hence why I created a separate jpg of the area I wanted to zoom into (titleipod.jpg)
alwaysthesamebluesky.com

Levrex
Veteran
Posts: 280
Joined: Mon Jun 18, 2012 12:16 pm
Contact:

Re: Animated Title Screen?

#10 Post by Levrex » Thu Oct 04, 2012 10:48 am

Oh, that?

It is not hard at all, just learn ATL language. Just for the record, you can still use ATL in screens by "at" and "transform".
Here is a part of my ported scene from Matsuri, where it starts zoomed over a girl's eye, using one image, and then zooms out to the full picture, switching the image's expression halfway through.

Code: Select all

        show cg door fingers behind red as secondblock:
            block:
                "cg door delusion"
                zoom 3.0 xalign 0.5 yalign 0.257
                0.05
                easeout 0.05 zoom 2.2 xalign 0.5 yalign 0.5
                0.1
            block:
                "cg door fingers"
                zoom 2.2 xalign 0.5 yalign 0.25
                easeout 0.1 zoom 1.0 xalign 0.5 yalign 0.5
        with Shake((0, 0, 0, 0), 0.8, dist=40)
Is dandelions.png transparent?

Horizontal movement can be defined as a transition (taken from Utsukushii Effects):

Code: Select all

at Move((0.0,0.5), (-1.0,0.5), .15, xanchor="left", yanchor="center", repeat=True)
It shows light bolts moving fast across the screen (given the image). The width of the image should probably be greater than that of the window. If you want the image to move to its left corner, then back - slo~wly - then look up hpunch in 00definitions.rpy.

Oh wait, that is almost certainly not what you want.
What you want is there:
http://www.renpy.org/wiki/renpy/doc/ref ... nowBlossom
horizontal=True, yspeed=0.0
Attachments
screenshot.jpg
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#11 Post by crimsonnight » Thu Oct 04, 2012 3:20 pm

Thanks a lot for trying to help but would you be able to simplify that a little for me?

Where does that code go, script or screen? and what exactly does 'show cg door fingers behind red as secondblock:' mean? I understand half of it

Yeah the 'dandelions.png' is transparent, any idea why it's not layering?

Cheers for the code, I did see that page before but I don't know where to put 'horizontal=True, yspeed=0.0' in the code?

Thank you for taking the time :)
alwaysthesamebluesky.com

Levrex
Veteran
Posts: 280
Joined: Mon Jun 18, 2012 12:16 pm
Contact:

Re: Animated Title Screen?

#12 Post by Levrex » Thu Oct 04, 2012 4:00 pm

crimsonnight wrote:Thanks a lot for trying to help but would you be able to simplify that a little for me?

Where does that code go, script or screen? and what exactly does 'show cg door fingers behind red as secondblock:' mean? I understand half of it
It simply shows the cg event image under the "red" image, being assigned another name so it wouldn't replace another image with "cg" name on screen... well, you shouldn't care.

If i got you right, you want the dandelions to come from the right side of the screen in a wave, disappear from the screen's left side, then the logo fades in.

Do you show "dandelions" with "scene" statement? If so, that's where your fault is. Transparent (what's drawn on them is smaller than the screen) images are meant to be called with "show".
If you instead used a single transform, then that's your fault too.

Define dandelions in init phase only.

If your image looks like a single unmoving dandelion, then:

Code: Select all

image blossoms = SnowBlossom("dandelions.png", count=40, border=60, xspeed=(5, 20), yspeed=(0, 0), start=1.0, horizontal=True)
If it instead covers the entire screen or is bigger, just move it (zoom 2.0 only if necessary).

Code: Select all

image blossoms:
    "dandelions.png" xpos 2.0 yalign 0.5 zoom 2.0
    linear 2.0 xpos -2.0
If you want it animated while it flies (make it bloom), first you'll have to create a picture for each frame, then have an Animation which has all these frames.

Now the whole thing looks like this:

Code: Select all

label splashscreen:

    $ show_button_game_menu = False # Merely doesn't show quick menu on screen while the splashscreen lasts.
    $ renpy.pause(1.0)
    $ mouse_visible = False # Merely hides the cursor.
    show title:
        zoom 3.0 xalign 0.5 yalign 0.5 # Adjust if necessary.
        1.0
        easeout 1.0 zoom 1.0 # That's supposed to happen while dandelions fly over it.
    show blossoms
    with dissolve
    $ renpy.pause(2.5)
    scene black with fade # or replace it with title, but delete two last lines from "show title" block then.
    $ mouse_visible = True
That's how it's done.
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#13 Post by crimsonnight » Thu Oct 04, 2012 4:31 pm

Thank you thank you,

So it should go here?

# The background of the main menu.
window:
xpadding 0
ypadding 0

label splashscreen:

$ show_button_game_menu = False # Merely doesn't show quick menu on screen while the splashscreen lasts.
$ renpy.pause(1.0)
$ mouse_visible = False # Merely hides the cursor.
show title:
zoom 3.0 xalign 0.5 yalign 0.5 # Adjust if necessary.
1.0
easeout 1.0 zoom 1.0 # That's supposed to happen while dandelions fly over it.
show dandelions
with dissolve
$ renpy.pause(2.5)
scene black with fade # or replace it with title, but delete two last lines from "show title" block then.
$ mouse_visible = True

# The main menu buttons.
frame:
style_group "mm"
xalign .98
yalign .98

I'm getting the following error when trying to run the game: File "game\screens.rpy", line 201: expected statement.
frame:
^

Line 201 is 'frame:'
alwaysthesamebluesky.com

Levrex
Veteran
Posts: 280
Joined: Mon Jun 18, 2012 12:16 pm
Contact:

Re: Animated Title Screen?

#14 Post by Levrex » Fri Oct 05, 2012 4:25 am

Not really.
Screens to screens (screens.rpy), complex labels to script.rpy. Such labels have no right to be present in a screen, because it will ruin a screen, obviously.
Remove the splashscreen label from that screen and copy-paste it to script.rpy (or anywhere, but not inside of any renpy statement).
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Animated Title Screen?

#15 Post by crimsonnight » Fri Oct 05, 2012 5:06 am

Cheers, think we're getting there, so should I put it in an init statement like this?

init:
image title2 =
$ show_button_game_menu = False # Merely doesn't show quick menu on screen while the splashscreen lasts.
$ renpy.pause(1.0)
$ mouse_visible = False # Merely hides the cursor.
show title:
zoom 3.0 xalign 0.5 yalign 0.5 # Adjust if necessary.
1.0
easeout 1.0 zoom 1.0 # That's supposed to happen while dandelions fly over it.
show dandelions
with dissolve
$ renpy.pause(2.5)
scene black with fade # or replace it with title, but delete two last lines from "show title" block then.
$ mouse_visible = True


then in screens put 'add title2'?

That creates the following error:

I'm sorry, but an uncaught exception occurred.

While executing init code:
File "game\script.rpy", line 33, in script
File "game\script.rpy", line 33, in python
Exception: Can't add displayable during init phase.

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "C:\Users\gwilde\Dropbox\Ren'Py - Always The Same Blue Sky\renpy\execution.py", line 266, in run
File "C:\Users\gwilde\Dropbox\Ren'Py - Always The Same Blue Sky\renpy\ast.py", line 646, in execute
File "C:\Users\gwilde\Dropbox\Ren'Py - Always The Same Blue Sky\renpy\python.py", line 1172, in py_exec_bytecode
File "game\script.rpy", line 33, in <module>
File "C:\Users\gwilde\Dropbox\Ren'Py - Always The Same Blue Sky\renpy\exports.py", line 836, in pause
File "C:\Users\gwilde\Dropbox\Ren'Py - Always The Same Blue Sky\renpy\ui.py", line 395, in __call__
Exception: Can't add displayable during init phase.

Windows-7-6.1.7601-SP1
Ren'Py 6.14.1.366
Always The Same Blue Sky... 0.5


Line 33 is: $ renpy.pause(1.0)

Have also tried:

init:
label title2:
(and then the rest of the code)
alwaysthesamebluesky.com

Post Reply

Who is online

Users browsing this forum: No registered users