I just realized something..

I come from making games with algols where queuing animations used this awkward kind of setup:

.then(() => {}).then(() => {})

Even back then it felt shitty to work that way but it was all I ever known, and over time I'd read about continuations, or stringing along an env variable, fussing with callbacks, it was just all bad, but you learn to live with it.

In catlangs, animation is absolutely seamless:

this then that

It is a valid way of sequencing animation functions because the atoms of a catlang can be concatenated. It's the ultimate scheme for doing gamedev animation in my opinion.

Anyhow, You wouldn't NAME a VARIABLE.

@neauoire can I see a snippet of code on how this works ? I’m curious !

@mario_afk Sure! For example, here's the event that triggers when the last card on play is picked up.

the code: https://paste.sr.ht/~rabbits/11a769a87150e38a3936f592bc340f37d563ace6

down-animation.start() plays the pulldown animation
hand.new() draws a new hand while the cards are offscreen
back-animation.start() brings them back

The important bit is that there is no special syntax for async code even tho the program moves between a button event, to a screen animation, and back.

in context: https://git.sr.ht/~rabbits/donsol-hd/tree/master/item/src/donsol.tal#L346

@neauoire it looks great! Thanks :)