Poll

For SuperLemmix, should steel be "always steel" or "only when visible on the top layer"?

It should be only steel when visible on the top layer, for any reason other than that it will break existing NL content (please reply with your reasoning if you choose this)
2 (22.2%)
It should be only steel when visible on the top layer, because otherwise it will break existing NL content
3 (33.3%)
I don't mind either way
1 (11.1%)
It should be always steel, because that makes more sense visually to a new player
1 (11.1%)
It should be always steel, for any reason other than that it makes more sense visually to a new player (please reply with your reasoning if you choose this)
2 (22.2%)

Total Members Voted: 9

Voting closed: June 14, 2023, 04:02:25 PM

Author Topic: [SUG] Steel is always steel, even if it's partially behind terrain  (Read 3887 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile


I really can't decide on this one... :forehead:

I made a very silly video a few years ago (back when my beard was huge!) which more or less sums up the problem I have with "steel is only steel when it's visible" - basically, despite it being a much more consistent way to handle steel areas in a level (I can fully admit that it removes the need for CPM in all but the most trollish and/or visually unclear levels), it's also very unintuitive to anyone who isn't yet familiar with this particular steel behaviour.

Moreover, it also doesn't prevent steel from being used in a trolly way; it's still possible to make steel pieces that don't look like steel, terrain pieces that do, and it's even possible to do this using the official styles (group a steel block with a bunch of erasers so that only 1px of not-metal-coloured steel is visible, and then use that pixel to build a steel area, etc). So, whilst it might be a tad more cumbersome to troll a player with hidden/disguised steel, it is still possible. Here's an example (from the Crystal set) - see if you can guess which is the steel piece:



What we have now is better than the OGs either way: no longer do we have those problematic "steel areas" that need to be managed separately: a steel piece is simply labelled as steel and that's that. Much better!

The question then becomes: should it always be steel, or sometimes not be steel if it's overlapped with destructible terrain? The answer is, really - "it depends", which means that it's very difficult to make a decision on this.

If we keep it the way it is, then steel can sometimes be seemingly destroyed, which to me doesn't feel right even though I'm familiar with the behaviour and understand its implementation and purpose. It feels better to have the steel behave as expected and not be destructible at all, wherever it may exist in the level, and whatever is overlapping it.

However, if we change it to "always steel" behaviour, then suddenly it becomes necessary to use CPM to see exactly where the boundaries are, and this isn't something that feels right either. Even if CPM were removed from the game (which Classic Mode does), it becomes a possible source of unnecessary frustration again to the "picture puzzlers", who prefer everything to be exactly as it seems right from the beginning.

It could absolutely be argued, though, that a partially-obscured steel block being destructible in only that obscured area gets more and more "not as it seems" the smaller the obscuring area is - especially if it's a 1px-wide thread cutting through the centre of the steel block, for example.

Ultimately, it's a chase-the-tail argument which doesn't really have a way to keep both points of view satisfied.

What might be worth looking into is whether the terrain-over-steel can be destroyed, revealing the previously-obscured steel block underneath (for example if a bomber or basher is assigned close enough for the destruction mask to make contact with the overlapping terrain). This would certainly look a lot better, but doesn't completely address the associated concerns. I'm also not 100% sure how to handle this; it perhaps becomes necessary to draw the steel onto another layer (or maybe draw it twice - once as destructible terrain, and again on a deeper layer as actual steel...?)

Basically, I need help with this one; it's not a clear cut case either way from my point of view, and so feedback is going to make a big difference on which way this one swings. All I'd ask is that you think of this from a fresh, conceptual, aesthetic and gameplay-oriented perspective rather than tying the argument up with concerns about existing content or sameness with any other Lemmings clone, port or engine.

---

NOTE: Programming-wise, this change comes down to a single word in the entire code - so, it wouldn't be out of the question to trial the proposed "steel is always steel" behaviour for a while and see how we like it. Changing it back would take seconds.
« Last Edit: March 09, 2024, 09:59:27 PM by WillLem »

