Move to a text-based level format

Started by namida, May 18, 2016, 10:15:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

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.)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

#1
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.)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

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


Notice the mixing of graphic sets - including objects! And no, it's no VGASPEC or custom graphic set trickery; you can try modifying the file yourself if you like. ;)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

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!

namida

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

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!

namida

#6
QuoteI 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).
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

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!

namida

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Gronkling

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.

IchoTolot

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.

namida

#12
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.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

#13
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... :)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

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!

namida

Look closer. The background isn't black at all, in any of them. :)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

IchoTolot

Quote from: DynaLem 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?

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:

Nepster

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.

namida

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Wafflem

#19
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?
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!

namida

QuoteWhat 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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

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

namida

Quote from: Nepster 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.

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

So, the latest update on the new formats - we finally have VGASPEC levels working again! :)
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

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:
# 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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

LJLPM

Good job! The text-based level format is very! promising, and the new features are very cool: I really like the resizable Objects :thumbsup: