Author Topic: Move to a text-based level format  (Read 9437 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Move to a text-based level format
« on: May 18, 2016, 10:15:12 AM »
So, as has been mentioned in the past, I'm wanting to move NeoLemmix to loose-file, text-based-where-practical formats.

One place that's fairly easy to start (apart from a few - such as save files - that have already been done) is the level format.

Here's a sample of the candidate for the new format: (EDIT: The link expired. Just check the level attached to the 3rd post in a text editor.)

Attached is a copy of NeoLemmix capable of loading the new format. It will also use the new format when mass-dumping levels, so you can use that to obtain level files in this format (feel free to try messing around with their contents too). Note that current versions of Flexi Toolkit likely won't play too nice with levels in this new format, but you can load them as single levels. :)

Please note: While you're free to mess around with the file and see what happens, please don't attempt to create serious levels in it, as I do not guarantee the format will remain exactly as-is, and will not assist with conversions from beta versions of this format to the final version. I doubt this will be a problem since there's no editor release supporting this format, but you never know...

This version, aside from the implementation of this format, is identical to Nepster's latest experimental release. Remember - these experimental releases are for the purpose of testing; for serious use, please stick with the stable V1.43n-F release for now.


Changes for other files will likely follow in the near future; replays will probably be next.

(@Nepster: "new-formats" branch on my repo.)
« Last Edit: June 18, 2016, 07:12:05 AM 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #1 on: May 18, 2016, 03:12:16 PM »
Updated the experimental copy for another new feature I added using the new format. Since there's no editor support for this yet (or indeed, for the new format at all), I had to put this together partially by hand... but here's a level showing it. :) (Requires the updated version that I've uploaded just now!)

(EDIT: See next post.)
« Last Edit: May 19, 2016, 12:33:19 AM 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #2 on: May 19, 2016, 12:34:02 AM »
This new level just got even more interesting! Requires another update (which also includes a few new gameplay fixes from Nepster), see first post.


For those who can't be bothered downloading it or want to see it right away,
Spoiler (click to show/hide)
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)

Offline Wafflem

  • Posts: 943
    • View Profile
Re: Move to a text-based level format
« Reply #3 on: May 19, 2016, 01:00:18 AM »
Awesome!!!! That's a TON of improvements in this version of the NeoLemmix player! The mixing of the two graphic sets is very interesting!

The basher/miner/digger and builder silhouettes and the permanent skill lemming coloration are very informative and make solving levels more convenient! However, I do need to point out that the builder silhouette does not factor a builder turning around a blocker (see in picture below).
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #4 on: May 19, 2016, 01:26:41 AM »
It's borderline impractical to take in every possible situation. It doesn't account for when the builder will actually stop either. You can try asking Nepster to account for this (he's the one who wrote the code for those silhouettes), I'll certianly accept the code if it gets made, but in all honesty, I think it's overkill.

Think of it as a guideline, not a full-blown prediction of the future. ;)
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)

Offline Wafflem

  • Posts: 943
    • View Profile
Re: Move to a text-based level format
« Reply #5 on: May 19, 2016, 03:12:57 AM »
No problem if something like this would be too difficult to code.

I remember you recommended that people should not use the Epic tileset for levels because the new level format will support mixing terrain and objects. What will happen then to levels using the Epic tileset? If I remember correctly, you will write a code so that a level using the Epic tileset will instead use terrain/object pieces from the Orig/Oh No graphic sets and replace those of the Epic version. Is this right?
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #6 on: May 19, 2016, 03:18:45 AM »
Quote
I remember you recommended that people should not use the Epic tileset for levels because the new level format will support mixing terrain and objects. What will happen then to levels using the Epic tileset? If I remember correctly, you will write a code so that a level using the Epic tileset will instead use terrain/object pieces from the Orig/Oh No graphic sets and replace those of the Epic version. Is this right?

Yes. Probably not in NL itself, but in the editor, or a dedicated conversion tool.

The same would also apply to cases like the duplicated pieces between the Snow and Xmas sets, as well as some other less obvious cases (eg. the Circuit tileset has two tiles that are identical - one was meant to be flipped, but by the time I had noticed, I had made heaps of levels and likely used both versions of the piece).
« Last Edit: May 19, 2016, 03:30:13 AM 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)

Offline Wafflem

  • Posts: 943
    • View Profile
Re: Move to a text-based level format
« Reply #7 on: May 19, 2016, 03:30:21 AM »
Thanks!

Would it also be possible to use more than one VGASPEC in a level?
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #8 on: May 19, 2016, 03:31:14 AM »
Is it possible yet? No - in fact VGASPECs aren't working at all with the new format yet.

Will it be possible? Well, the idea is to treat VGASPECs as just another terrain piece, so yes. :) Essentially, the concept of a "VGASPEC" will disappear; they'll just be "really freaking big terrain pieces".
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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #9 on: May 19, 2016, 09:12:45 AM »
Here's a possible candidate for the graphic set format. Note that although the pieces here are simply named "0", "1", etc, they do not have to be - arbitrary names will be allowed. I simply was too lazy to give them names. :P

(All non-PNG files are plain text.)
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)

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Move to a text-based level format
« Reply #10 on: May 19, 2016, 07:01:59 PM »
Is it necessary for every single terrain/object to have a separate text file for every one, it makes the file environment seem very cluttered + it'll be more annoying to mass edit terrain info etc.
Will tilesets be released for use like this, with lots of separate images rather than just one file like how lemmini used to do it?

I don't see myself ever actually editing the text files directly though, I will continue using the graphics tool for making tilesets as it has useful features such as preview animations. I found having to edit text files directly in lemmini always used to be a very annoying task.

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: Move to a text-based level format
« Reply #11 on: May 19, 2016, 07:26:08 PM »
The Graphic set tool will still exists as I understand + I find it also very handy, it will just create the output in a new READABLE format.

In the long term it will be merged with the editor though.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #12 on: May 20, 2016, 01:37:37 AM »
Exactly what IchoTolot said. If you don't want to look at the raw files, you'll never need to look at them - tools to work with them will remain available. (And indeed, most likely the graphic set editor, level editor, and other similar tools will be merged into a single editor in the future.) It's just more convenient for those who do want to modify them directly.

Someone asked on IRC so I'll answer here - there is currently no editor that supports the graphic set mixing. I made the above level by hand (specifically by creating each half as a seperate level, dumping them from the new version of the player, then manually merging the files by hand). And no, there will not be a V1.43 line update that supports this - it might seem like "just another new level format", but there are a LOT of changes behind-the-scenes to implement the mixing too, and I am not backporting all of those to V1.43 just so mixed tileset levels containing ghosts can be created. Backporting support for this level format alone would be simple enough, but without also backporting the ability to mix graphic sets (and this is the complicated part), there'd be little if any reason to do so.
« Last Edit: May 20, 2016, 07:28:34 AM 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #13 on: May 20, 2016, 03:04:21 PM »
Here's a feature in the new "graphic set" (if you can really call it that anymore) format that I know IchoTolot will be happy about... :)
« Last Edit: May 20, 2016, 03:20:39 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)

Offline Wafflem

  • Posts: 943
    • View Profile
Re: Move to a text-based level format
« Reply #14 on: May 20, 2016, 03:29:27 PM »
Hmmm, the other three images appear to have the same black background color (while the first one is blue). Or am I missing something?
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #15 on: May 20, 2016, 03:52:40 PM »
Look closer. The background isn't black at all, in any of them. :)
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)

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: Move to a text-based level format
« Reply #16 on: May 20, 2016, 03:53:33 PM »
Hmmm, the other three images appear to have the same black background color (while the first one is blue). Or am I missing something?

No! The bg color is slightly different here!

You can see it better in the crystal tileset as the black in the crystal pillars is now 100% recognisable!

+ if the whole screen would be displayed I bet you can now see the exact game area as well!

:thumbsup::thumbsup::thumbsup::thumbsup::thumbsup::thumbsup::thumbsup::thumbsup:

Offline Nepster

  • Posts: 1829
    • View Profile
