4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Post by RAP »

Also exists in 4.0.0.0.
  • Context: A recent new feature is that you can click on the level number in the main menu to search a particular level by name without individually scrolling left or right to find the particular level.
  • I have 15x15 levelset that I've been working on for years, and I made it have that it would have 1000 levels (level 0 counts as a level!), as I currently have 630 levels (100 of which are test or concept levels); and each time I checked on the level number (mostly accidental), the game starts to hang for about 30 seconds, as if it's trying to check all of the levels and recall the names~
  • This is rather annoying (especially accidental) that I have to wait while it seems to just 'hang'. No other levelset seems to face this problem since there doesn't seem to be a levelset that have a lot of levels as mine's.
...please fix?
User avatar
Eizzoux
Posts: 567
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: Game hangs while checking...

Post by Eizzoux »

Yeah, it has to check all levels to display names of all levels at once, and it can even freeze for a short time when scrolling levels in main menu and also freeze for few minutes when you open levels list if you'll set very big levels count (like 'levels: 923847928357982738293')
Here's an example
𒈟
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Post by Holger »

Yes, this (still) takes far too long.

I first noticed this on Android, where it took ages to display the level selection screen. At that time, the whole level was loaded just to get the level name, and loading a level takes much more time on Android because each byte has to be fetched from a compressed APK file. I've changed this recently to just load the header part, which is sufficient for the level name, but apparently it still takes quite some time for large level sets. (With a nearly empty level set defined to contain 1000 levels, it still takes about one second on my relatively old (~ 7 years) computer.)

I'll have to check if this can be further optimized.

And I think I should introduce some reasonable upper border for the maximum size of level sets, like 1000 levels or something...
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Post by filbo »

Cache the per-directory(levelset) findings into a file in ~/.rocksndiamonds/... ?
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Post by RAP »

Oh? An actual max level amount limit? Huh. I'm not sure if I would want that, since I'm making a ton of bit-sized 15x15 Emerald Mine Club-esque levels. I have around 650+ levels and counting, with around 100 being test levels on ideas that have yet to be fulfilled, or showing off quirks in a way that's understandable. Ideally, I wanna grow the levelset as much as possible after releasing the levelset with 1,000 solvable levels, with a ton of unique concepts not only inspired from various sources, including some of the Emerald Mine Club levels, but also a bunch of unique obstacles and ideas not really found in those levels at all.
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 4.1.0.0: Game hangs while checking level list within levelset with large # of levels

Post by filbo »

EMC-esque levelsets are traditionally 81 or 101 levels per levelset name, with serial levelset names like emc_rap_01 through emc_rap_12 or whatever. Putting 1000 levels in a single levelset is sure to challenge various clients (RnD being just one possible runner of EMC level data). Sure, it might be slightly prettier to have all 1000 under the exact same name, but if it breaks various software (including making RnD versions-to-date slow to the point that it's labeled 'hanging'), it isn't worth the pain.
Post Reply