Author Topic: bug in Lemmix/LemmixPlayer: incorrect entrance order for 3-entrance levels!  (Read 8981 times)

0 Members and 1 Guest are viewing this topic.

Offline ccexplore

  • Posts: 5311
    • View Profile
I just discovered a major bug with Lemmix/LemmixPlayer in its handling of entrance order for 3-entrance levels.  Instead of A B C B A B C B..., Lemmix is currently doing A B C A A B C A.  This needs to be fixed ASAP.

For now, to re-create the correct ordering for a level, you can edit the level by adding a 4th entrance.  Make sure it has the highest index of all entrances, and place it at the same location as the 2nd entrance.

Offline ccexplore

  • Posts: 5311
    • View Profile
Some good news:  I tested a little more and find that Lemmix has the correct 3-entrance ordering for DOS Original Lemmings, so it looks like this is affecting only ONML and Holiday Lemmings on Lemmix.

I suspect this might be an unintended consequence of handling the quirky ABBA 2-entrance order unique to DOS original Lemmings.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
This affects Custom Lemmings mode as well. I actually noticed this a long time ago, but never thought much of it. My level "Dig This!" has three visible entrances, and I had to put a fourth one in to get the ordering right.

Offline EricLang

  • Posts: 464
    • View Profile
I'll check this.

Offline EricLang

  • Posts: 464
    • View Profile
I'm looking around in my sourcecode. If the order is indeed wrong for the versions after original lemmings, all lemmix replays for these versions (with 3 entrances) will become invalid.

Offline EricLang

  • Posts: 464
    • View Profile
I found the bug:
In Original Lemmings the order of releasing is ABCB ABCB ABCB etc.
In the subsequent versions the order is ABCA ABCA ABCA etc.
I'll fix this as soon as possible, which will be somewhere next week, I hope.
Because I have been busy extending the LemmixPlayer with custom levelpacks, I have to do some exttra work to avoid introducing new bugs.

I'll add some way to alert the user that a replay has gone wrong. Normally when playing a replayfile Lemmix just ignores this and the user regains control over the game.

Offline ccexplore

  • Posts: 5311
    • View Profile
Actually, before fixing this, give me a chance to look at another problem ClamSpammer found, namely that in one of the Holiday Lemmings levels, a fake exit in the level worked as a real exit in Lemmix.  It shouldn't take me more than a day to work out when exactly that happens in Lemmix.  Then you could fix both.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
I'd hate to turn this into a "Lemmix wishlist" thread, but there's another game-mechanical difference between Lemmix and DOS Lemmings that we (ccexplore and I) found recently. At the moment, Lemmix cuts off all terrain beyond the left edge of the map, which DOS Lemmings doesn't do. This opens up the possibility of some glitches being used (eg. bombers falling down the side of the map if they stop walking at the exact moment they turn around) in situations where they shouldn't. The glitch itself is a part of the original game, but it should work only when the terrain piece actually ends at the edge of the map.

Offline ccexplore

  • Posts: 5311
    • View Profile
It's not a 1-day work for me to figure out where exactly the game clips the terrain at the left/right boundaries.  Granted, those boundaries are clearly outside of the boundaries the lemmings are usually permitted to walk to, but since there might be circumstances where you can force a lemming to get farther left/right than they normally could (eg. blockers?), I think it's better to hold off on that one until I've worked out the details.

The only reason I mentioned the fake exit problem is because I'm assuming the problem would be relatively easy to identify and fix, plus it has proven to affect a level from the official games.  If it turns out not easy, I'd definitely be okay with just fixing the 3-entrance issue for now.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
It's not a 1-day work for me to figure out where exactly the game clips the terrain at the left/right boundaries.  Granted, those boundaries are clearly outside of the boundaries the lemmings are usually permitted to walk to, but since there might be circumstances where you can force a lemming to get farther left/right than they normally could (eg. blockers?), I think it's better to hold off on that one until I've worked out the details.

I probably should have given more details when I posted this in the Glitches thread. Yes, you can use a blocker to push the lemmings off the side of the screen. This isn't likely to come up much (it doesn't help in any level that I'm aware of) so it's probably not a high priority to fix this.

Offline ccexplore

  • Posts: 5311
    • View Profile
Actually, before fixing this, give me a chance to look at another problem ClamSpammer found, namely that in one of the Holiday Lemmings levels, a fake exit in the level worked as a real exit in Lemmix.  It shouldn't take me more than a day to work out when exactly that happens in Lemmix.  Then you could fix both.

Ok, I immediately see what the problem is when I examine Blitz 3 in LemEdit and then in Lemmix.  Actually I think it was something I've pointed out to Eric a long while ago.

Basically right now Lemmix cannot handle "gaps" in object indices.  When loading/saving levels it will effectively re-index all objects with consecutive numbers starting from 0.  Although the ordering of objects by index is preserved, obviously this renumbering can cause problem with fake objects becoming non-fake.

For example, in the Holiday Lemings levels, after using indices 0-13 for objects (mostly for the decorative top parts of the exits), it skips to 16 for the entrance and then 17 for the leftmost fake exit.  Lemmix however cannot handle this gap, and so 16 becomes 14 and 17 becomes 15, which is how the leftmost fake exit becomes functional in Lemmix.

I don't know how easy or hard it is to fix, and I guess it only affects levels that have fake objects, which are rare (certainly rarer than 3-entrance levels).  So I'll leave it up to Eric to decide when to fix this.

Offline lorcan

  • Posts: 17
    • View Profile
Maybe a stupid question... How does the original  Holiday Lemmings game interpret/detect/know that the other doors in this level are fake? Something to do with coordinates? Something in the level description which overwrites the trigger effects specified in the graphic sets? You told about gaps in the interactive objects indices in a level, what happens in the original DOS game concerning these indexes? I don't know such a rule which mentions that such or such indice gives a fake door... So this interests me :) Same thing with other traps?

Offline ccexplore

  • Posts: 5311
    • View Profile
The level file format has 32 slots for objects, numbered 0 to 31 (that's what the "index" is referring to).  Basically, the game only processes slots 0 thru 15 for collisions with lemmings, so objects placed in slots 16 or higher are "fake" and will not affect lemmings (entrance trapdoors are the exception, since they do not operate on lemmings, they just put out new ones).  This includes exits as well as traps, one-way walls, water/lava, etc.

This behavior holds for all versions of DOS Lemmings (original, Oh No and Holiday).  I don't know for sure if they hold for other platforms (eg. Amiga) but it's possible, or at least they probably have something similar if not exactly 0 thru 15.  I think Blitz 3 is the only level though that actually make use of this feature.

Offline lorcan

  • Posts: 17
    • View Profile
Wow! I didn't know this! I knew that there were only 32 x 8 byte slots in a level reserved for objects but I didn't know about the last 16 inactive objects. Thanks for this information ccexplore  ;)

BTW it appears to me that you know tons of things regarding the original game mechanics/data structure/etc.  and I already knew you're a Lemmings guru ;) Have you written extra articles in addition to those available in the Lemmings Archive? (aka http://camanis.net/lemmings/tools.php). Or do you know where I can find such articles/analysis documents? This could help me to learn new things and avoid mistakes in my remake project  :D

Thanks!  ;)

EDIT: I've just tested the Amiga version and the behavior is the same (doors are fake)

Offline ccexplore

  • Posts: 5311
    • View Profile
EDIT: I've just tested the Amiga version and the behavior is the same (doors are fake)

Of course they would be, otherwise that level wouldn't work, since the whole point is that all but one exit is fake.

What I haven't tested is whether Amiga has only 32 slots for objects and where the index cut-off is between real and fake objects.  Presumably the internal level format is probably very similar if not identical between Amiga and DOS, but to my knowledge no one has actually verified this yet.  [edit: actually now I remember Mindless did port the Amiga versions of original Lemmings levels over to DOS, so the level file format is probably identical in Amiga and DOS.  But the real/fake index cut-off might still be different]

Note that the Amiga version, many levels have additional water/lava objects that are missing in the DOS version.  I've always wondered if some of those objects may have index higher than 15 and if so, whether their fakeness (if indeed they are fake) can actually be tested out in the actual level.

Quote
BTW it appears to me that you know tons of things regarding the original game mechanics/data structure/etc.  and I already knew you're a Lemmings guru ;) Have you written extra articles in addition to those available in the Lemmings Archive? (aka http://camanis.net/lemmings/tools.php). Or do you know where I can find such articles/analysis documents? This could help me to learn new things and avoid mistakes in my remake project  :D

It can be tricky trying to capture the DOS Lemmings mechanics, with all its idiosyncrazies, in English.  I believe Eric had released the source code for Lemmix (written in Delphi) on this website, so if you have some programming background, that might be your best bet in learning the details of the DOS Lemmings game mechanics.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
Note that the Amiga version, many levels have additional water/lava objects that are missing in the DOS version.  I've always wondered if some of those objects may have index higher than 15 and if so, whether their fakeness (if indeed they are fake) can actually be tested out in the actual level.

Looking at the screenshots on The Lemmings Encyclopedia, there are definitely some levels with more than 16 objects where you could test for fakeness. Good ones to try would be Tricky 7, 13 and 22, and Fun 20.

Offline lorcan

  • Posts: 17
    • View Profile
A first thing to know about these levels is that water only exists in the Amiga version, not in the DOS version. In the DOS version it's simply empty where the Amiga version has water. So in the DOS version lemmings die by falling into the void, and they die by drowning into the water in the Amiga version.

I've just checked Tricky 7 in the Amiga version and water on the right of the level is indeed fake (between the 2 last pillars). This confirms the index theory  ;)  Look at the attached screenshot.

EDIT: The Windows version has also no water traps in these levels ;)

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
I know someone made a remake of DOS lemmings with the missing objects included, but I don't know who.  If you have that version, you MIGHT be able to test with that, though I am not sure how accurate the indexing on objects is on that version.  If they were direct ports done by some random method, then probably accurate, but if they were added in manually, then it's one of those maybe, but probably not situations..  btw, if anyone knows who made this version, I'd like to know.

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
That was DragonsLover's "corrected version". I don't know how that was done exactly, but it might be worth checking.

Re: pic: How did you get there without using any time or skills?

Offline lorcan

  • Posts: 17
    • View Profile
Quote
Re: pic: How did you get there without using any time or skills?

Well I don't know if it has something to do with "Amiga Forever" or my Lemmings ADFs, but the skill panel seems not to refresh. The only working things are the IN/OUT lemmings and the release rate. The other buttons don't change. So YES I used skills (bashers, miners, blockers and builders).

Quote
That was DragonsLover's "corrected version". I don't know how that was done exactly, but it might be worth checking.
Yes indeed. If someone knows where to find this correction version, this would interest me too :)

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Are you able to run out of skills?  For instance, would it be much more easily possible to save 100% on Cascade, a feat which I have seen on YouTube, though I don't know if it works on every version with the level or not, so whether its possible or not on your game MIGHT vary.  I don't remember what version the person was using, though I think it was either SNES or Genesis.  You might want to look it up if you are curious.

Offline lorcan

  • Posts: 17
    • View Profile
Indeed the number of available skills doesn't decrease  ;P so I'm not able to run out of skills  :-\ Anyway I looked at the Amiga version just to check the fake doors and traps  ;) Maybe I should check another Amiga emulator or maybe my ADFs are wrong... I don't know.

BTW I noticed that the SNES has better graphics? Or do I mistake the SNES version for another version?

Offline ccexplore

  • Posts: 5311
    • View Profile
Are you able to run out of skills?  For instance, would it be much more easily possible to save 100% on Cascade, a feat which I have seen on YouTube, though I don't know if it works on every version with the level or not, so whether its possible or not on your game MIGHT vary.  I don't remember what version the person was using, though I think it was either SNES or Genesis.  You might want to look it up if you are curious.

It's obvious that a real Lemmings game would never let you have infinite skills, so I suspect lorcan's version might be hacked somehow, or perhaps he has some sort of cheats enabled in the emulator or something.

Anyway, the 100% solution for Cascade doesn't use any glitches, so it should work on pretty much any version of the game that uses the DOS/Amiga game mechanics.

Offline ccexplore

  • Posts: 5311
    • View Profile
That was DragonsLover's "corrected version". I don't know how that was done exactly, but it might be worth checking.

If I recall correctly, Mindless was able to rip the level files from Amiga Lemmings.  Those levels are what DragonsLover used for his "corrected version".

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
I'm just wondering, is there a level editor for the Amiga version of the game?

Offline ccexplore

  • Posts: 5311
    • View Profile
I'm just wondering, is there a level editor for the Amiga version of the game?

Back on the old old forums, Mike Dailly, one of the programmers/designers for Lemmings, told us he found his old floppy disk that has the Editor DMA uses to create the Lemmings levels, and that runs on the Amiga.  However, I don't think he was able to get his computer to read the floppy.  He did have a screenshot of it though.

That said, I believe the level file formats are identical on the Amiga version, so any level editor that works for DOS Lemmings also works for Amiga Lemmings, as long as the editor doesn't have to run on an Amiga and you have the means to transfer files from a PC to an Amiga (or an emulation of Amiga).

Offline Mindless

  • Posts: 722
    • View Profile
    • Lemmings Level Database
That said, I believe the level file formats are identical on the Amiga version, so any level editor that works for DOS Lemmings also works for Amiga Lemmings, as long as the editor doesn't have to run on an Amiga and you have the means to transfer files from a PC to an Amiga (or an emulation of Amiga).

The problem is that the level files were compressed, and only a decompressor is available (afaik), so you can't put levels back into the game.

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Ah.  Although I do miss the 100 lemmings.  I wonder if someone would be able to edit the DOS exe to support 100 lemmings?

Offline Clam

  • Posts: 2187
  • Smiley: :8():
    • View Profile
If someone knows where to find this correction version, this would interest me too :)

I just found a place where you can get it. DragonsLover put a download link in this post on the old Lemmings Community forum.

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
I must try this incorrect Amiga version.  That just seems like it would be fun to try (although very pointless)

Offline ccexplore

  • Posts: 5311
    • View Profile
That said, I believe the level file formats are identical on the Amiga version, so any level editor that works for DOS Lemmings also works for Amiga Lemmings, as long as the editor doesn't have to run on an Amiga and you have the means to transfer files from a PC to an Amiga (or an emulation of Amiga).

The problem is that the level files were compressed, and only a decompressor is available (afaik), so you can't put levels back into the game.

What?? ??? You're the one who wrote the compressor program for DOS!  (Unless you're a different Mindless from the one on the old old forum.)  Not to mention that LemEdit and Lemmix can handle compressed levelXXX.dat levelpak files no problem.  And since AFAIK the compression is identical in DOS and Amiga Lemmings (otherwise you couldn't have extracted the levels from Amiga in the first place), you should be able to put levels back into the game just as you could edit the levelXXX.dat files in DOS Lemmings.

Offline lorcan

  • Posts: 17
    • View Profile
Thank you very much Clam Spammer  ;) I'll have a look asap

Offline Dullstar

  • Posts: 2094
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
W H A T ? !

Actually, if it's possible to add hard drive lemmings to Amiga emulators, it's probably possible to attempt to add levels.

btw, does anyone have a way to contact Mike Dailly?  I'd like to know if he tried to start the disk on an actual Amiga or at least an Amiga emulator.  The few other people who worked on lemmings might also have disks that could be tested.  Also, I must ask how something can be decompressed but not compressed.

We could have this Mindless prove he's the REAL Mindless by telling him to use his avatar he had on the old forums.  I deleted my AdBlock Plus filter on his old avatar, so...