Re: Move to a text-based level format
« Reply #17 on: May 20, 2016, 04:12:23 PM »
I guess the background color is determined by the graphic set? Then I suggest keeping a black background for all styles that have no black colored terrain pixels and usually use light colors. In my opinion, the main objective should be to get the biggest contrast between terrain and background and black does this very well e.g. for the pillar or marble tileset.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #18 on: May 20, 2016, 04:18:43 PM »
Yes, it is determined by set.

It can be decided at a later date exactly what colors should be used for what sets. For now, the main point of interest is that it's working. :D
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)

Offline Wafflem

  • Posts: 943
    • View Profile
Re: Move to a text-based level format
« Reply #19 on: May 21, 2016, 12:47:58 AM »
Sorry guys, I initially saw this on my iPad and I was really tired that day, so I initially did not see the difference in background because the colors for the Pillar/Fire/Marble looked dark while the Crystal one stood out :-[ :-[ :-[. They look really cool! I can't wait to see what the Lemmings Plus II-V levels will look like with the new backgrounds! :thumbsup:

What about sets that use custom backgrounds (i.e. the background is not just a color, but a picture like scenery), like the Biolab tileset? Will custom backgrounds stay as separate objects?
« Last Edit: May 21, 2016, 01:53:10 AM by DynaLem »
YouTube: www.tinyurl.com/YTWafflem
Twitch: www.twitch.tv/Wafflem467

Have level designer's block right now? Have some of my incomplete levels for LOTS of ideas!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #20 on: May 21, 2016, 02:48:05 AM »
Quote
What about sets that use custom backgrounds (i.e. the background is not just a color, but a picture like scenery), like the Biolab tileset? Will custom backgrounds stay as separate objects?

Image backgrounds will probably be possible, but for now they're low priority. Of course, this doesn't hugely matter since I want to get as much as possible out of the way before any new release; it just means it may be longer before we see an experimental version that supports it.
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)

Offline Simon

  • Administrator
  • Posts: 3876
    • View Profile
    • Lix
Re: Move to a text-based level format
« Reply #21 on: May 21, 2016, 03:04:33 AM »
Tileset-specific bg color: Good idea. Each level has a main tileset anyway. The set-specific bg harvests the benefits of that design.

This helps Crystal and Medieval.

-- Simon

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #22 on: May 21, 2016, 03:09:04 AM »
I guess the background color is determined by the graphic set? Then I suggest keeping a black background for all styles that have no black colored terrain pixels and usually use light colors. In my opinion, the main objective should be to get the biggest contrast between terrain and background and black does this very well e.g. for the pillar or marble tileset.

One other advantage (which to be fair; this is not the only possible solution to) is you can see exactly where the sides of the play area is (since the border, as well as the stats bar, are black).

Here's another shot of Mind The Step, this time without removing the black border around the game area.
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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #23 on: June 24, 2016, 01:21:33 PM »
So, the latest update on the new formats - we finally have VGASPEC levels working again! :)
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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #24 on: June 28, 2016, 04:15:09 PM »
Here's the latest thing the new formats let us do.



The key thing to note here: The two water pieces are the same (meta)object - set "default", piece "water". This piece allows for variable sizing. In general, water, one-way walls and updrafts allow for this, as do some (but not all) one-way fields.

Specifically, here's the relevant part of the level file:
Code: [Select]
# Interactive objects
 OBJECT
  SET default
  PIECE water
  X 504
  Y 52
  WIDTH 32
  NO_OVERWRITE
 
 OBJECT
  SET default
  PIECE water
  X 488
  Y 32
  WIDTH 64
  NO_OVERWRITE
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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Move to a text-based level format
« Reply #25 on: June 28, 2016, 05:48:04 PM »
Here's something even more exciting from the new code. :)

https://www.youtube.com/watch?v=Us2sGFG2ZlA
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)

Offline LJLPM

  • Posts: 402
    • View Profile
Re: Move to a text-based level format
« Reply #26 on: June 29, 2016, 08:13:22 PM »
Good job! The text-based level format is very! promising, and the new features are very cool: I really like the resizable Objects :thumbsup: