Ren'Py Need help with Renpy ATL or Animation.

Bumbayskie

Newbie
Dec 31, 2018
17
94
Good day!

I've spent a lot of hours, trying to figure out how to do an animation on renpy but until now I haven't figure out how to process an animation on Renpy 7.1.3.

I tried to copy the codes of this kid but no luck either


You don't have permission to view the spoiler content. Log in or register now.

Then I have found another video, the problem is here is I don't have a "Custom_atl.rpy" Tab.

You don't have permission to view the spoiler content. Log in or register now.

Last but the least I tried to copy some codes that can be in their .

You don't have permission to view the spoiler content. Log in or register now.

This is so frustrating for me as I wasted a lot of hours figuring this frame animation for Renpy. Please do help me, I appreciate it and thank you so much in advance!
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,705
I think is code problem with tags and identation...

Try to put a label before "show pure", like:
Code:
label start_animation_pure:
     show pure
If you don't put label before, your "show pure" command is being part of "image pure" statement, and there is when Renpy shows to you an error.
 
  • Like
Reactions: Bumbayskie

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,382
Pardon me if I'm a bit long-winded

One of the things that confused a lot of people about Ren'py is the way that files are processed.

First, Ren'py separates things into two big buckets - things that run at 'init' time, and things that run at 'game' time. When you tell Ren'py to start the game, the first thing it does is go through and do all the 'init' stuff. You might have intermingled 'init' stuff and 'game' stuff in your code, but Ren'py will separate the two parts out and execute them at entirely different times.

"Image" statements are run at init time. So are "define" statements that set up constants. Plus a bunch of other things. So if you write code like:

Code:
label start:
    "A line of narration"

image foo:
    "foo.png"
    0.1
    "bar.png"
    0.1
    repeat

    show foo
    "Another line of narration"
Ren'py extracts the 'image' block and runs it at init time. At 'game' time, you're then left with:
Code:
label start:
    "A line of narration"
    show foo
    "Another line of narration"
This is also true of declaring screens - the screen definitions are set up at 'init' time.

To help yourself keep this kind of stuff clear, it's really good practice NOT to mix the two. Put your image declarations either in their own file, or at the top of the file, before any 'game' code. So, that sample above would have been better written:
Code:
image foo:
    "foo.png"
    0.1
    "bar.png"
    0.1
    repeat

label start:
    "A line of narration"
    show foo
    "Another line of narration"
From an execution point of view, the two are completely identical - Ren'py essentially rearranges your code into 'init' and 'game' portions when it compiles it. But from a clarity point of view, I think the second version is 100% better, because it helps you keep your head around what happens before your game ever really "starts", and what happens afterward.

OK, I'll get off my soapbox now... :)
 
  • Like
Reactions: Bumbayskie

Bumbayskie

Newbie
Dec 31, 2018
17
94
I think is code problem with tags and identation...

Try to put a label before "show pure", like:
Code:
label start_animation_pure:
     show pure
If you don't put label before, your "show pure" command is being part of "image pure" statement, and there is when Renpy shows to you an error.
Pardon me if I'm a bit long-winded

One of the things that confused a lot of people about Ren'py is the way that files are processed.

First, Ren'py separates things into two big buckets - things that run at 'init' time, and things that run at 'game' time. When you tell Ren'py to start the game, the first thing it does is go through and do all the 'init' stuff. You might have intermingled 'init' stuff and 'game' stuff in your code, but Ren'py will separate the two parts out and execute them at entirely different times.

"Image" statements are run at init time. So are "define" statements that set up constants. Plus a bunch of other things. So if you write code like:

Code:
label start:
    "A line of narration"

image foo:
    "foo.png"
    0.1
    "bar.png"
    0.1
    repeat

    show foo
    "Another line of narration"
Ren'py extracts the 'image' block and runs it at init time. At 'game' time, you're then left with:
Code:
label start:
    "A line of narration"
    show foo
    "Another line of narration"
This is also true of declaring screens - the screen definitions are set up at 'init' time.

To help yourself keep this kind of stuff clear, it's really good practice NOT to mix the two. Put your image declarations either in their own file, or at the top of the file, before any 'game' code. So, that sample above would have been better written:
Code:
image foo:
    "foo.png"
    0.1
    "bar.png"
    0.1
    repeat

label start:
    "A line of narration"
    show foo
    "Another line of narration"
From an execution point of view, the two are completely identical - Ren'py essentially rearranges your code into 'init' and 'game' portions when it compiles it. But from a clarity point of view, I think the second version is 100% better, because it helps you keep your head around what happens before your game ever really "starts", and what happens afterward.

OK, I'll get off my soapbox now... :)
Thank you so much, guys! I finally understand how it works because of your help, what I did was simply transfer the image code at the top corner of "label start:" then suddenly it works in which can be seen the image below.
You don't have permission to view the spoiler content. Log in or register now.
Thank you once again!:giggle:
 
  • Like
Reactions: Porcus Dev

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
From an execution point of view, the two are completely identical
It would have been if the image statement was indented. But in your example you put it at the same level than the label one. Since Ren'py's parser works with block, you can't achieve the result you expected with this syntax.
The result should be more something like this :

Code:
# Start of a label block named "start"
label start:
    "A line of narration"

# Start of an image block name "foo". 
# It explicitly end the previous block.
image foo:
    "foo.png"
    0.1
    "bar.png"
    0.1
    repeat

    # The following lines are part of the image block. 
    # Wait, /image/ statement don't have a /show/ property,
    # something is wrong.
    show foo
    # Oh, at least I know this, it's an image name. Well, 
    # except that I can't find an image named "Another line of narration",
    # but I'll say this later by showing the name of the image instead of
    # the image itself.
    "Another line of narration"
The code for what you said should be :
Code:
# Start of a label block named "start"
label start:
    "A line of narration"

    # Start of an image block name "foo". 
    # It should be part of the label, but this statement 
    # don't return an entry for the AST, so it will be 
    # done only once, when Ren'py will generate the
    # images.
    image foo:
        "foo.png"
        0.1
        "bar.png"
        0.1
        repeat

    # The following lines are part of the label block. 
    # So, here I need to show an image.
    show foo
    # And here I'll display the text as a dialog line.
    "Another line of narration"
 
  • Like
Reactions: Rich

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,382
It would have been if the image statement was indented. But in your example you put it at the same level than the label one. Since Ren'py's parser works with block, you can't achieve the result you expected with this syntax.
You're correct, of course. Mea culpa. It would have been correct if there'd been another label after the image block to "introduce" the game-time code after the image statement, but I neglected that point. This is what happens when you try to bang out examples without actually testing them... LOL
 
  • Like
Reactions: anne O'nymous

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,024
@Bumbayskie
Looks like this got solved already and you're using Sublime. Something I'd highly recommend to do if you're using it for Ren'Py scripting:

Go to Preferences > Settings > right site > add the following line between the curly bracers:
"translate_tabs_to_spaces": true

Profit: never have Ren'Py complain again about tabs instead of spaces!

One of my fav. browser links about ATL, my grey cells always forget this stuff:
 
  • Like
Reactions: Porcus Dev