Offline Simon

  • Administrator
  • Posts: 3954
    • View Profile
    • Lix
It's not necessarily a binary problem, even though your two solutions are the simplest.

An attempt at an alternative rule: A pixel of a steel tile remains steel unless { it is covered by earth pixels in such a way that it isn't anymore in the convex hull of { other uncovered steel pixels of the same steel tile }}.

This sounds costly to compute and depends on rounding decisions when we compute the lines (the convex combinations of uncovered steel pixels) that aren't necessarily horizontal or vertical. But sounds like it does roughly what you want.

Or, to avoid computing convex combination lines that aren't vertical or horizontal, we can define: A pixel of a steel tile remains steel if it remains in the smallest possible rectangle (with vertical and horizontal borders) that still encompasses all uncovered pixels of the same steel tile.

Examples:
  • Both ideas resolve the video's banana to keep the steel block fully intact.
  • Your white thin diagonal line keeps the steel block fully intact.
  • Mesh can't dent the steel under the smallest-rectangle rule.
  • Mesh may dent a corner under the convex-hull rule.
  • Sticking a steel block halfway into a large earth clump cancels half of the steel.
  • Outright hiding an entire steel block cancels all the steel.
I'm not sure if either is so much more intuitive. Certainly both are more complex than always/never turn earth-overlapped steel into earth. I have a weak preference to stick with one of your two solutions.

-- Simon
« Last Edit: June 09, 2023, 05:33:12 PM by Simon »

Offline Crane

  • Posts: 1128
    • View Profile
This is a difficult one.  There are cases where one or the other is ideal.  For example, on the dirt tileset especially, one might want to put moss over the steel plates for decoration, but have the steel take priority (I also do a similar thing in "Deep Freeze" with non-steel terrain looking like ice over the steel, but is still clearly steel plating).  Other times, I may only want the visible steel to be treated as such, like if I've bisected it with, say, a diagonal piece of terrain in the crystal tileset.  I would personally say it should be a per-level setting (e.g. the old "simple autosteel" option).

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
A pixel of a steel tile remains steel if it remains in the smallest possible rectangle (with vertical and horizontal borders) that still encompasses all uncovered pixels of the same steel tile.

Yes, I like this - especially if doing so will delete steel that's completely covered, and partially delete steel that's partially covered in a comprehensive enough way, such as in Crane's bisection example.

With it being a rectangular check, would this also work for diagonal coverage? Any chance you wouldn't mind helping me to figure out how to do this with the existing code structure (maybe we can look at it at the same time as the zooming bug!)?

I may only want the visible steel to be treated as such, like if I've bisected it with, say, a diagonal piece of terrain in the crystal tileset

You could still achieve this by first erasing the steel, then overlaying the terrain. I personally think this is an acceptable enough workaround, but others may feel this constitutes unfair design... it seems better, then, to give Simon's idea a try and see if it can allow for this type of steel coverage.

I would personally say it should be a per-level setting (e.g. the old "simple autosteel" option).

I agree to some extent, but ultimately this needs to be a game-wide thing or it will become way too difficult to manage - not just from a programming perspective, but a gameplay perspective as well. Players would never know what to expect from steel on any given level, which is not a good thing; this is something I think NeoLemmix's autosteel behaviour absolutely gets right, in that at least steel always behaves exactly the same on every level.

We want SuperLemmix steel to be as predictable as possible game-wide, whilst allowing for a more aesthetically-pleasing and intuitive solution to the problems presented in the OP.

Let's give Simon's idea a try; maybe it can calculate overlap to a decent enough pixel margin.

Offline Turrican

  • Posts: 361
    • View Profile
In any , case , I would personally like, for steel , to still properly be able , to be combined with eraser pieces, so level designers , can still give steel pieces the shape they want , by simply combining steel pieces , with eraser pieces, and also , by grouping steel pieces and eraser pieces, using the group function.
My Youtube channel ( Turrican Lemm )  :
https://www.youtube.com/channel/UCYGFBOHdYITHlsqa203Tu8Q

Offline Floyd Brannon

  • Posts: 41
    • View Profile
I'm pretty much a player exclusively, not a level designer. But I chose that last option. Cutting through steel seems like a gimmick to me.
But I could have chose the second to last just as easily. I'm not very into the super hard levels and don't like surprise steel, but I like backward-compatibility too and I watch my share of replays that help with tricky levels.

But I'd say I'm somewhere in the 4-5 zone here.

I look forward to each new release. Also, Neolemmix takes my PC about 15 seconds to load and Super Lemmix loads in about 3. I've noticed alot of polish on things like that and the little graphics updates and the level menu. [vinetrapper too!] Looks and feel very clean.

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
I would personally like, for steel , to still properly be able , to be combined with eraser pieces ... using the group function.

Yes, don't worry - piece grouping will always be available.

Neolemmix takes my PC about 15 seconds to load and Super Lemmix loads in about 3

Thanks for your vote and kind comments! :lemcat:

A question regarding this particular comment, though: how many level packs do you have loaded into SuperLemmix compared to NeoLemmix? I find that, with NeoLemmix, loading times get longer and longer the more packs I load in (and the more level completion data there is to load). Since we don't have many packs yet for SuperLemmix, I wonder if it will eventually start to suffer from the same drag when loading a lot of packs into the player...

Offline jkapp76

  • Posts: 393
    • View Profile
I can help verify... at least with my equipment that SLX loads considerably faster than Neolemmix.

I have every available pack installed in Neo, and I have converted every available pack for SLX and installed them there too.
My computer should be a pretty good test for this load-speed thing. However, I will say that Neo loads at an acceptable speed
for me. It probably takes 8-10 seconds, but after loading it's fine. SLX loads in about 2-3 seconds. I sometimes wish Neo could
share some of the level selector improvements.
« Last Edit: June 10, 2023, 02:47:16 PM by jkapp76 »
...Jeremy Kapp

Offline Turrican

  • Posts: 361
    • View Profile
Quote
Yes, don't worry - piece grouping will always be available.

Ok! That's nice! Also, will this also apply , to normal steel - eraser combinations ?
My Youtube channel ( Turrican Lemm )  :
https://www.youtube.com/channel/UCYGFBOHdYITHlsqa203Tu8Q

Offline Dullstar

  • Posts: 2095
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
I've already stated my reasoning in more detail in Discord, but summarizing here:

While the NeoLemmix behavior may not neccesarily be what newcomers would expect, it only needs to be learned once. After that, it is completely unambiguous: there is no guesswork as to exactly what is and is not steel, and thus no nasty surprises once the player has learned the rules. Any other reasonable behavior means that every instance of overlapping terrain + steel must be assessed individually and/or that CPM must be used to ascertain the steel boundaries.

Thus, the existing NeoLemmix behavior is the best solution.



That said, I get the desire to be able to decorate steel. Simon's proposed solution is a good general solution, I think, though presumably two adjacent steel tiles should be treated as one for this purpose.

A simpler alternative might be to allow styles to mark some pieces as being primarily decorative, such as moss pieces in orig_dirt. These pieces could be overlaid on steel and wouldn't turn it into non-steel, while normal terrain pieces would. It would be less consistent, however... but presumably there wouldn't be particularly many pieces marked as such and it would be obvious something weird is going on if someone tries to abuse it (this assumes that standard styles get vetted to make sure the choices they make are reasonable, of course, but new styles aren't super frequent so I don't think that will be an issue).
« Last Edit: June 10, 2023, 05:32:21 PM by Dullstar »

Offline mobius

  • Posts: 2761
  • relax.
    • View Profile
An even better solution imo is to have decorative terrain specifically made for and only for steel. This should look at least subtly different from ordinary terrain.

Or to take this idea even further except this is outside the scope of this topic sort of; you could have a class of terrain that's entirely decorative and can or doesn't necessarily have to be used over steel. So that it essentially has no physical effect in game; is purely decorative. Outside of steel Lemmings would pass right through it.

[everybody's angry response at this idea so they don't have to]:
That would lead to lots of confusion and angry ranting; what's walk-able terrain and what's not??? I don't want to play guessing games! The game should be always clear what's terrain and what's not. This would just add clutter and unnecessary complexity.

Just as an aside; NL currently has lots of graphical content, imo that is VERY confusing, to the point of me completely losing interest in playing. When I see certain tilesets or graphics used I simply pass without even attempting said level. And this is with the "optimal" steel features NL has and all the other stuff "true physics mode" and what not.

IMO steel should always be on top of terrain or else clear that it's steel somehow. If I was making a game I might just be tempted to enforce that steel is always on top at the sacrifice of being able to make "misshapen steel".
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
I can help verify... at least with my equipment that SLX loads considerably faster than Neolemmix.

It could be the online features, then...? SLX has generally added stuff rather than removed stuff, so it's strange that the loading times would be faster. Obviously great to hear, but it would be good to be able to find out the reasons for this so that I can potentially optimise it even further.

Also, will this also apply , to normal steel - eraser combinations ?

Yes, all current grouping behaviour will be kept exactly as it is now with no changes (unless someone specifically requests a change, and then that request will be addressed community-wide before anything happens).

A simpler alternative might be to allow styles to mark some pieces as being primarily decorative, such as moss pieces in orig_dirt

It's not a bad idea in theory, and I can absolutely see how this would solve the particular use case of decorative terrain on steel. However, beyond that, the layer of complexity this would add to an already fairly cumbersome style management system cannot be ignored.

For instance, how would any player, not just new players, know which pieces were meant to be decorative and which were meant to be actual terrain? What if those pieces get used elsewhere, not just on steel (that already happens with moss in orig_dirt before we even start factoring in custom levels/styles)? If they behave the same there, why not on steel?

Whilst I can agree that this idea does succeed in tackling the issue head-on, it also raises more questions than it answers. It's a move towards a more complex system, and therefore I'm not particularly sold on it.

Does anyone else have any thoughts on this?

you could have a class of terrain that's entirely decorative and can or doesn't necessarily have to be used over steel. So that it essentially has no physical effect in game; is purely decorative. Outside of steel Lemmings would pass right through it.

We already have this: marking an object as "backround" means it has no effect. Then, displaying it "only on terrain" or even using "no overwrite" will make it always display in the foreground (whilst still having no effect).

Also, did we ever get "stickers" in NeoLemmix? I seem to remember that being a suggested feature at one point...? From what I recall, the idea was similar to what's being proposed here: a foreground object with no effect other than to be decorative.

But yes, all the rebuttals you then typed stand fairly firm, particularly the "clutter and unnecessary complexity" one. We don't want to have to hit CPM every time we play a level.

I might just be tempted to enforce that steel is always on top at the sacrifice of being able to make "misshapen steel".

I'm not sure how shape relates to layer/position...? You can make steel whatever shape you like... the level End of an ERa from God Save The Queen is a huge steel picture of Queen Elizabeth II!

Meanwhile, I have considered the idea of separating out steel from terrain and painting it on a higher layer to terrain - this would mean that it could never be decorated with regular terrain though, which seems a bit too drastic a move. Therefore, this would only be done as an absolute last resort if all other ideas (including the ones presented by yourself and Dullstar here) fail.



I'm even more convinced now that we should look at trying Simon's idea of an intelligent system which sorts this out automatically. Here's what I propose...

SuperLemmix looks for the boundary of a steel piece, and checks how much of the boundary is obscured. We'd need a formula that could detect the following:


Example 1, 2 and 3

The dark blue squares are steel, with the light blue boundary being what SuperLemmix "searches" to see where the steel area is defined. The terrain shapes return steel wherever they are yellow or orange, and terrain wherever they are teal green.

In the first example, the terrain circle is entirely within the light blue steel boundary, so the entire area is steel.

In the second example, the terrain line cuts across the steel boundary (note that the boundary is orange where the terrain cuts across it). SuperLemmix searches along this orange boundary for, let's say, 5 pixels. If it finds blue boundary again, then nothing happens - and again, the entire area within the steel boundary is steel (the orange part of the boundary is also steel).

In the third example, the terrain obscures an entire corner of the steel block. SuperLemmix searches along the orange boundary and doesn't find blue boundary again after 5 pixels, so it draws its own boundary between the two points at which the "boundary search" failed to find blue steel boundary. In the example given, it draws a red straight line. I would suggest that this line, the orange part of the boundary, and the yellow part of the terrain block should all be steel. The teal green part of the terrain is terrain, and a large chunk of the steel block is rendered not-steel due to being obscured.

Here's another example, with a more complex variety of steel intersections:


Example 4

So here, wherever the boundary check fails at each end of a straight line, the red boundary will be drawn along that line anyway, so the steel will be preserved as-is in spite of the thickness of the terrain in these area. However, the part of the block that is fully obscured in one corner would be dissected in a straight line, similar to the third example above.

I really think this could work, and it's predictable because the steel intersection would always follow a straight line along the terrain/steel boundary wherever a fully-obscuring intersection occurs.

If there's a formula to achieve this, I'll be amazed! :lem-mindblown:
« Last Edit: March 09, 2024, 04:27:45 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
Apologies for the double-post, but since that previous one is bordering on being a textbook, I didn't want this particular message to get lost!:

For the next SuperLemmix update (2.4, coming very soon), steel is always steel, even when behind terrain. Let's live with it for a bit whilst we try to work on a solution, and see what happens. If we don't like it, and no solution is found, we can always revert to NeoLemmix behaviour.
« Last Edit: June 10, 2023, 11:07:06 PM by WillLem »

Offline Simon

  • Administrator
  • Posts: 3954
    • View Profile
    • Lix


Here are two counterexamples where the boundary-following idea fails to detect a large chunk of visible steel block pixels as steel.

Are all steel tiles convex? If you apply either of these new ideas to concave steel tlies (your boundary-following idea, or my smallest-rectangle idea, or my convex-hull idea), you'll produce more convex shapes. This accepts the risk of inverse-banana-style problems where the banana covers a dent in a concave steel tile, and the algorithm fills the dent with steel.

It sounds dangerous to define this arbitrary extension of the visible boundary by 5 pixels. What if the piece sticks in the earthen ground by only 1 pixel not by 5? Your area would overshoot the real steel piece by 4 rows into the ground. At the very least, consider to intersect the detected pixels with the original steel tile (how it's loaded from disk, not how it's partially covered in the level) to prune such overshooting.

The boundary of a diagonal side is really a staircase. When a diagonal side begins to overlap earth, you'll have to extend by 5 pixels in a random horizontal or vertical direction, depending pixel-precisely on how exactly the level designer covered the side with earth.

A steel piece, even if it's a connected lump, can have holes. Holes will increase the number of boundary circles of the tile. A steel piece can be a disjoint union of several lumps, and every such connected component will have one or more boundaries.

-- Simon
« Last Edit: June 11, 2023, 08:21:26 PM by Simon »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
Here are two counterexamples where the boundary-following idea fails to detect a large chunk of visible steel block pixels as steel
...
It sounds dangerous to define this arbitrary extension of the visible boundary by 5 pixels. What if the piece sticks in the earthen ground by only 1 pixel not by 5? Your area would overshoot the real steel piece by 4 rows

Yeah, I see the problem.

How possible would it be to just detect whether the entire block is covered, and if so then remove it as steel? Then, if even 1px is visible, the entire block becomes steel again.

If we can start with just that, then it seems easier to branch out from there and make better and more sophisticated checks. For now though, a "let's not allow designers to completely hide steel" algorithm seems like a good way to start; even if we end there and do nothing else, it's solved perhaps the biggest problem with allowing terrain-on-steel.

Another thing I'd like to try and do is draw all non-erasing steel pixels twice. Once on the terrain layer, where they'll be combined as usual (and probably left as destructible terrain), and again - in the exact same place - on a new steel layer, one layer below. Here, it will always be steel, in whatever shape the pieces are before being covered with anything.

This would allow 2 things, as far as I can imagine:

1) Any overlapping terrain will be destroyed, revealing the steel beneath and making it clear why the action has stopped (if, for example, the lem is Bashing or Digging). So, no more wierdness where the lem hits a subterranean steel block but the terrain itself seems to remain intact. It feels like the terrain still ought be be destroyed by nearby bombers/bashers, etc, at least as far as it can be, to reveal the steel pixels which have actually caused the cancelling.

