Author Topic: About the level editor  (Read 5513 times)

0 Members and 1 Guest are viewing this topic.

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
About the level editor
« on: November 24, 2017, 01:04:21 AM »
Some things that occured to me when adjusting the Clam levels:

First of all I'm not experienced with the editor so if the feature is already there then understand my remarks as questions if they are there and how to apply them.

Is there something like an undo button? I always lost my non-saved progress if I made a missclick and moved the wrong tile (group). Since I was dealing with an existing level I couldn't guarantee to move it back to the original position.

Is there a possibility to show grid lines? That would have been helpful to see where exactly everything is situated.

Is there something like a blank space to manage tiles? I had an existing level before me and if that was quite full or had giant tile clusters then it was hard to manage new tiles. Managing means for example: put them together to tile groups, copying them etc.

I know I speak from a very particular viewpoint and that makes these things maybe not so important but I just wanted to bring that up since it occured to me.


Offline mobius

  • Posts: 2747
  • relax.
    • View Profile
Re: About the level editor
« Reply #1 on: November 24, 2017, 01:19:06 AM »
-as far as I know there is no undo button. I seem to recall this being on the to-do list for a while now?

-grid lines: that's a good idea, I might like that option in NL as well. I'd highly prefer this as an option to turn off and on however.

-on managing tiles: one thing you can do it make the level larger (map button) and use the extra space then shrink it later when you're ready.

-Simon always appreciates complaints and very much enjoys rants :lix-evil:
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 Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #2 on: November 24, 2017, 06:01:25 PM »
Undo: Not implemented. :lix-trouble: But it's the most important missing feature, github issue #56. It's tricky to implement properly, therefore I've put it off for a long time. I'd like to shoot for a good solution with a command stack here, even if a substantial part of the editor interface code must be redesigned for this.

Grid lines: Interesting idea. mobius is right how it should be toggleable during the editor session.

Blank space to manage tiles: No. Interesting idea, but looks extravagant to implement. Are the workarounds nasty enough to warrant investigation of such a feature?

-- Simon

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #3 on: November 24, 2017, 06:12:00 PM »
-on managing tiles: one thing you can do it make the level larger (map button) and use the extra space then shrink it later when you're ready.

Thanks, mobius, for the tip.

In this context:
Blank space to manage tiles: No. Interesting idea, but looks extravagant to implement. Are the workarounds nasty enough to warrant investigation of such a feature?

Haven't tried mobius' workaround, yet, but that one sounds viable. So probably, no.

I imagined grid lines as something toggleable as well.

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #4 on: January 02, 2018, 10:26:51 PM »
Simon, is it intended that tile groups move when they are separated into their parts?
Video attached.

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #5 on: January 03, 2018, 03:27:49 AM »
I really don't understand this:

At least for older level files it sometimes happens that the editor interprets parts of it as tile groups although none is defined in the level file.
Example: Clam's Flingsane level "Polar Pop"
I've attached  for comparision of file content the original level file and what happens if you go in the editor and just save.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #6 on: January 03, 2018, 03:46:35 AM »
Okay, I got 0.9.7 out the door, now it's time to look at this.

Grouped pieces move on ungrouping: This happens when the group was mirrored/rotated. The move on ungrouping is confusing and I should fix it. Might be hard to fix perfectly, but we'll see.

Editor groups even if no groups defined in the level: This is backwards compatibility with C++ Lix and early D Lix levels. Line 93 in polar-pop.txt reads:

Code: [Select]
:matt/winter/06: 312 32 n
This n means no-overwrite: Draw (pixels of the piece annotated with n) where there is air in (the map rendered so far), but do not draw over solid pixels in (the map rendered so far). Since D Lix 0.4, we don't support no-overwrite anymore, but instead tile grouping. Both features allow the same map designs, and no-overwrite-designs are converted on level load to grouped designs.

The resulting group may be very large to guarantee the exact same looks of the old level design. It might be prudent to replace this single no-overwrite tile: Remove the n with a text editor, open the map in the level editor, and fix any strange looks.

Thanks for the reports!

-- Simon

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #7 on: January 03, 2018, 03:53:34 AM »
Here's a version of Polar Pop without grouping, without no-overwrite. The ceiling looks minimally different, everything below is the same. It is proven replay in the proof collection.

-- Simon

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #8 on: January 03, 2018, 03:55:25 AM »
Escpecially the combination of the two things can get nasty when wanting to maintain old levels:
You have that big tile cluster and want to separate it but everything gets haywire then.
Isn't the no overwrite similiar to the background/foreground feature?

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #9 on: January 03, 2018, 04:06:08 AM »


The above design requires no-overwrite, it's not possible with background/foreground only. When you have only positive pieces (= no eraser pieces), then yes, no-overwrite is equivalent to putting things in the background.

I'll offer help with the nastiest cases for maintenance.

-- Simon

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #10 on: January 03, 2018, 04:14:47 AM »
At moment there doesn't seem anything in ClamLix in need of a fix as far as I know.
But how to progress nevertheless. Deal with this thing if a particular level needs a fix just for this level or converting all files that have no overwrite?
If we choose first option there should be some kind of documentation how to deal with this issue.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #11 on: January 03, 2018, 04:26:48 AM »
Documentation sounds best.

Automatic backwards compatibility should err towards exact physical/visual preservation, at cost of ease of editing. If you want a design without groups, even if the fix is obvious to a human, you have to tell the computer exactly what you want.

./doc/levmaint.txt should be the best place for now. I don't have webpages with this documentation, they might be better in the long run.

-- Simon

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #12 on: January 03, 2018, 04:35:34 AM »
Can you put there what the single letters (after the coordinates) mean? I personally think I've understood most of them but it would be nevertheless a good information in understanding the level files.
(, which is not always self-explanatory (well at least if you play it in German - in English even the letters are shown in German not that's not correct, I just looked wrong, sorry)).

Example for an explanation:
d - Tile has the option: "Dark: Selected terrain erases normal terrain."
f - Tile is mirrored vertically.
frr - Tile has the option: "Flip: Mirrors the selected terrain horizontally."
n - No-overwrite: Outdated tile option that has been substituted by tile groups. It is possible that the editor will interpret parts of a file containing such a letter marker as tile groups for backwards compatibility.
r - Tile has the option: "Rotate: Performs a quarter turn on the selected terrain" Multiple "r" indicate the
number of rotations (up to 3).
« Last Edit: January 03, 2018, 05:26:55 AM by Forestidia86 »

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: About the level editor
« Reply #13 on: January 04, 2018, 09:22:31 PM »
Is there a possibility to see the coordinates of the cursor position? It seems really nasty to find single tiles from their coordinates. (A workaround though would be to drag a tile around.)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: About the level editor
« Reply #14 on: January 04, 2018, 09:29:24 PM »
Attached an executable that prints mouse-on-land coordinates when no tile hovered.

This is useful and will go in the next release.

-- Simon