[+][BUG][PL] Error when hovering over teleporters/receivers in Physics View

Started by IchoTolot, November 15, 2026, 03:01:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchoTolot

I received a level for the LDC34 that has a lot of teleporter/receiver pairs. I attached it to this post.

When hovering over teleporter/receiver pais in true-physics-mode you get an error that throws you back to the menu.

It happens in the regular version, but I bet it also effects CE.

I received additional information from the author:

QuoteI also should mention that when i was designing this i ran into a problem that this many teleporters wouldn't work unless I made sure that all the teleporter objects were listed before any other of the interactive objects. since that interactive object list system only has 256 slots which allows for a max of 128 teleporter pairs and I include 126. So getting it to run took a little text editor work.

I bet here is the core of the problem.  ;)

So the object list should probably be made more robust and either allow these instances or be much stricter so that users can't game the system and create edge cases like this.

What's the best move, I am not sure.  ???

EDIT:
Additonal information from Armani:

QuoteIn cpm each teleporter/receiver pair(also portals, in the same way) gets a helper icon showing a letter A, B, C, ... The renderer use the pair number directly as an index into the helper icon enum but that enum has only 26 letter icons A~Z.  this is where the problem arises

So..

1) From the 27th pair onward, the index points to unrelated icons so the label shows a wrong one.
This doesn't break the NL but ideally should be fixed anyway.

2) From the 55th(could be slightly wrong) pair on, the index goes past the end of the helper image array, which triggers an error message.
The game is still playable as long as you don't turn on the cpm and hover your mouse over the broken objects.

The cleanest fix I can think of: instead of the direct enum cast, add a local procedure and pair 26 and up are drawn as two alphabets (AA, AB, ..., AZ, BA ... and so on)

IchoTolot


JRT

Quote from: IchoTolot on November 15, 2026, 03:01:50 PMI also should mention that when i was designing this i ran into a problem that this many teleporters wouldn't work unless I made sure that all the teleporter objects were listed before any other of the interactive objects. since that interactive object list system only has 256 slots which allows for a max of 128 teleporter pairs and I include 126. So getting it to run took a little text editor work.

Yes and to add a bit more specificity. The game would run otherwise just fine but when lemmings entered the IN teleporters they would vanish and then never materialise on the other end. and if memory serves you see a flash as if a lemming is teleporting in but never does and that's always on the last placed teleporter (I think). This weird behaviour can be easily reproduced.

WillLem

Unless namida reopens NeoLemmix development, this will not be fixed for vanilla NeoLemmix 12.14. However, we may be able to find some solution for NeoLemmix CE.

Reading over this, my instinct is to simply disallow more than 26 teleporter/receiver pairs. More than this probably shouldn't be supported in NeoLemmix anyway, particularly if we have to start resorting to indexing hacks to get it to work.

I'll certainly be applying this cap in SuperLemmix (where the problem likely also exists). Happy to discuss implementing the cap (or not) in NeoLemmix CE, so please reply if you believe we should be supporting 27 or more pairs.

Simon

Quote from: WillLem on November 15, 2026, 08:50:37 PMinstinct is to simply disallow more than 26 teleporter/receiver pairs

Then CE won't be a drop-in replacement for NL anymore.

To reject >= 27 pairs, you'd need to get wide consensus that putting more than 26 pais is a level design error even in namida's NL. The exact rule for the future (explicitly limit to 26, or allow >= 27) doesn't matter much to me, but I recommend against a split of the ecosystem.

-- Simon

Crane

Why must there be a restriction?  My understanding is that it's because there's no letter after Z.  Can't you do what spreadsheets do and start with double letters? e.g. Y, Z, AA, AB, AC etc.

WillLem

Quote from: Simon on November 15, 2026, 09:19:47 PM
Quote from: WillLem on November 15, 2026, 08:50:37 PMinstinct is to simply disallow more than 26 teleporter/receiver pairs

Then CE won't be a drop-in replacement for NL anymore.

Yes and no.

