What is no-overwrite?

Started by mantha16, June 13, 2020, 03:36:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mantha16

Edit Simon: This question was split from:
No-Effect Objects must be either No Overwrite or Only on Terrain




i dont understand what no overwrite even means

WillLem

Quote from: mantha16 on June 13, 2020, 03:36:05 PM
i dont understand what no overwrite even means

Me neither... I only know what it does by experiential learning. :lix-unsure:

ericderkovits

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 (-).

Simon

#3
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.



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

WillLem

This is really helpful, thanks Simon! :thumbsup: