[Suggestion][Player] Apply recolouring scheme to trap animations

Started by Strato Incendus, March 23, 2020, 11:48:28 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Strato Incendus

So far, trap animations always affect default lemming sprites. Of course I know it's probably impossible (or not technically impossible, but an unreasonable amount of additional work for little benefit) to transfer all existing trap animations to include those sprite types with genuinely different shapes (i.e. X-Mas sprites, Lemminas, and Millas).

But for all the sprite sets that merely recolour the default sprites, would it be possible to apply the recolouring scheme to those animations as well?

Naturally, since every trap animation looks vastly different, this couldn't be as straightforward as saying "recolour the lemming's hair to A, recolour the clothes to B" - or at least I think so. Rather, it would have to be referential. Meaning: Have the game look for the specific colour codes of the default sprites in every trap animation, and whenever it detects green, it recolours it with whatever the recolouring theme set for hair colour; whenever it detects blue, it recolours it with whatever the recolouring theme set for clothes colour; and whenever it detects white / lemming skin tone, replace that colour with whatever has been set in the theme file for lemming skin.

This could then also be applied to athletes walking into traps. Currently, even when just using default sprites, any athlete walking into a trap immediately looks like a regular lemming again.

I have no idea how much effort this would take, whether it would be easy to code or too much to ask. But I thought this might be something that slipped under the radar, since for the longest time there was no recolouring feature, and therefore, nobody considered addressing this, because it all would have had to be done by hand.

Now that we have recolouring, maybe it's possible to extend the number of animations recolouring affects? If so, this might be another thing we would want to get sorted out before "wrapping up" the final version of NeoLemmix.
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels

ccexplore

I might've remembered incorrectly, but I believe even in the traps that came with Lemmings and ONML, there are a few that do use white pixels, and possibly a few more that uses green or blue pixels, for the parts that are not the lemming being killed.  So a simple recoloring could also end up recolor part of the trap itself.  Not sure how prevalent the problem would be for custom styles.

Doing this properly would require re-doing some of the trap graphics to avoid said problem.  An ideal design would actually separate the graphics of the lemming getting killed from the trap itself, but that would mean redoing all the trap graphics in existence.

Perhaps in practice, the problem of parts of the trap getting recolored isn't as bad as I imagined.  I'll admit it is unfortunate that the lack of recoloring breaks how things look when a recolored lemming triggers a trap.

ccexplore

I realize I forgot to explain this part for some people:  in the original graphics for Lemmings and ONML, the graphics for the lemming getting killed in the trap is actually part of the animation graphics of the trap itself, rather than a separate graphic.  I'm pretty sure that's still the case for NeoLemmix since I don't recall any effort undertaken to separate out the trap graphics from the lemmings-killing graphics.

namida

QuoteI'm pretty sure that's still the case for NeoLemmix since I don't recall any effort undertaken to separate out the trap graphics from the lemmings-killing graphics.

This is correct.

QuoteAn ideal design would actually separate the graphics of the lemming getting killed from the trap itself, but that would mean redoing all the trap graphics in existence.

That's actually a lot more reasonable now that we have secondary animations. They'd still need to be seperated, but I suspect at least some of this can be automated - and of course, if this is made optional, it could be on a basis of "it happens on traps that are set up for it, while others behave like they always did".

This could have advantages elsewhere too: It would allow athlete / zombie / etc recoloring to be applied to the animation as well.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Quote from: Strato Incendus on March 23, 2020, 11:48:28 PM
So far, trap animations always affect default lemming sprites. Of course I know it's probably impossible (or not technically impossible, but an unreasonable amount of additional work for little benefit) to transfer all existing trap animations to include those sprite types with genuinely different shapes (i.e. X-Mas sprites, Lemminas, and Millas).

For Lemminas, I went into each of the trap animations (and teleporter/receiver animations, of course) and changed them manually. It wasn't as much work as you might think, but then I'm only using a handful of traps in my level pack. Potentially, if someone wanted to use the Lemmina sprites in their own level pack, they would currently only be able to use the traps that I've customised (or, customise their own if they want it to be consistent).

Saying that: my eventual goal is to have Lemmina versions of all the default traps, and maybe even a few of the custom ones as well. In fact, two of the traps in Lemminas are completely new animations: the "electricity block" taken from the Crystal set now melts the Lemminas rather than electrocuting them (check out the animation if you haven't already seen it), and the "zapper" from the Bubble set now sends them into another dimension (they disappear gradually). What other dimension, you ask? Well: that's where the sequel comes in! ;)

Quote from: ccexplore on March 24, 2020, 12:00:32 AM
Doing this properly would require re-doing some of the trap graphics to avoid said problem.  An ideal design would actually separate the graphics of the lemming getting killed from the trap itself, but that would mean redoing all the trap graphics in existence.