Levels with >26 teleporter pairs can load in NL 12.14, but the infrastructure is not there to officially support them (i.e. Physics View doesn't show pairings correctly for >26, and crashes for >55).

So, I'd say this is fair game for at least discussion in CE. We can immediately decide not to allow 27 or more teleporter pairs, keep Physics View as it is, and accept the loss of one or two levels.

If that's not what people want, fair enough - but I do need to hear it if I'm going to spend my time sorting this out.*

Quote from: Crane on November 15, 2026, 10:52:14 PMMy understanding is that it's because there's no letter after Z.  Can't you do what spreadsheets do and start with double letters? e.g. Y, Z, AA, AB, AC etc.

Quote from: ArmaniThe cleanest fix I can think of: instead of the direct enum cast, add a local procedure and pair 26 and up are drawn as two alphabets (AA, AB, ..., AZ, BA ... and so on)

I mean, yeah... we could do that, but is this really what people want? Levels with ridiculous amounts of teleporters? We need to spend time making sure the engine supports this?

The community confuses me sometimes. Direct drop and timed bombers are blasphemy, whilst a level with 126 teleporter pairs causing the game to crash (quite rightly IMO) is reason for a fix! :crylaugh: :forehead:

Whatever happens, if 256 is the maximum allowed number of objects in a level, I certainly don't think this should change - the limit is there for a reason (32-bit rendering comes to mind). Rather than crashing, though, the game should simply discard any others and not render them at all.

And yes, we could go A-Z, AA-ZZ, AAA-ZZZ, etc. for up to 127 teleporter pairs if that's really what people want.

We have an opportunity to think about this carefully, though. Let's take it!

*With that said, if someone else wants to fix this and send a pull request I'll happily accept it.

Crane

Straight crashes are never good and should be fixed in my opinion, especially if it's fairly easy to do.  Whether it's by supporting a ridiculous number of teleporters (the level in question slows my computer to a crawl) or by returning a clean error message if there's more than 26 or some such.  Either way, buffer overruns and the like should be prevented.

Proxima

Agreed. To be honest, "some levels cause the game to crash" is one instance I can see where it would be best (with namida's permission, of course) to make an additional update to 12.14. (And if it ends up being decided that that can't happen, such levels shouldn't be allowed in contests, and we as a community need to decide what to do to prevent them appearing in packs.)

IchoTolot

QuoteThe community confuses me sometimes. Direct drop and timed bombers are blasphemy, whilst a level with 126 teleporter pairs causing the game to crash (quite rightly IMO) is reason for a fix!

I will try to clear your confusion here:

I think capping teleporter-pairs is fine and WillLem is right.  :8():

At some point for some aspects there should be some limitations. We've got one for level size for example.

(Although direct drop is counterintuative to expectations and timed bombers are just a hassle to pull off in contrast to direct control with instant ones - but let's not open that can of worms again)

----------------------------------------------------------------------------- 

The only thing I argue for is that the engine should handle this more elegantly.


The level in question was made only possible by meddling with the textfile, otherwise it wouldn't load.

Maybe the engine should check for this and catch this earlier and refusing to load it with a clear instruction on why, instead of only throwing a weird error while playing the level in a certain way.

That way instances like this are being filtered out in the creation-phase rather than with the release when it's too late.


Armani

QuoteThe community confuses me sometimes. Direct drop and timed bombers are blasphemy, whilst a level with 126 teleporter pairs causing the game to crash (quite rightly IMO) is reason for a fix! :crylaugh: :forehead:


I don't think it's confusing at all. While levels with that many teleporters aren't encouraged by NeoLemmix culture, that's beside the point. The community dislikes hidden traps too yet if hidden traps caused NL to crash, that would still need to be dealt with, regardless of whether hidden traps are good or bad. ;)

But capping teleporter pairs count, as Simon pointed out, means CE is no longer a true drop-in replacement for NL. It also directly breaks "a level file and its corresponding replay will have the same outcome on this fork" rule, which any fork with NeoLemmix in its name should follow. Capping the count itself might be harmless on its own but I'm worried it sets a precedent for future changes that further alienate CE from the original NL.

If you don't want to spend time fixing it, I think it's okay to leave things as they are. This is the first time this quirk has been openly reported in NeoLemmix's entire history, so it's unlikely to become a frequent issue anyway.
My upcoming NeoLemmix level pack: In-development topic 8-)

Mass format converter: Anything to NXLV 8-)

My NeoLemmix level packs(in chronological order):
  Lemmings Uncharted
  Xmas Lemmings 2021
  Lemmings Halloween 2023
  Holiday Lemmings 2024 - a collaboration pack with Mobiethian :D

IchoTolot

Yeah, Simon's and Armani's point is also very valid, maybe just discouraging it would be a better course.

If you need to meddle with the textfile to make it run, there might be a reason for why it's not working in the first place.