[-][BUG][PL] Splat Ruler lags, can freeze NL/CE for seconds

Started by Simon, June 03, 2025, 09:09:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Simon

NL 12.14 on Ubuntu in Wine 10.0
CE 1.0.1 on Arch Linux in Wine 10.6

The splat ruler lags the entire engine as long as it's active.

Repro:

  • Play different levels in NeoLemmix for 2 hours. (I believe? Some preparatory step here is necessary because I can't repro it here on a fresh program run. Or do I have to screenrecord NL? I doubt it.)
  • Play Turrican's level Space Program 10,000 BC v1.01, it's attached. It's large and it contains many special tiles. The file alone is 400 KB.
  • Scroll around (with right-click scrolling) to get a feel for performance without the splat ruler.
  • Tap the key for the splat ruler.
  • Scroll around (with right-click scrolling) to get a feel for performance with the splat ruler.

CE froze for several seconds. If I hold (not merely tap) the key for the splat ruler in step 4, CE froze for 10 seconds, then stuttered at 1 frame per second. It was severe in my livestream from 2025-05-28:

Video: Splat ruler freezes CE for 5-10 seconds (70 seconds long, 4.4 MB)

NL/CE return to regular performance (= less lag) after we release the key. And if we play more/different levels afterward, the ruler doesn't dent the performance anymore there, even after it had dented performance on Space Program 10,000 BC.

Backgrounds on/off seems to make no difference. Can't test again now because step 1 is hard to guess/repro. So strange that it doesen't reproduce immediately after a fresh game run. So hard to guess what's going on internally ... it's such lag, and only on Turrican's level. And why do other levels run fine afterward even with the ruler?

Quote from: Guigui on June 02, 2025, 11:43:07 PMon my machine, the ruler is a bit laggy. When I press the key it appears correctly, but it stutters when I try to move it accross the screen. To move it, I better make it disappear, then reappear again elsewhere, not very handy.
Is it just me (running NeoLemmix on Ubuntu + Wine) or all NeoLemmix users ?

-- Simon

Guigui

Thank you simon for creating this thread following my off-topic question in the other thread.

To precise my experience with NL on Ubuntu with Wine 10 : splat ruler stutters each time, no matter how long you've been running the game for and which level you are playing.

It just appears where it is supposed to, then follows the mouse with many many frames of delay, or does not follow at all if you move mouse too fast.
This is amplified if the level happens to have many Lemmings on screen and animated object. Things go a bit better if you pause the game prior to display ruler ; but not good enough to make it actually usable like it is supposed to.

Reading simon's experience with it, I'd guess this is all related to running the game via Wine on a Linux OS. It would be nice if some native Windows users could share their experience with the performance of splat ruler.
Bravo jolie Ln, tu as trouvé : l'armée de l'air c'est là où on peut te tenir par la main.

WillLem

#2
Finally got around to testing this on Windows. I can't get CE to outright freeze, but on larger levels (such as Turrican's, which are massive) there is noticeable lag when using the splat ruler, especially in hi-res. In my personal opinion, it's not that much of an issue; it's comparable to the lag experienced when running enormous levels on NL/CE in general. It may be much worse on Wine, but I have no way to test this and I'm unsure as to why it would be significantly different in that setup.

My instinct here is to simply display a warning to users when a level is above a certain size or uses more than a certain amount of animated resources. It doesn't fix the behaviour, but would likely discourage level designers from making levels that are big enough (or busy enough) to end up triggering the warning.

Ultimately, NL/CE is limited by its 32 bit graphics engine. It's not something I'd be interested in updating without signifcant help from another developer, as I imagine it would involve extensive re-writes to a lot of the rendering code. We'd almost be better off creating a new engine that can handle higher resolution sprites and levels if that's what people want. Something like a PS2 Lemmings clone with an emphasis on graphical fidelity from the getgo would be better for supporting larger and more graphics-intensive levels. As it is, NL/CE just simply isn't set up for that sort of thing.

I realise that might not be the answer people were hoping for, but it's something I too have had to accept about the engine during my own adventures with it. SuperLemmix pushes the graphical capabilities to the absolute limit, and I've had to reign in a lot of my own ideas to keep them workable.

So... go low res & low quality minimap when running larger levels, and perhaps avoid them altogether on Wine if they're causing the program to freeze. I'm happy to put in a warning so that players know that the level they're about to play is above and beyond the recommended graphical limits; that's really the best I can do without rewriting the entire engine (which isn't going to happen!).

Simon

The answer I was hoping for was: You look into the source and see an obvious performance bug with the splat ruler within 5 minutes. ;P

According to your testing, I doubt that the lion's share is due to Wine; it's a general issue. But I haven't investigated other than how a freshly started CE won't freeze in Wine either. Even on Turrican's Space Program 10,000 BC, yes, it still stuttered, but it wasn't frozen for seconds. All my testing in this entire thread has been with low resolution and low-quality minimap.

Before you put a warning, I'd wait until we all have researched this better. The warning would also break NL compatibility in a weak sense: NL won't scold you for making large levels, but CE would.

Do you have time on Sunday, June 15th, 14:00 UTC, to dig into the CE source together in Mumble?

-- Simon

WillLem

It would almost be better to incorporate the splat ruler into the cursor somehow, in the same way that arrows can be displayed for direction select. The only issue there is that the cursor is resizable.

Sure, we can look at the source together. If we can find anything obvious, let's fix it. I'll add the suggested meet up time to my calendar, see you then :)

Simon

All right, Sunday (in two days) at 14:00 UTC. See you!

-- Simon

Simon

Video: Splat ruler freezes CE for 5-10 seconds (70 seconds long, 4.4 MB)

This is an excerpt from my stream 3 weeks ago. I've had already played CE for 2 hours here.

-- Simon