Can enemy death animations be used for other things?

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Can enemy death animations be used for other things?

Post by sheamkennedy »

I really like some of the death animations, specifically melt, phase out, vapourize, and flicker. Is there any way these could be used for other slices in the game?

I see great potential in using some of these for animating the way in which NPC's, map slices, etc react in my game when I want to show them being destroyed or damaged.

Can this be done? Or is there some resource code I can use to mimic these animations for use on specified slices?
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

This cannot be done yet, but it is definitely something we want to add.

I think when it happens, it will probably work something like this

Code: Select all

dissolve sprite(sl, dissolve:melt)
wait for dissolve(sl)
Also, I expect that we will have to disable "set sprite frame" while the sprite is dissolving, or perhaps using "set sprite frame" or otherwise changing the sprite would just cancel the dissolve.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Bob the Hamster wrote:This cannot be done yet, but it is definitely something we want to add.

I think when it happens, it will probably work something like this

Code: Select all

dissolve sprite(sl, dissolve:melt)
wait for dissolve(sl)
Also, I expect that we will have to disable "set sprite frame" while the sprite is dissolving, or perhaps using "set sprite frame" or otherwise changing the sprite would just cancel the dissolve.
That sounds awesome! Really exciting stuff.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I want an interface to set a sprite as a particular fraction of the way through a dissolve animation. Most obvious would be to use the same 'current frame number', 'total frames of animation' used in the enemy death settings.
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

Oh that would be absolutely sick.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Dissolve animations are now available for sprite slices in the current nightly wip builds

Code: Select all

variable(sl)
sl := load large enemy sprite(0)
dissolve sprite(sl, dissolve:crossfade)
wait for dissolve(sl)
free slice(sl)
The above example does a simple fade just like what you would see when an enemy dies in battle. You can see a list of dissolve: constants in the plot dictionary.

You can also customize the speed of the fade

Code: Select all

#melt over 50 ticks
dissolve sprite(sl, dissolve:melt, 50)
And you can make a dissolve start halfway through:

Code: Select all

dissolve sprite(sl, dissolve:random scatter, 50, 25)
Or you can make a dissolve run backwards:

Code: Select all

dissolve sprite(sl, dissolve:melt, dissolvetime:default, 0, true)
You also have the option of setting a sprite to a partially dissolved state, and leaving it there. This example sets the sprite to be 25% melted:

Code: Select all

dissolve sprite(sl, dissolve:melt, 100, 25, false, false)
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Bob the Hamster wrote:Dissolve animations are now available for sprite slices in the current nightly wip builds

Code: Select all

variable(sl)
sl := load large enemy sprite(0)
dissolve sprite(sl, dissolve:crossfade)
wait for dissolve(sl)
free slice(sl)
The above example does a simple fade just like what you would see when an enemy dies in battle. You can see a list of dissolve: constants in the plot dictionary.

You can also customize the speed of the fade

Code: Select all

#melt over 50 ticks
dissolve sprite(sl, dissolve:melt, 50)
And you can make a dissolve start halfway through:

Code: Select all

dissolve sprite(sl, dissolve:random scatter, 50, 25)
Or you can make a dissolve run backwards:

Code: Select all

dissolve sprite(sl, dissolve:melt, dissolvetime:default, 0, true)
You also have the option of setting a sprite to a partially dissolved state, and leaving it there. This example sets the sprite to be 25% melted:

Code: Select all

dissolve sprite(sl, dissolve:melt, 100, 25, false, false)
This is the coolest news I've heard in a long time. Anyone planning to enter the Halloween contest should take note of these commands!
User avatar
FnrrfYgmSchnish
Metal Slime
Posts: 741
Joined: Thu Jun 18, 2009 4:37 am
Location: Middle of Nowhere

Post by FnrrfYgmSchnish »

Whoa. This is great news. Now we have a quick way for scripts to make neat-looking "NPC teleporting" or "NPC fading out and dying" effects without needing to script the flickering or make separate walkabouts or anything like that. Also, for those who do custom battle systems, having access to the default death animations should be pretty useful.

I was actually just thinking about possible other uses for the death animations the other day, after seeing the earlier posts in this thread. These were my first few thoughts:

1: "Target animation" option for attacks. One setting ("null") can replace the current "target never flinches when hit" bitset; there'd also be "flinch" for the current behavior, a "spin" setting which is like "spinstrike" attacker animation, and also at least some (if not all) of the enemy death animations. Like the "squash" enemy death animation for a "heavy stuff falls on the target" attack, for example, or "sink into ground" used for a black hole/pit trap/etc. sort of attack. If the target's an enemy and actually dies from the attack, then this replaces their normal death animation; if not, they pop back to normal after the attack's over.

2: Some new attacker animations that make use of the enemy death animations. "Sink into ground" and "emerge from ground" could be like the underground equivalent of Jump/Land. On a similar note, "vanish" and "reappear" animations--basically like the current Teleport attacker animation, but split into two parts like Jump/Land is currently. It'd be neat to be able to choose which fade-out animation is used for the "vanish" animation--instantly disappearing, flickering out, crossfade, phase out, etc. could all be options.

3: And while we're on the topic of death animations, a "split in half" death animation might be nice to have. I'm reminded of FF6 where the Odin summon would cause enemies affected to get cut in half and killed instantly, and it actually showed the enemy sprites slide apart into two halves and then fade out when it happened. Maybe even several options for this (vertical, horizontal, diagonal splits?)

4: And similarly to the above--the ability to choose what death animation to use on a per-attack basis rather than just per-enemy. Like forcing the "phase out" animation for a "teleport the enemy away" type move, or slashing attacks using the "split in half" animation I mentioned. Enemies could have an "override attack death animations" bitset in the case of those that you don't want this to happen for, of course (showing opponents who don't actually die after the fight getting cut in half would be a bit odd, after all. XD)
Last edited by FnrrfYgmSchnish on Tue Sep 30, 2014 7:39 pm, edited 1 time in total.
FYS:AHS -- Working on Yagziknian NPC walkabout sprites
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Not to instantly jump in with a million requests, but it'd be cool to get some choice in how the animations play out too. Choosing which corner it should diagonally vanish from, whether it should crossfade from the bottom-up or the top-down, things like that.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Yes, I really would like to add parameters to several of them. There are just so many arbitrary choices in the animations.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I just realized how convenient this would be for my current endeavors in making a battle system. It'd be cool to add in some extra animations for enemy deaths. I support this feature!
My pronouns are they/them
Ps. I love my wife
User avatar
Spoonweaver
Liquid Metal King Slime
Posts: 6461
Joined: Mon Dec 08, 2008 7:07 am
Contact:

Post by Spoonweaver »

Can we also have battle scripting.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Hahaaaa.....

Yeah, I'm in too deep to want battle scripting now.
My pronouns are they/them
Ps. I love my wife
User avatar
Urkelbot666
Slime Knight
Posts: 188
Joined: Sat Oct 18, 2014 5:29 pm

Post by Urkelbot666 »

This is actually an awesome thread! Lots of great ideas in here. It relates a little to something I have wondered about for a while as well. That being implementing an on-death, or elemental attack-damage animation (maybe even something linked to flinching) that would switch palettes for an attack hit or death.

have an enemy flicker to red or black and white, when hit with certain attacks, or something additional to the death animations. The only examples I can think of at the moment would be in FF5, or 6, (can't remember right now) in which enemies turn a dark purple before fading out in death, and bosses that dissolve in orange or red.

Also, I was wondering if there are palette swapping attacks already included for, say status ailments. Greying someone out when "turned to stone" or something.
User avatar
shakeyair
Slime Knight
Posts: 217
Joined: Fri Jun 12, 2009 6:15 am

Post by shakeyair »

:o

Can you do it with backdrops?!
Post Reply