Dissolve Animations

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Dissolve Animations

Post by kylekrack »

I don't know if anyone has done anything with these, but I put together a demonstration to show how the dissolve animations can be strung together forwards and backwards to make fluidly recurring animations. They aren't much special, but they may give you some ideas for uses in-game. They could be used alongside walktall scripts to give NPCs nice idle animations. Or animate trees, or other objects, or well.. anything really.

http://www.slimesalad.com/forum/viewgame.php?p=119058
My pronouns are they/them
Ps. I love my wife
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

Rad! I love these. I'll have to keep this in mind for future art assets.
User avatar
Master K
King Slime
Posts: 1899
Joined: Sat Jun 11, 2011 9:40 pm
Location: A windswept rock in the Atlantic Ocean

Post by Master K »

Oh dang, that's really cool!
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I added a separate sprite in front of the fairy that is just the body so the wings appear to move independently. The body doesn't get squished this way, but it looks a bit odd.

I was also considering using the flickering dissolve pattern to have a ghostly ghost look even more ghostly. Ghost. You could also randomize the timer length and have it make a nice lightning effect.

I attempted to make the walkabout sprite of the hero animate as well, but it didn't work. No error message, so I assume the sprite just can't be manipulated without messing it up? I'm not sure. Either way, you could draw a sprite over the walkabout and animate that instead, but that would take a bit more scripting.
My pronouns are they/them
Ps. I love my wife
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Slick! I like this!
kylekrack wrote:I attempted to make the walkabout sprite of the hero animate as well, but it didn't work. No error message, so I assume the sprite just can't be manipulated without messing it up? I'm not sure. Either way, you could draw a sprite over the walkabout and animate that instead, but that would take a bit more scripting.
It is definitely possible to manipulate hero walkabout sprites using slice dissolve commands.

How were you getting the slice handle for the hero?

When I played the game I saw a repeated script error about an invalid slice handle, and I had to disable errors to keep playing.

I am guessing you are playing with script errors disabled, and that you are not using the most recent nightly.

The most recent nightly always display all script errors when you play via "Test Game" and it always hides most script errors when you export your game via "Distribute Game"
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I used get hero slice(me) but reading the dictionary is showing me that's not the way to get the sprite slice. Opps!

Will getting the first child of the hero slice be appropriate?

EDIT: Well, it works. This is actually pretty nice. Maybe you could make an idle animation for when the player isn't moving this way.
Last edited by kylekrack on Fri Oct 16, 2015 4:09 pm, edited 1 time in total.
My pronouns are they/them
Ps. I love my wife
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

So currently you are doing this, right?

Code: Select all

sprite := first child(get hero slice(me))
That might work at the moment, but it is not the most safe reliable method. Just because the walkabout sprite is the first child right now doesn't guarantee that it will always be in the future (and in fact, I think it might already fail for vehicle NPC walkabouts because the vehicle shadow sprite will come first)

The safe and reliable way to get the sprite is this:

Code: Select all

sprite := lookup slice(sl:walkabout sprite component, get hero slice(me))
That will always work in all future versions.

If you are checking for the walkabout of some other hero in the party, not the "me" leader, you might want to make it even safer:

Code: Select all

walk := get hero slice(3)
if(walk) then(
  sprite := lookup slice(sl:walkabout sprite component, walk)
)else(
  # no hero exists in rank 3 of the caterpillar party
)
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Yes, that's the line I have currently. And yeah, I imagine it would not be a safe way to do things. I wasn't sure how the slice tree of heroes and NPCs worked. Thank you for clarifying.
My pronouns are they/them
Ps. I love my wife
Post Reply