2) It might be easier to check over the steel map and see if any pieces are completely covered by stuff on the terrain map. Then again, this could possibly be done even before the pieces are combined to draw the terrain layer, I suppose.

In any case, I've had a look at the rendering and it should be possible to achieve this in theory, but I'd have to get a much better understanding of exactly what's going on first. The physics rendering is one of the more impenetrable areas of the code (changing steel to always steel may have only been a single word, but it took a while to find that word!)

Are all steel tiles convex? If you apply either of these new ideas to concave steel tlies (your boundary-following idea, or my smallest-rectangle idea, or my convex-hull idea), you'll produce more convex shapes

I'm not sure I understand what you mean by "convex", in this context...?

Offline Simon

  • Administrator
  • Posts: 3954
    • View Profile
    • Lix
I'm not sure I understand what you mean by "convex", in this context...?

Good catch. It depends on what tiles and pixels really are.

(Reminder: A set is convex iff for all points x, y of the set, the straight line segment that connects x with y is also fully part of the set. When you travel straight from x to y, you won't leave the set.)

If we define the pixels as squares with nonzero area each, then each pixel already contains infinitely many points of 2-D space, and even the triangle's staircase surface fails to be convex. In this world, the only convex shapes are filled rectangles and the empty set.

Sometimes, I've envisioned terrain tiles as 2-D objects with smooth 1-D boundary lines, and then the convexity becomes more interesting because there are many more convex shapes than only the filled rectangles. This world view is nice to discuss intuition, e.g., when a steel algorithm mismatches intuition in a glaring way. This was my world view in the inverse-banana paragraph.

-- Simon
« Last Edit: June 11, 2023, 10:03:06 PM by Simon »

Offline kaywhyn

  • Global Moderator
  • Posts: 1915
    • View Profile
I'm not sure I understand what you mean by "convex", in this context...?

Simon's already explained what it means to be convex in a geometrical context, but I'll give an example and put it in layman's terms, as being a math instructor myself I like to simplify explanations as much as I can for my students, though I acknowledge and have found that some mathematical topics are not that easy to explain clearly!


This is an example of a convex polygon. Basically, if you take any side of the square and extend it indefinitely in either direction, it will never cross the interior of the polygon. This must be true for all sides of the polygon, where no matter how much you extend them in either direction they won't ever go inside the polygon.

In contrast,


this star polygon is non-convex, or concave. For if you take any side and extend it in either direction, it will cross the interior of the polygon. It doesn't necessarily have to be true for all sides crossing the interior, but rather if even one side extended makes it reach the interior, then it's concave, not convex.

This is kind of easy to remember, as concave has the word cave, where I like to think of it as the inside of something you explore, and so any side extended that goes in the interior is non-convex.
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

Offline Simon

  • Administrator
  • Posts: 3954
    • View Profile
    • Lix
How possible would it be to just detect whether the entire block is covered, and if so then remove it as steel? Then, if even 1px is visible, the entire block becomes steel again.

Can be more annoying than it appears on first sight.

For each steel tile occurrence in a level: Loop over all pixels of the steel tile (as loaded from disk, not as in the level), filter for solid pixels, transform the pixel's coordinates to the level according to the steel tile's occurrence in the level. The result I call "levelpixel". Nested loop over all tile occurrences that will be drawn later, filter for occurrences whose bounding box intersects the the levelpixel. Then nested loop over all pixels of the tile, filter for solid pixels, transform the pixel's coordinate according to the tile's occurrence, and return true if it's the levelpixel.

Four loops nested (six loops if you count x- and y-loops separately), thus sounds very expensive, you'll have to take good care to filter early what you don't need.

Or render the level's physics map twice, once with and once without the steel tile, and see if the two physics maps agree. Again, you can ditch all earlier-drawn tiles for speed in both renderings.

Begs another question: Is the game really the right place for this? I'd warn the user directly in the editor that his steel tile is fully covered and will be deleted. Early feedback, no surprises.

Is all this worth so much brainpower? I'd still let the banana/moss turn the covered steel into earth, it'll be okay. What problem led to this? Who got confused? What got backrouted? (I have my fun drilling into proposals and finding counterexamples, I don't mind continuing.)

-- Simon
« Last Edit: June 11, 2023, 11:14:27 PM by Simon »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
(Reminder: A set is convex iff for all points x, y of the set, the straight line segment that connects x with y is also fully part of the set. When you travel straight from x to y, you won't leave the set.)

If we define the pixels as squares with nonzero area each, then each pixel already contains infinitely many points of 2-D space, and even the triangle's staircase surface fails to be convex. In this world, the only convex shapes are filled rectangles and the empty set.



I'll give an example and put it in layman's term
---
This is an example of a convex polygon. Basically, if you take any side of the square and extend it indefinitely in either direction, it will never cross the interior of the polygon
---
this star polygon is non-convex, or concave. For if you take any side and extend it in either direction, it will cross the interior of the polygon

Riiight! Thanks, this helped :lemcat:

Yes - I can see how looking for the convex/concaveness of a steel tile would help to determine its shape relative to what intersects it, but I'm a long way from being able to tackle this sort of thing by myself tbh.

Or render the level's physics map twice, once with and once without the steel tile, and see if the two physics maps agree. Again, you can ditch all earlier-drawn tiles for speed in both renderings

I think I like this option better, if only because then we also have the opportunity to draw the steel to 2 layers at the same time, and achieve the "destroy terrain stuff over steel, but leave the steel underneath intact" aesthetic.

Begs another question: Is the game really the right place for this? I'd warn the user directly in the editor that his steel tile is fully covered and will be deleted. Early feedback, no surprises.

I had this exact same idea! Yes, maybe the Editor could just delete any steel tiles that are entirely beneath terrain tiles, and aren't eraser pieces.

The only issue with this is that it doesn't prevent someone then writing the hidden steel tile back in with a text Editor. Ultimately, it would have to be sorted out in-game anyway.

Is all this worth so much brainpower?

Probably not tbh :crylaugh:

Still, a challenge is a challenge!

What problem led to this? Who got confused? What got backrouted?

A lot of it comes down to my own personal preferences more than anything. Steel has never really been completely well-behaved in any Lemmings clone/port. Always bumping steel to the very top layer and never allowing it to be erased would solve all problems from a purely physics POV, but... then we can't decorate or make wierd and wonderful shapes out of the blocks.

I'm not even too bothered about backroutes, hidden steel, that sort of thing. Those are other people's concerns that I'm just being aware of for discussion purposes.

It's about finding a balance: let's decorate steel, but let's not allow it to be completely hidden. And, let's destroy overlapping terrain to reveal the steel underneath. For me, that would settle it once and for all.
« Last Edit: March 09, 2024, 04:29:08 PM by WillLem »

Offline Crane

  • Posts: 1128
    • View Profile
I have one other suggestion, although it will require a modification to the editor... terrain pieces have a "Steel Cancel" flag, which erases the steel zone where it overwrites the steel plate.  There might be cases where erasing and adding the same piece on top might not be ideal (e.g. if both the steel plate and visible piece are "No Overwrite").  Just a thought.
« Last Edit: June 14, 2023, 02:47:13 AM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
I have one other suggestion, although it will require a modification to the editor... terrain pieces have a "Steel Cancel" flag, which erases the steel zone where it overwrites the steel plate.

Do you mean as an optional behaviour, similar to No Overwrite?
« Last Edit: June 14, 2023, 02:47:20 AM by WillLem »

Offline Crane

  • Posts: 1128
    • View Profile
Yes, as an optional behaviour.
« Last Edit: June 14, 2023, 02:47:47 AM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
Yes, as an optional behaviour.

I've added the idea to the wish list in case we decide to keep "steel is always steel" behaviour in SLX - it's definitely worth considering.

Three points of discussion:

1) This would essentially revert steel back to current NL behaviour whenever the flag is used. So, we'd end up with the best (and worst) of both worlds. An obvious drawback to this is never knowing what type of steel behaviour to expect, and that's even if the feature is never misused to intentionally troll the player with partially-destructible steel. The idea kind of negates the proposed "steel is always steel" behaviour, making it suddenly "steel is whatever the designer wants it to be"; not necessarily a bad thing, but whether or not it's a good thing depends very much on the player!

2) With that said, it's kind of already possible to do this (i.e. with a "steel is always steel" system) by simply placing a terrain piece over a steel block, setting the terrain piece to "Erase", duplicating it in-place, then setting the duplicated piece to "Not Erase". To keep steel behaviour intact in such a scenario, we'd need to also check for erasing pieces and see if they are completely obscured by terrain. Otherwise, we could end up with hidden, partially-erased steel blocks! Note to self: It's currently possible to do this in the SLX working copy, so maybe the next release of SLX should keep NL steel behaviour until we can get a solution together for this particular problem...

3) Maybe it's overcomplicating things? It's not difficult to create a custom steel piece which can be used as an eraser and then grouped with the visible steel piece to create a resulting single piece of the desired shape. Moreover, there are already dozens of steel pieces which have pretty much every possible shape covered between them, without even needing to create any more.