Quote from: namida on March 24, 2020, 12:10:36 AM
That's actually a lot more reasonable now that we have secondary animations. They'd still need to be seperated, but I suspect at least some of this can be automated

I agree with the idea that trap graphics should be recoloured as well, and it's good to know that it'd also be possible for athletes/neutrals/zombies, etc as well as regular lemmings.

So, I'm happy to offer to go through the default ones, find the pixels that crossover with the Lemming sprites, and recolour them manually so that they're different enough not to get affected by a recolouring algorithm. It wouldn't be that much work and I'd enjoy it as a mini-project.

Removing the lemming from the animation would be more work, to be honest, and would also make creating custom traps more difficult. If it's possible to do all of the various recolourings whilst keeping the lemming part of the main animation, I'd vote for this as the less-potentially-messy way to go.

Also, I think custom traps should be the responsibility of the style creator: make sure that the traps themselves don't contain any pixels that are the same colour as a lemming, and you're good to go. (Incidentally, I made sure whilst creating the custom Lemmina traps that none of the trap's pixels were the same as Lemmina colours).

The obvious question here would be: if an algorithm for trap recolouring is created, would it also be possible to implement it for custom sprite sets such as Lemminas that contain completely new sprites/colourings? I'm guessing it would be implemented into either the theme.nxtm or scheme.nxmi files...

GigaLem

Quote from: namida on March 24, 2020, 12:10:36 AM
QuoteI'm pretty sure that's still the case for NeoLemmix since I don't recall any effort undertaken to separate out the trap graphics from the lemmings-killing graphics.

This is correct.

QuoteAn ideal design would actually separate the graphics of the lemming getting killed from the trap itself, but that would mean redoing all the trap graphics in existence.

That's actually a lot more reasonable now that we have secondary animations. They'd still need to be seperated, but I suspect at least some of this can be automated - and of course, if this is made optional, it could be on a basis of "it happens on traps that are set up for it, while others behave like they always did".

This could have advantages elsewhere too: It would allow athlete / zombie / etc recoloring to be applied to the animation as well.

so something like "NAME_PART xNUMBER" that's used for the Theme files of the sets?

Since Teleporters and Receivers act like Traps but send lemmings somewhere else, should the same be applied for those too?

I apologize if anything I said in this example was said already but I figured I'd bring it up.

WillLem

Quote from: GigaLem on March 24, 2020, 06:22:46 AM
Since Teleporters and Receivers act like Traps but send lemmings somewhere else, should the same be applied for those too?

+1 for this: further to my above post, I'm happy to do the same manual-recolouring for default teleporter/receiver animations as well (i.e. those for which the teleporters/receivers contain lemming-coloured pixels). Since there currently aren't that many of these for the default styles, this won't be much work at all.

In fact, as an aside: would you like me to do some teleporters/receivers/locked exits for the default styles that don't yet have these?

Strato Incendus

QuotePerhaps in practice, the problem of parts of the trap getting recolored isn't as bad as I imagined.  I'll admit it is unfortunate that the lack of recoloring breaks how things look when a recolored lemming triggers a trap.

Yes, I thought so, that some traps would include those colours - but I thought recolouring those parts along with the lemming would be the lesser of two evils, compared to having a sudden switch of lemming back to default. ;) Also, most of these trap colours seem to be pretty arbitrary. The chameleon from the Rock tileset and the frog from L2 Outdoor almost certainly have different shades of green than standard lemming hair, and everything else looks more like a technical device that can be painted whatever way the designer chooses. The only thing that comes to my mind that might be exactly the same colour as lemming hair AND have a natural equivalent that requires this colour would be vine trap from the Rock tileset... though even that one may be slightly brighter than lemming hair.

Quote
Since Teleporters and Receivers act like Traps but send lemmings somewhere else, should the same be applied for those too?

Yes, of course! ;) Thanks for bringing this up, sorry, I completely forgot! ;) Anything that includes lemming sprites but isn't part of the standard sprite set.

The Drowner, as we know, is part of standard sprites, as if it were a skill, basically. I'm not sure about the Frier (=lemming walking into a fire trap)? The latter usually is harder to tell, because the lemming vaporizes so quickly that you barely see skin, hair, or clothes anymore anyway. But for the initial frames of the animation, it might be relevant.

QuoteSo, I'm happy to offer to go through the default ones, find the pixels that crossover with the Lemming sprites, and recolour them manually so that they're different enough not to get affected by a recolouring algorithm. It wouldn't be that much work and I'd enjoy it as a mini-project.

I appreciate your initiative, WillLem! ;) Hopefully we can still find a more savvy way to do this, so that we do not have to get back to your offer and save everyone (but mostly you) a lot of work.

I'm glad to see this suggestion is being met with positive resonance overall! :thumbsup:
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels