Author Topic: What is no-overwrite?  (Read 1697 times)

0 Members and 1 Guest are viewing this topic.

Offline mantha16

  • Posts: 287
    • View Profile
What is no-overwrite?
« 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



i dont understand what no overwrite even means
« Last Edit: June 16, 2020, 06:23:29 PM by Simon »

Offline WillLem

  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: What is no-overwrite?
« Reply #1 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:

Offline ericderkovits

  • Posts: 912
    • View Profile
Re: What is no-overwrite?
« Reply #2 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 (-).

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: What is no-overwrite?
« Reply #3 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.



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
« Last Edit: June 13, 2020, 08:15:07 PM by Simon »

Offline WillLem

  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: What is no-overwrite?
« Reply #4 on: June 19, 2020, 05:05:31 AM »
This is really helpful, thanks Simon! :thumbsup: