[?][SUG][PL/ED] Change Color/Transparency of trigger area

Started by GigaLem, June 13, 2025, 11:23:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

OK, finally got around to having a look at the code for this today.

Editor:

This is very easy. The Editor simply draws a semitransparent magenta pink rectangle. By swapping which of the ARGB channels are drawn at 255, we can have semitransparent cyan, yellow or mint green.

I'm sure that by messing about with this value, other colours could possibly be achieved. We choose one that works, implement the option. Not a problem.

Game:

This is much more convoluted. The trigger area is drawn pixel-by-pixel in a chequered grid pattern, and so is actually composed of at least 2 colours. The first colour is the #FF00FF pink, and the second is dynamically calculated from this (but is hue-dependent). Then, triggers can overlap terrain, steel, and other triggers. In each of these cases, the colour is either re-blended or simply drawn as a new colour.

So, it wouldn't be a simple case of just changing the #FF00FF value as I'd hoped, and would in fact require a more detailed recalibration of all the various overlapping and intersecting pixel colours. Granted, there are only a few to consider, but it would have to be done for each individual base colour.

For that reason, I'd be happy to consider implementing a single alternative colour option (as opposed to several alternatives) for the game engine, but I'd ideally want that colour to be chosen and specified by the OP (GigaLem) so that I can simply go about working it into the various required sub-colours to make sure it works as a viable option.

Multiple colours are unfortunately out of the question. Even if I could find some way to automate every possible configuration from a single base colour, that goes way beyond the desired scope of this feature, which is (as I understand it) simply to provide a less harsh-looking alternative to the pink. This can simply be agreed upon beforehand, worked in to the existing code, and presented to the end user as an A/B option.

Meanwhile, drawing unfilled rectangles would require significant re-writing of the code that draws the trigger areas, which is not something I'd be happy to take on at this point. I'd prefer to rule that out altogether and go ahead with a comparatively simpler trigger recolouring.

So, Giga, we need to know what would work for you as an alternative colour. Ideally, please present it either as a .png image or a hex code (e.g. FF00FF) and I can take it from there.



(Note to self: Editor - BmpModify.cs line 188)
(Note to self: Game - LemRendering.pas line 2834)

GigaLem

I couldn't answer this earlier but for the whole In game color. I feel you're gonna need more than my choice to decide. I can say the Baja Teal for ingame if I really want to but I want to know other's input if Baja Teal is a favorable choice, or if there's something else that contrasts without being too bright or hard on the eyes. Not to mention accessibility issues considering if say someone is colorblind, but thats another discussion.

Simon

Quote from: WillLem on October 25, 2025, 10:01:13 PMit wouldn't be a simple case of just changing the #FF00FF value as I'd hoped
Quote from: GigaLem on November 04, 2025, 12:29:36 AMyou're gonna need more than my choice to decide.

During clear physics mode, lemmings are dark blue, which is too dark. Whatever you do for trigger areas should match/allow future fixes for lemmings.

See, e.g., the ideas for defaults from Abolish color cycling, pick good non-clashing colors. If you (WillLem) are about to paint yourself into a corner with the trigger areas, keep those other issues in mind.

How urgent are different trigger area color in the game anyway? All the time, I thought Giga's bug report here was about the editor only. And now WillLem wants to change the game even in light of these new design hurdles.

-- Simon

WillLem

Quote from: Simon on November 04, 2025, 05:09:24 AMHow urgent are different trigger area color in the game anyway? All the time, I thought Giga's bug report here was about the editor only

Good point, the topic is indeed marked for the Editor. That would be an easy change. Maybe we simply leave the Player as it is?