NeoLemmix > NeoLemmix Main

Secondary animations for triggered objects: Experimental version available

(1/12) > >>

namida:
https://www.youtube.com/watch?v=X4fwdCxnmOc

EDIT: Better video: https://www.youtube.com/watch?v=JVNiNPHUSwM

EDIT: Most up-to-date video: https://youtu.be/wutmgNuo-90

A long overdue feature. I just finished implementing it.

This allows objects like traps, teleporters, locked exits to have a constantly-animating component alongside the triggered animation. The constant component can either stop animating while the object is triggered, or continue regardless - this is a per-object setting. The animation always stops, in the case of a trap, if the trap is disarmed.

Uses for this include:
- Making traps stand out more
- Identifying disarmed traps without relying on clear physics mode
- Combining locked exits and exit decoration flames / lights into a single object
- Probably various artistic uses

The implementation is functionally 100% backwards-compatible. In terms of visuals, it may have oddities on older NL versions but will still be recognizable (unless the object's dual-animation design is really complex, perhaps). If an object with a secondary animation - even one that appears outside the object's original frame borders - is used in an older NL version that doesn't support secondary animations, the secondary animation simply isn't displayed. The primary animation still works fine, and the object will not be repositioned.


The attached experimental version will allow you to see this feature for yourself, as well as get an idea of how it's implemented for your own styles' usage. This experimental also contains several of the other recent fixes / changes, including the Shimmier skill.

To use this experimental build, first, set up a normal copy of (stable) NeoLemmix. Then, extract the contents of this ZIP over the top of it, overwriting any files if prompted. This includes some levels (under the "Single Levels" pack) which demonstrate these new animations.

It includes such animations for traps and locked exits in all official styles (including Sega), as well as all of my styles.

For those preparing their own styles - please see this post for information. Secondary animations are now supported with all visible-in-game object types, but some of the trigger conditions are only supported on certain animation types. Also note that masks are now replaced with secondary animations (which yes, can have the mask-like recoloring property); see default:owa_#### and default:pickup for examples.

Secondaries do not have to be the same size or have the same number of frames as the primary animation, and the primary can have a horizontal strip while the secondary has a vertical one (or vice versa).

As usual, no guarantees that any features in this experimental will remain as-is. I don't see the need for any further changes, though it's not exclusively up to me to make the final call on this. If you like the current state of this feature, make sure to express this, so that the development team as a whole know it's desired.

There is an experimental editor included as well. Please note - it's completely normal for this editor to take a long time to load the first time it runs, if NeoLemmix is also present - it's getting NeoLemmix to pre-render the combined graphic of any objects that have secondary animations.

If you add / remove / modify an object with secondary animations (or with recoloring on the primary animation), the editor does not automatically detect this and request a re-render of the graphic. The easiest way to get a re-render is to exit the editor, delete the "render" folder inside the "editor" folder, then run the editor - this will cause it to request re-rendering of all pieces it needs it for. Alternatively, for advanced users, you can use the command line arguments: "NeoLemmix.exe render -editor <style name> <style name> ...". These will make NeoLemmix re-render all objects in the specified style(s).

Remember, as is often the case: With great power, comes great responsibility. Use this feature in ways that produce neat artistic effects. Use this feature in ways that help clarify exactly what a trap or other object is or isn't doing. Don't use this feature in ways that are intended to be deceptive.

Crane:
The trouble with the example video shown is that it looks like the flashing light is just a second object behind the bear trap.  If it, say, turns off when the trap is disarmed, then it's a little more convincing.

One thing I wondered if was possible is to have a fire trap that only animates if a lemming is being fried by it.  For example, an innocuous nozzle (no animation, or extremely basic) that suddenly emits a menacing blue and green gas flame (think a gas cooker) when a lemming walks on it, without switching off until there are no more lemmings.

namida:

--- Quote ---The trouble with the example video shown is that it looks like the flashing light is just a second object behind the bear trap.  If it, say, turns off when the trap is disarmed, then it's a little more convincing.
--- End quote ---

It does. See the second video I've added. :)

Also, look closely at the animation when the trap is in use vs when it's idle - it doesn't blink green when the trap is busy. Of course, for some objects / animations it makes more sense if the animation does continue - so see how the boulder trap works in the new video. In both cases, the animation stops if the trap is disarmed.

Flopsy:
Looks really good this does namida :)

I'm excited to make use of this feature in my Sonic tilesets, is there anything I can do to prepare my tilesets for this feature. Like how would I make the image strip now with respect to these changes?

namida:

--- Quote from: Flopsy on May 02, 2019, 11:29:03 PM ---Looks really good this does namida :)

I'm excited to make use of this feature in my Sonic tilesets, is there anything I can do to prepare my tilesets for this feature. Like how would I make the image strip now with respect to these changes?

--- End quote ---

Create the graphic strips as if you were creating two objects that always get placed together. They don't have to be the same size or have the same number of frames, but the relative position needs to always be the same - eg, the second one could be placed at an offset of 10 to the right and 5 down from the first one, as long as it's always placed at that offset (or the flipped / inverted / rotated equivalents, where applicable). The second one can either appear in front of or behind the first one; the way this feature works allows for either, at the object creator's choice.

Old info. See later in this topic for up-to-date info. (click to show/hide)In the secondary animation, Frame 0 is always the one that will be displayed if / when the animation is stopped.

In terms of the main object, this is primarily intended for use with traps (including single-use traps), teleporters / receivers and locked exits. However, it's also supported for unlock buttons, splitters, entrances and pickup skills. The secondary animation is always a constant animation, although it always stops if the object is a trap and the trap gets disabled.

That aside, you can configure the following options:
- The relative position of the secondary animation from the first
- "SECONDARY_ALWAYS_ANIMATE" flag - if this is on, the animation doesn't stop while the object is active (eg. a trap killing a lemming, or a teleporter in progress, or a single-use trap that's been used). The animation still always stops if it's a trap that gets disarmed by a disarmer.
- "SECONDARY_IN_FRONT" flag - if this is on, the secondary is drawn in front of the main animation; otherwise it's drawn behind it
- "SECONDARY_INSTANT_STOP" flag - if this is on, then if an event causes the secondary animation to stop, it instantly jumps back to frame 0; otherwise, it completes the current animation cycle then stops upon reaching frame 0

I'll hopefully be able to get an experimental build that includes this feature up soon. I want to prepare secondary animations for at least the offical graphic sets first - I'll cover the Lemmings Plus sets later, probably before any stable release but after an experimental one.

I've implemented this in a way that's pretty forwards and backwards compatible. If you were to take an object that has a secondary animation, and load it in an older version of NL that doesn't support these, the object would be perfectly functional and the main animation would display correctly, you just wouldn't see the secondary animation. If you were to take an object without a secondary animation and load it in the new version that does support secondary animations, the object will work exactly the same way as it would in the older NL versions - secondary animations are optional, so it's no problem if an object doesn't have one.[/sort]

Navigation

[0] Message Index

[#] Next page

Go to full version