ATL

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

ATL

#1 Post by Jake »

I don't know how feasible this is, I've not looked into how ATL is implemented, but I've been trying to use it a lot recently, and mostly finding that it's no good for what I want... because it seems an ATL transform overrides every single positional property of the thing it's applied to.

For example I was trying to get a [small] thing that I had displayed at an arbitrary Position() on-screen to bob slightly; I tried something along the lines of:

Code: Select all

transform bob:
  xanchor 0.0
  ease 0.5 xanchor 1.0
  ease 0.5 xanchor 0.0
and it bobbed fine... except it also moved immediately to the top-left corner of the screen along with everything else I've tried to apply ATL transforms without specifying both xalign and yalign explicitly. Since I wanted a generic transform that could bob a thing wherever it was on the screen, ATL didn't seem to be able to do what I wanted at all. Since it went into Ren'Py I've had many occasions to think it was what I wanted, but I'm only really using it for trivial character-sprite-positioning. Is it potentially possible to have something like ATL that doesn't change the values of any properties it doesn't explicitly set, so it's actually more generically useful? As it is, it seems it's only really useful for one-off transforms where you have a thing at a very specific point on the screen and you know exactly in screen coords where you want to move it to...
Server error: user 'Jake' not found

number473
Regular
Posts: 195
Joined: Tue Dec 15, 2009 4:20 am
Projects: The Duke's Daughter
Location: Cape Town
Contact:

Re: ATL

#2 Post by number473 »

The problem comes in in mixing ATL with other transforms. If you define the position using ATL to begin with, it should work fine. It seems to be necessary to explicitly declare the position of a displayable *in ATL* or it defaults to the top left.
Mental weather report: Cloudy with a possibility of brain storms.

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: ATL

#3 Post by Jake »

number473 wrote:The problem comes in in mixing ATL with other transforms. If you define the position using ATL to begin with, it should work fine. It seems to be necessary to explicitly declare the position of a displayable *in ATL* or it defaults to the top left.
If this is the case, then the "[t]here is no way to create ATL code programatically" is my problem.

(I also suspect that this is a lie, since I expect the ATL statements most likely have some internal representation and it's just a case of finding out what that is and replicating it, but I'm not going to go to such lengths.)
Server error: user 'Jake' not found

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: ATL

#4 Post by PyTom »

Actually, there explicitly isn't a way to create ATL programatically. If you're going to create a transform in Python, you should just use Transform, which has the same capabilities as ATL.

(Thinking about the original problem, I do think that there's something of a problem here. I'm not yet sure how to fix it, which is why I've been quiet about it.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users