Author Topic: [BUG][EDITOR] Draw Sooner/Draw Later buttons have swapped function  (Read 852 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Posts: 3345
  • Unity isn't sameness, it's togetherness
    • View Profile
In the latest download of the editor, I noticed that Draw Sooner/Draw Later have swapped; not their position, but their function!

I moved a previous copy of the editor into the 12.8 folder and it's all fine now, but might be worth double-checking that latest upload.

Side-question: what does "No Overwrite" mean?

Offline namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: [BUG][EDITOR] Draw Sooner/Draw Later buttons have swapped function
« Reply #1 on: February 17, 2020, 06:11:12 PM »
The new way around is correct; it's the old one that was wrong. The "draw first" / "draw last" captions themself aren't the simplest to understand - they used to be "To front" / "To back", but those were misleading in terms of how NeoLemmix actually renders. "Draw first" / etc were the most meaningful captions I could think of.


I should write up a detailed explanation at some point, but in short (and in a form that I assume is meaningful to you): Imagine that each terrain piece is like a layer in an image file. If we had, for example, 10 layers - Layer 10 ("draw last") would be drawn in front of all the other layers, while Layer 1 ("draw first") would be right at the back. And as applicable for inbetween.

NL adds to this with two special draw modes - "Erase" and "No Overwrite". If Layer 6 (for example) was "Erase", then layer 6 would erase anything on layers 1 - 5 that it overlaps (note that it wouldn't affect layer 7 to 10, of course). If Layer 6 was "No Overwrite", it wouldn't erase layers 1 - 5, but despite being a higher layer number ("drawn later"), it would get drawn behind any solid pixels of layers 1 - 5. However, note that this is specifically "draw at the same time, just draw it behind", and NOT "draw earlier" - this can be seen if, for example, layer 6 was an eraser and layer 7 was no overwrite; layer 7 would not be erased by layer 6 (but would still be drawn behind any surviving pixels from layers 1 to 5).

EDIT: Added a visual guide to help.

It gets a tiny bit more complex for objects - no-overwrite objects are also drawn behind terrain, and there's a few special cases where some types of object ignore the No Overwrite flag and even to some extent the draw order altogether. But the same basic concepts still work well overall for understanding it - you just have to remember there's several edge cases when it comes to objects.
« Last Edit: February 17, 2020, 06:19:30 PM by namida »
My Lemmings 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)