Author Topic: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic  (Read 1644 times)

0 Members and 1 Guest are viewing this topic.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
New topic: https://www.lemmingsforums.net/index.php?topic=4274.0

So, I started work on a new project recently - a long-overdue Lemmings 3D level editor!

It's early days yet. And let's not forget - this is me we're talking about, it's never a sure thing whether or not I'll finish something. But I've made some decent progress already - it can already edit title / stats and some style-related settings, as well as display a very approximate representation of the level's layout.

I'm writing this editor in Lazarus (basically, open-source Delphi). So far I've been using Lazarus 1.8.4 with FPC 3.0.4; but I'm aware of the release of Lazarus 2.0.2 and will likely upgrade this project to it at some point - though as 2.0.2 still uses FPC 3.0.4, I suspect it will compile just fine as-is. There's no compiled version available for download yet because it's simply too far from finished to be worthwhile, but if you're really interested, you're welcome to try and compile it from source:
https://bitbucket.org/namida42/l3dedit/src/master/

At this stage, you're welcome to provide feedback on whether it compiles and/or runs on Mac or Linux, but proper support for them is not a priority yet*. Lazarus very much supports both of those platforms, and there's a very good chance it'll compile and work fine as-is, but if it doesn't, it's on the basis of "fix it yourself; otherwise, feel free to report it and I will eventually look at it, but that's a very long-term eventually".

* Yes, it isn't a priority yet. I do intend for this to be cross-platform.

The only dependency is Graphics32. Either the PilotLogic GR32 package from the Lazarus Online Package Manager, or the copy from the official GitHub repo, will work. GR32_PNG is not required. Note that Graphics32 will only compile under Lazarus when the "PUREPASCAL" conditional define is enabled, at least when compiling from GitHub; I don't know if PilotLogic's version improves on this. This in turn results in slower execution. If this issue in GR32 isn't resolved, I may look at a Delphi port at some point, but only once the Lazarus version is fully working on all platforms.

Huge thanks to Pooty for his work on cracking the Lemmings 3D file formats, without which this project couldn't have even come as far as it has.

If you'd like to help with this project - probably the most useful thing anyone can do at this point, is see if they can figure out any more of the file format - both the LEVEL and BLK file are of interest; I believe I know everything I need to at this point about graphic files. The less time I have to spend figuring out the rest of the format, the more time I can spend making the editor work. ;)



Update: While no release yet (I'll likely create a new topic when there's a release), the first L3DEdit-made level is here. See reply 32 if you'd like to grab a copy and try it out. It's roughly early-to-mid Mayhem difficulty - not a pushover by any means, but you should definitely be able to solve it if you solved the official L3D levels.
« Last Edit: June 16, 2019, 02:33:31 am by namida »

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: L3DEdit: Lemmings 3D Level Editor
« Reply #1 on: June 06, 2019, 06:28:13 am »
(reserved)

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor
« Reply #2 on: June 06, 2019, 06:33:54 am »
Here's a visual representation of what it can render so far - as you can see, it's got a long way to go, but you can already see the general shape of the levels - I'm sure you can recognize which two levels are in these images!

The first one shows highlighting layers and tiles. There's no actual selection code yet - I just told the rendering code "highlight layer X and tile Y" when generating that image.

There's no full 3D view - that's simply too much work. Instead, the editor will work with an isometric point of view. You can, however, rotate the view - the second and third images show the same level from four different angles. (The 2nd and 3rd images are identical to each other, except one is much smaller; this is because the large one is really big.)

Offline Flopsy

  • Posts: 702
  • Gotta Go Fast
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor
« Reply #3 on: June 06, 2019, 09:53:33 am »
This looks really good namida, I'm really interested in seeing how this project progresses.

I would definitely make use of a Lemmings 3D level editor if it existed, I loved the original 3D game and a few levels in SEB Lems are heavily inspired by some levels from 3DLems, as I'm sure you noticed.

It looks a lot more complicated than the NeoLemmix editor and I think using an isometric view is the best way to go about it.
I tend to get a lot of ideas for 3D Lemmings levels when using the NeoLemmix editor but sadly those ideas never get utilised, that's probably how I ended up trying to remake 3D Lemmings levels in 2D in the end.
SEB Lems (160 levels)
MegSEGAbytes (40 levels)
Gotta Go Fast (in progress)

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor
« Reply #4 on: June 06, 2019, 11:29:59 am »
Actually - I think much of the difficulty from this point will be figuring out the remaining unknowns in the level format, which there's still quite a lot of. The actual editing itself, shouldn't be too hard.

For example - rendering has already made progress. Check out these new screenshots. :) The sky graphic on top of the entrance in the first one is a bug that I've already fixed (notice the absence of the bug in the second shot), but I couldn't be bothered re-taking the screenshot.

Offline Simon

  • Administrator
  • Posts: 2742
    • View Profile
    • Lix
Re: [WIP] L3DEdit: Lemmings 3D Level Editor
« Reply #5 on: June 06, 2019, 02:06:24 pm »
Very nice. I think isometric is perfect for editing.

It's merely problematic when you must view rooms from the inside. OpenRCT2 offers cut-away view: User provides a height, then the drawing routines render only blocks below that height. Very powerful.

But others might have more experience with 3D software than I have, and solve the problem much better. Looking forward to what you come up with.

-- Simon

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor
« Reply #6 on: June 06, 2019, 06:32:49 pm »
Quote
It's merely problematic when you must view rooms from the inside. OpenRCT2 offers cut-away view: User provides a height, then the drawing routines render only blocks below that height. Very powerful.

My plan was more or less to do something like that, except on all axes instead of just the Y axis. I had also considered allowing setting a minimum height to render from, but thinking about it now, this seems almost pointless... except maybe if a lower layer is being confused for the one the user is trying to work on..



It seems it should also be trivial to allow importing custom graphics back into L3D - certianly much easier than doing the same for DOS Lemmings was, and we managed that! I'm not going to implement this feature at first, because it'll be nice to simply see what we can create with the official stuff for a while (plus some minor technical questions - more of the "how should I approach this?" kind than the "how can I actually import the data?"), but there's a very good chance it'll come eventually. For the most part, this shouldn't require any 3D graphics skills either, because you're simply drawing flat 2D graphics that represent each face of a cube. Custom sound / music (other than custom CD audio, which is trivial and can be done with any CD burning app) will be over to someone else to figure out, though.
« Last Edit: June 06, 2019, 06:46:57 pm by namida »

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #7 on: June 07, 2019, 12:16:28 am »
I've fixed various issues with the rotation of blocks. New and improved renders of those two levels - and a third, which would've been an absolute mess before.

You probably noticed that most animated tiles aren't displaying correctly - their info isn't quite stored the same way as regular tiles, and I haven't put much into figuring out how they do work yet.

Offline ccexplore

  • Administrator
  • Posts: 5070
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #8 on: June 07, 2019, 05:01:29 am »
I think it'd be good to experiment with tweaking the exact projection details of the view.  The "name of the game" screenshot perfectly illustrates the difficulties of judging distance/height in the current view.   Is the 3 and the D on the same height level with one column of spaces in between, or is the 3 actually one unit higher than the D but touching together at their edges?  In the current perspective the two cases would look exactly the same.  I realize all projection schemes will have such ambiguous cases but maybe tweaking the details can at least make ambiguities less common/apparent in typical cases.  And I suppose being able to view same level in multiple preset camera angles can also perhaps compensate for this issue.

Applying faux-lighting on the 3 visible faces of the cube might also be helpful in enhancing the 3D look.  That is, apply alpha to render the 3 faces at slightly different brightnesses.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #9 on: June 07, 2019, 05:06:26 am »
Quote
I think it'd be good to experiment with tweaking the exact projection details of the view.  The "name of the game" screenshot perfectly illustrates the difficulties of judging distance/height in the current view.   Is the 3 and the D on the same height level with one column of spaces in between, or is the 3 actually one unit higher than the D but touching together at their edges?  In the current perspective the two cases would look exactly the same.  I realize all projection schemes will have such ambiguous cases but maybe tweaking the details can at least make ambiguities less common/apparent in typical cases.  And I suppose being able to view same level in multiple preset camera angles can also perhaps compensate for this issue.

I'm considering this - perhaps even to the extent of supporting a couple of different projections.

Quote
Applying faux-lighting on the 3 visible faces of the cube might also be helpful in enhancing the 3D look.  That is, apply alpha to render the 3 faces at slightly different brightnesses.

Hm, I'll keep this idea in mind.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #10 on: June 07, 2019, 08:24:36 am »
Quote
I'm considering this - perhaps even to the extent of supporting a couple of different projections.

And it's happened.

Offline kieranmillar

  • Posts: 223
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #11 on: June 08, 2019, 09:12:06 pm »
I just wanted to say that this is really cool. Good luck!

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #12 on: June 09, 2019, 01:04:48 am »
I've posted a lot of updates in Discord, but not so much in this topic. Here's a screenshot that does a good job of summing up the recent progress - compare it to earlier screenshots of the same level. ;)

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #13 on: June 09, 2019, 11:28:34 am »
The two different pyramid block shapes (compare those on top of the pyramids, to those on top of the poles near the start) really threw me off for a bit. It took me a while to realise they are actually different, I wasn't just repeatedly getting things wrong.

But now, of the 14 not-L3D-crashing block shapes, I've implemented support for 10 of them - the remaining four being 22.5 degree slopes, diagonal corner slopes, and the upside-down equivalents of each.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #14 on: June 10, 2019, 03:47:17 am »
And bam, all 14 known block shapes are supported.

12 of these should be rendered accurately* to how L3D renders them. The last two I have made an intentional decision to forego some accuracy in terms of texture orientation / cropping (while still maintaining accurate shape), simply because the way L3D handles such is really complex and I had already spent far too much time just getting those block types working in general. I suspect that most people will not notice the inaccuracy in question.

* "accurately" here does not quite mean to the extent of "pixel perfect".

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #15 on: June 10, 2019, 04:00:26 am »
Here's up-to-date screenshots of the same levels I've posted earlier in the topic - look at the differences! :D

Take A Dive hasn't changed too much from the recent ones, though look at the area near the exit.

Family Tree also hasn't really changed much; just some textures that are correct that weren't before.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #16 on: June 10, 2019, 07:41:02 am »
There's probably nothing to be found here, but just in case - if anyone feels like doing something tedious and boring, extract this to your Lemmings 3D LEVELS folder, then let me know if any level between Fun 1 and Tricky 12 can be played without L3D crashing (and which one(s)).

Not looking into this myself because I feel other stuff is more promising, but it's here in case anyone else wants to try.

Offline Pooty

  • Posts: 324
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #17 on: June 10, 2019, 05:19:47 pm »
I've gone through the test levels, and here's my findings.

All levels crashed (Error: A block definition has more than 8 points) except the following:
Code: [Select]
   Fun 06  Loaded and playable
   Fun 10  Loaded and playable
   Fun 16  Loaded and playable
   Fun 18  Loaded and playable
   Fun 20  Loaded, playable, but crashes on restart

Tricky 02  Loaded and playable
Tricky 04  Loaded, hangs on preview, hangs on gameplay at certain viewing angles
Tricky 06  Loaded and playable
Tricky 09  Loaded, playable, game hangs at very particular viewing angles (much easier to reproduce using preview)
Tricky 12  Loaded, playable, but crashes on restart if test block has been observed

None of these levels produced a good block.
SEGA Master System version
100% on 110/120 levels (92%). Other levels [Lemmings lost]:
Fun 03 [3], 06 [2], 18 [5]   
Taxing 19 [5], 27 [1], 28 [3]
Tricky 15 [5], 17 [2]
Mayhem 19 [7], 26 [10]

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #18 on: June 10, 2019, 08:26:15 pm »
These correspond to:

Quote
Block type 0x0E / Slices b0101
Block type 0x0E / Slices b1001
Block type 0x0E / Slices b1111
Block type 0x0F / Slices b0001
Block type 0x0F / Slices b0011
Block type 0x0F / Slices b0101
Block type 0x0F / Slices b0111
Block type 0x0F / Slices b1001
Block type 0x0F / Slices b1100
Block type 0x0F / Slices b1111

I notice several of the ones that work have invalid slice values. :O

Offline Pooty

  • Posts: 324
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #19 on: June 10, 2019, 10:19:48 pm »
These correspond to:

Quote
Block type 0x0E / Slices b0101
Block type 0x0E / Slices b1001
Block type 0x0E / Slices b1111
Block type 0x0F / Slices b0001
Block type 0x0F / Slices b0011
Block type 0x0F / Slices b0101
Block type 0x0F / Slices b0111
Block type 0x0F / Slices b1001
Block type 0x0F / Slices b1100
Block type 0x0F / Slices b1111

I notice several of the ones that work have invalid slice values. :O

The reason the slice value bits have to be consecutive is because it's the only way you are able to prevent more than 8 points (or vertices) from being used to create a standard three-dimensional shape. Block types 0x0E and 0x0F are undefined, so weird things are happening here.
SEGA Master System version
100% on 110/120 levels (92%). Other levels [Lemmings lost]:
Fun 03 [3], 06 [2], 18 [5]   
Taxing 19 [5], 27 [1], 28 [3]
Tricky 15 [5], 17 [2]
Mayhem 19 [7], 26 [10]

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #20 on: June 11, 2019, 08:06:28 am »
Here's a few new screenshots. If you squint really hard, you might notice a difference from earlier ones (other than just that these are mostly different levels).

Offline SQron188

  • Posts: 154
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #21 on: June 12, 2019, 05:09:51 pm »
I've never played Lemmings 3D myself, once this project is playable, it may be my first chance to play the game. I even like looking at the renders themselves, they're chonky but as such remind me of low-poly 3D stuff like Quake, Crash Bandicoot and Silent Hill.
Good luck with the project!

Offline ccexplore

  • Administrator
  • Posts: 5070
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #22 on: June 12, 2019, 07:23:48 pm »
I've never played Lemmings 3D myself, once this project is playable, it may be my first chance to play the game.

Um, this is just a level editor though, not a level player.  You still need Lemmings 3D to actually play levels.  You can probably find a copy of that anyway on the Internet, you don't need to wait for a completed editor to play the official Lemmings 3D levels. ;)

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #23 on: June 12, 2019, 08:31:27 pm »
I've never played Lemmings 3D myself, once this project is playable, it may be my first chance to play the game.

Um, this is just a level editor though, not a level player.  You still need Lemmings 3D to actually play levels.  You can probably find a copy of that anyway on the Internet, you don't need to wait for a completed editor to play the official Lemmings 3D levels. ;)

If the version you acquire has the terrain on Tricky 10, Tricky 14, Tricky 20 and Mayhem 5 blacked out, let us know. Many abandonware sites have copies with a corrupted TEXTURE.000 file (only used by these four levels); simply replacing it with a good copy resolves the issue, and we can easily provide that.

You'll also need DOSBox to play it. If the copy you "acquire" is the CD version, note that the CD version will refuse to run unless (it thinks) a CD drive exists. This is weird, because it doesn't actually care whether the Lemmings 3D disc is in the drive (or even if any disc is at all), just that a CD drive exists. The floppy version does not have this issue, but cannot play CD audio (it can, however, play the CD animations, if you copy them across from a CD copy).

You'll probably need to get the PC version working one way or another if you want to make or play custom levels - if the editor works as-is with the Playstation and/or Saturn versions, cool, but at this point I have zero intention of specifically trying to make it compatible (my first priority is getting it working 100% with the full version of L3D, and then after that the demos and Winterland - and once that's done, chances are my next focus will be making some levels). At the very least, it'll probably require a copy of the graphic files from the PC version. If you just want to play the original game though, the Playstation version may be the easiest way to do this.
« Last Edit: June 12, 2019, 08:45:46 pm by namida »

Offline Flopsy

  • Posts: 702
  • Gotta Go Fast
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #24 on: June 13, 2019, 01:32:33 am »
I only have the PlayStation version of the game myself, I guess it never occurred to me that I'd have to acquire the PC version of the game myself. It's a good job you pointed this out.

But yeah if you have a PlayStation, PS2 or PS3 then they will all be able to play the PSX 3D Lemmings (In fact my YouTube LP was recorded on a PS3 if I recall)
SEB Lems (160 levels)
MegSEGAbytes (40 levels)
Gotta Go Fast (in progress)


Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #26 on: June 13, 2019, 11:42:18 am »
All "objects" (as in, the pieces for which the data is stored between 0x8200 and 0x101FF in the level file) except for so-called "walls" are now rendered. The rendering is somewhat weird in some cases, but for now my focus is on making it all work - I'm going to come back and tidy up the rendering later.

Offline 607

  • Posts: 393
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #27 on: June 13, 2019, 02:16:07 pm »
This is very cool!

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #28 on: June 14, 2019, 01:06:06 pm »
Now hang on a second... I'm sure I don't recognize this level. ;)

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #29 on: June 14, 2019, 02:19:53 pm »
While there's still some bugs (not to mention a lot of not-yet-supported features; I did have to do some things like setting the cameras via a hex editor, and the BLK file is just taken from an official level with some slight (hex-edited) modifications), L3DEdit has just produced its first custom level!

I haven't tested this too thoroughly. I've confirmed the intended solution is possible and not too tricky to execute, but I haven't made much effort in the way of de-backrouting.

Please use the "SpaceStation-CD.zip" version if you use CD music, and "SpaceStation-Midi.zip" if you use midi (or soundcard) audio. The two versions are identical except for a music-related setting.

EDIT: Removed; see next post for an updated version.
« Last Edit: June 14, 2019, 10:17:36 pm by namida »

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #30 on: June 14, 2019, 10:25:27 pm »
Here's an update that fixes a backroute, and enforces a trick that wasn't as required as I thought it was.

(I actually thought of - and subsequently fixed - another backroute, just seconds before I hit "post". That's why there was a bit of a delay between editing the previous message and posting this one.)

As a reminder, since we're on a new page of posts - download the "CD" version if you use CD audio, and the "midi" version if you use midi (or soundcard) music. The only difference between the two versions is a music-related setting.

This level will replace Fun 1, although I'd say difficulty-wise it'd fit into early to mid Mayhem.

Another backroute has been found, but I haven't got a fix ready yet. I'll update when I do. EDIT: Got it, see 2 posts down.
« Last Edit: June 15, 2019, 01:55:21 am by namida »

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #31 on: June 14, 2019, 10:31:17 pm »
Back to talking about the editor - from developing Space Station, I'm starting to feel that mouse control is really awkward for this. I'm going to look at also implementing keyboard-based controls for block placement (mouse will be retained as a secondary option, but it's actually quite awkward so I'd rather not present it as the main option).

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #32 on: June 15, 2019, 01:55:49 am »
New copy of Space Station. See two posts above for more info.

EDIT: Also attached is a replay file you can use with L3DReplay to see the intended solution.
« Last Edit: June 15, 2019, 09:50:22 am by namida »

Offline ccexplore

  • Administrator
  • Posts: 5070
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #33 on: June 15, 2019, 06:19:59 am »
Back to talking about the editor - from developing Space Station, I'm starting to feel that mouse control is really awkward for this. I'm going to look at also implementing keyboard-based controls for block placement (mouse will be retained as a secondary option, but it's actually quite awkward so I'd rather not present it as the main option).

Still not yet having played the game, I gotta ask:  how was experience of mouse-selecting lemmings to assign skills to in the game itself?

I guess one main difference is with the editor and unlike the game, select is just the first step, you also need to then move the selected thing around freely in 3D, which definitely sounds better with keyboard control.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #34 on: June 15, 2019, 06:34:43 am »
L3D works on a block-based structure, so you'd edit it similar to a tilemap than a L1 level - so there's no moving things around per se.

In the actual game, it's not bad; on top of that, the game has a Highlight Lemming feature.

Offline ccexplore

  • Administrator
  • Posts: 5070
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #35 on: June 15, 2019, 06:53:23 am »
Well I suppose you could start with only offering tilemap-based editing.  Keep in mind that L2 also actually uses a tilemap (at least for terrain), but imagine how painful it'd be to create custom levels there if you have to do it tile by tile.  At some point, the need will arise to at least be able to move a group of blocks together in order to tweak the position of something you've already created in the level.  Yes, all positions you move to must snap to the block grid, but you'd still want to be able to move the thing, rather than having to re-create it block by block in the new position.

Offline Simon

  • Administrator
  • Posts: 2742
    • View Profile
    • Lix
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #36 on: June 15, 2019, 02:00:58 pm »
Tilemaps (predefined clusters of the smallest possible blocks) are highly worthwhile. When geoo wrote Lix code to load L2 tilesets, first, he offered both the small blocks and the entire tilemaps. After consideration, we ditched the small blocks and only offered the tilemaps.

Probably more worthwhile in L3D to keep the small blocks in addition to the tilemaps.

-- Simon

Offline ccexplore

  • Administrator
  • Posts: 5070
    • View Profile
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #37 on: June 15, 2019, 02:25:54 pm »
Hmm, I didn't realize tilemaps imply clusters, I actually thought namida was saying his editor will (at least initially) only support editing the smallest possible blocks.  But maybe I misread what he said.

In thinking about other games like Chip's Challenge and Baba is You, I can actually envision still reasonably usable editors for those games that don't offer any move/cut/copy-paste features, so I can kind of see why namida may choose to fashion the L3D editor similarly at least on first iteration.  But I still think move/cut/copy-paste editor features (and predefined clusters if available) may be more needed for Lemmings games compared to those other games, given how one would construct terrain.

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #38 on: June 15, 2019, 09:05:32 pm »
Those kind of features are intended to be implemented eventually, but will most likely not be in the first release - it will indeed be on a block-by-block basis.

Due to the way Lemmings 3D works, predefined clusters also are not practical for it. First, just as some background info for anyone reading this - L3D does not work on a pixel-perfect basis like L1 or anything resembling that, but rather would be more comparable to the tile-based physics of the NES and GB versions. In terms of the elements relevant to the current discussion, a level is made up of 16384 blocks (32 x 16 x 32).

Lemmings 3D doesn't have tilesets, just texture sets - or more accurately, each level defines its own tileset, using one of about 30 texture sets (almost all styles have more than one texture set corresponding to them - Computer has the most, at 5, while Lemgo and Candy have the least, at one each). Each level has its own individual palette of up to 64 blocks - this palette defines the graphic of each face, as well as some physics properties such as whether the top side is slippery, water, or splat-resistant. (Some features are also controlled simply by the block's index in the palette. Block #0 is always an entrance, block #1 is always an exit, block #2 is always a splitter (or unused). The last special block, as far as I've been able to tell, is block #8, but I only know specifically at this point what #0, #1, #2 and #6 do.) I'll refer to these as the "metablocks", similar to what's done in L3DEdit's source code.

The shape (eg. it could be a slope, or even a corner where two slopes meet) is a property of the individual block instance, not the metablock. An instance of a block can, just like in-game physics, be divided into four vertical slices, though it is not possible to have middle slices missing - within a single block slot, all present slices must be consecutive. On the X and Z axes, the block acts as a single indivisible unit - a basher will only take out the bottom half of a block vertically, but each (equivalent of a) stroke takes out an entire block in the horizontal direction.

So it's quite possible to have predefined shapes made up of blocks, but it's a bit hard to have any reasonable way of predefining the actual blocks that go into it - except on the basis of this purely being a user-driven save / load arrangements feature.

And copy and paste should come first - not the least because saving and re-loading user-defined shapes is essentially just "advanced copy & paste".
« Last Edit: June 15, 2019, 09:32:00 pm by namida »

Online namida

  • Administrator
  • Posts: 9640
    • View Profile
    • NeoLemmix Website
Re: [WIP] L3DEdit: Lemmings 3D Level Editor - Development Topic
« Reply #39 on: June 16, 2019, 02:33:53 am »
I've now made the first public release of L3DEdit, so I've created a new topic and thus locked this one.

New topic: https://www.lemmingsforums.net/index.php?topic=4274.0