Lemmings Forums

NeoLemmix => NeoLemmix Main => Topic started by: mantha16 on June 13, 2020, 03:36:05 PM

Title: What is no-overwrite?
Post by: mantha16 on June 13, 2020, 03:36:05 PM
Edit Simon: This question was split from:
No-Effect Objects must be either No Overwrite or Only on Terrain (https://www.lemmingsforums.net/index.php?topic=4950)



i dont understand what no overwrite even means
Title: Re: What is no-overwrite?
Post by: WillLem on June 13, 2020, 04:41:28 PM
i dont understand what no overwrite even means

Me neither... I only know what it does by experiential learning. :lix-unsure:
Title: Re: What is no-overwrite?
Post by: ericderkovits on June 13, 2020, 04:46:25 PM
I think it's when you add a 2nd part of a tile onto the first it means with no overwrite that part of the 2nd tile will be placed behind the first. in other words it doesn't overwrite the 1st. in lix's editor they have "+" or "-" meaning  whether you want
tiles to be placed on top of others (+) or placed behind others (-).
Title: Re: What is no-overwrite?
Post by: Simon on June 13, 2020, 07:56:07 PM
When you have no eraser tiles (a.k.a. dark tiles), a no-overwrite tile behaves like a tile ordered to the early-drawing end of the list, yes. But it's different when it overlaps eraser pieces.

No-overwrite really does: Instead of drawing all pixels of the tile, draw only those pixels that cover air, i.e., pixels that wouldn't overwrite any existing pixel of the earlier-drawn terrain.

(http://www.lixgame.com/etc/noow-reason.png)

First comes A, a normal tile.
Second comes B, an eraser tile.
Third comes C, a no-overwrite tile.

C is drawn after everything else. But because C is no-overwrite, C's pixels will only be drawn into where there are no pixels at the moment.

This example requires either no-overwrite (in Lemmings) or tile grouping (in Lix). It's impossible to build this example only using erasing and reordering. You can't get this result by reordering the example as C, A, B, that would make B erase the upper part of C.



I recommend: Prefer reordering over no-overwrite. Reordering is easier to reason about. But when you realize that you need no-overwrite because you're cutting in elaborate ways with eraser tiles, then sure, use no-overwrite.

-- Simon
Title: Re: What is no-overwrite?
Post by: WillLem on June 19, 2020, 05:05:31 AM
This is really helpful, thanks Simon! :thumbsup: