Map Tile Animation

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Map Tile Animation

Post by The Wobbler »

What's the cleanest, easiest way to do tile animation with more than five tiles/frames? Developer dudes, any chance of expanding the basic tile animation functions?
User avatar
kylekrack
Liquid Metal Slime
Posts: 1243
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I've heard of using both animation patterns and freezing on one while beginning the other, on two different layers. Does that make any sense? Eh, someone else'll come up with something better anyway.
My pronouns are they/them
Ps. I love my wife
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Re: Map Tile Animation

Post by Mogri »

The Wobbler wrote:What's the cleanest, easiest way to do tile animation with more than five tiles/frames? Developer dudes, any chance of expanding the basic tile animation functions?
If you dedicate an entire tileset, you can cycle through the whole tileset with just a "right 1, wait 1" animation. Super Penguin Chef does this in the Chickendome dungeon for the green scanline in the background, and Timpoline does it in the EX levels for the "tortured souls" background.

It's a problem if your animation frames aren't a factor of 128, since you'll need to stutter a couple of frames to get it to align, but it's not that big a problem.
User avatar
The Wobbler
A Scrambled Egg
Posts: 2817
Joined: Mon Oct 15, 2007 8:36 pm
Location: Underwater
Contact:

Post by The Wobbler »

That sounds worth trying, good call boss.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Re: Map Tile Animation

Post by TMC »

Mogri wrote:If you dedicate an entire tileset, you can cycle through the whole tileset with just a "right 1, wait 1" animation. Super Penguin Chef does this in the Chickendome dungeon for the green scanline in the background, and Timpoline does it in the EX levels for the "tortured souls" background.
Wow, I didn't think anyone would actually do that. Note that this onyl works if you use up all the slots in the pattern so that there's no "end of animation" command (which resets the offset)

There's another way: you can script your own animation patterns using set tile animation offset. For example if you want an 8 tile long animation for pattern 0 for the tileset for layer 2, you could write

Code: Select all

while (true) do (
  for (i, 0, 7) do (
    if &#40;current map <> map&#58; whichever map&#41; then &#40;exit script&#41;
    set tile animation offset&#40;0, i, 2&#41;
    wait&#40;1&#41;
  &#41;
&#41;
And make sure to set an empty animation pattern in the editor so that they don't conflict.
Last edited by TMC on Wed Jan 28, 2015 11:59 am, edited 1 time in total.
Post Reply