Erasing and grouping has revolutionised what's possible in the Editor; I almost feel like it'd be more worthwhile (and, frankly, much less effort) to add some generic-shaped steel pieces to the default "Special" style (triangles, squares, circles, etc) so that they can be used for the type of case you're describing. In the event that we go ahead with "steel is always steel", would that satisfy?
« Last Edit: June 18, 2023, 12:51:00 AM by WillLem »

Offline namida

  • Administrator
  • Posts: 12436
    • View Profile
    • NeoLemmix Website
If it doesn't look like steel, it shouldn't be steel. If you want steel blocks to always be fully steel, perhaps they should always be drawn in front of all non-steel terrain?
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)

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
If you want steel blocks to always be fully steel, perhaps they should always be drawn in front of all non-steel terrain?

I have considered this, yes; maybe the best bet would be to draw steel on a higher layer than terrain. We could then make pre-decorated steel blocks for orig_dirt, which I believe is the only style to have decorated steel in the OGs.

We can still partially erase steel blocks in the editor, and fill the deleted area with terrain on the lower layer, for Crane's example. This would give the appearance of the steel block being "behind" the terrain.

But yeah... I'm beginning to realise that we really can't have it both ways. For now, let's keep NL steel behaviour and make sure that any decoration in the OG levels is at least 1px in from the edge. Whatever else we do will either be a lot of mess or a lot of effort.
« Last Edit: June 18, 2023, 12:53:41 AM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 3571
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG] Steel is always steel, even if it's partially behind terrain
« Reply #25 on: June 18, 2023, 12:48:51 AM »
So, just to be clear: for the next release of SuperLemmix (version 2.4), steel behaviour will be as it is in NeoLemmix.

I did originally want to battle-test "steel is always steel", but there are too many possible complications for it to actually end up being that simple. Better, then, to leave it as it is for now.
« Last Edit: March 19, 2024, 12:41:57 AM by WillLem »