Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: Proxima on November 19, 2022, 04:33:38 AM

Title: [BUG][PLAYER] Levels sometimes don't preview
Post by: Proxima on November 19, 2022, 04:33:38 AM
In the level select menu, clicking on a level sometimes doesn't display its preview, but continues to show the preview of the old level.

I observed this with the pack BadLems (https://www.lemmingsforums.net/index.php?topic=5558.msg91736#msg91736), and it might be because some of the levels have the same ID. I spent some time clicking on levels in Lemmings Redux and they all previewed correctly.

If it's decided that this won't be fixed because having levels with the same ID is just something you should not do, then I would suggest that packs on the NeoLemmix Levels board should be fixed to avoid this issue.
Title: Re: [BUG][PLAYER] Levels sometimes don't preview
Post by: namida on November 19, 2022, 07:33:42 AM
Packs should be fixed to avoid ID collisions regardless, but (if that is the cause) it should nonetheless be fixed. In particular, physics / bug test levels that aren't intended to be played seriously, I wouldn't necesserially expect the same efforts to avoid ID collisions to be made for those (and indeed, I don't always do so myself), but preview differences could still be important to see. I vaguely recall writing code to cache level previews; it's very possible that it identifies the level based on level ID (and if so, it can probably be changed to instead rely on file path).

Beyond that, I'd have to look into it to say if that is indeed the cause (and if not, what is).
Title: Re: [BUG][PLAYER] Levels sometimes don't preview
Post by: kaywhyn on November 19, 2022, 08:45:56 PM
I can confirm that this happens with levels having the same level ID. I observed this on both Amiga 6 and Amiga 7 of Zemmings Complete at the beginning of this year in my outros video of my LP of the pack. The preview picture in the level select menu is the same, but the skillsets for each level are different and correct when switching between the two levels. At the time, I didn't know what caused that.
Title: Re: [BUG][PLAYER] Levels sometimes don't preview
Post by: namida on November 19, 2022, 10:13:48 PM
Okay, so it doesn't seem to outright cache them; it just doesn't regenerate it if the previously-rendered preview was for a level with the same ID as the current one. It should be easy enough to change this to use another factor (I believe performance reasons is why this happens at all; so not going to remove the check altogether).
Title: Re: [BUG][PLAYER] Levels sometimes don't preview
Post by: namida on November 20, 2022, 01:48:04 AM
Fixed in commit 51fa561.