The Peculiarities of Nodebuilder Errors
--Othius' Documentation of BSP Split Findings & The Peculiarities of Nodebuilder Error:s--
Sev told me to make this an issue on the git, and so here we are! I'll just copypaste & rephrase what I was telling him in DMs. I guess this also documents the struggles faced when making large maps, and could possibly direct developers where to look when trying to make these hacky solutions unnecessary in the future.
The previous belief about SRB2's map size limitations were that it breaks when the map is larger than 32768 x 32768, also known as 2^15, or precisely 1/4 of the grid you're given when loading a fresh stage in Zone Builder.
--Here is the issue--
Here is an example of what happens to a stage when the map is so massive that the game cannot render it correctly.
(Alabaster Fountain by BronsoKip from the Autumn 2020 OLDC)
(Palace Peaks (remade) by Garrean for the official SUGOI ports)
--Here are the solutions I came up with to said issue, albeit hacky and frustrating--
This is where the real issue comes to play. I believe the reason I was told to make this an issue on the git is that, well, this should not be something every person has to deal with. It certainly is a pain...
Spending months trying to fix the issue I eventually found that map size is not necessarily the issue, but instead the size of the individual BSP splits. 32768 SPLITS are the issue, and not just the stage being 32768. Theoretically you can use 1/2 of the grid, instead of just 1/4. You can view the splits like such:
I came up with a "two quadrant" method. Where you divide the stage into two <32768 areas and then put them in opposite quadrants of the stage, connected by a teleport, to kind of force the nodebuilder to build the splits at reasonable sizes.
...However it is still prone to error.
The fix to this was by far the hackiest solution I have ever come up with. If I draw a sector on the right side that goes around the green split and cuts into the blue split
This confuses the nodebuilder, as it can't cleanly put a split there- so it rethinks it and then... it miraculously fixes the splits (see earlier image). This is done in Lucid Landscape and Command Facility from this most recent OLDC, which is why those stages in Zone Builder have empty massive sectors strewn around out of bounds.
There is one more important thing I discovered that pertains to managing splits in stages that can't be split into two areas that are smaller than 32768, or need to stay connected for whatever reason. The aforementioned Lucid Landscape and Command Facility fall into this category.
and this rabbit hole is about to get deeper and 10000x more frustrating each split... if you click on their respective blue or green buttons from the node viewer panel
...has their own splits
These "subsplits" as I've dubbed them, are actually the cause of visual and especially collision-based node errors. Subsplits larger than 32768 are guaranteed to cause errors, so you need to do that "draw a sector that intersects the split" split wrangling method, to both the regular splits AND the subsplits and pray to god they go into a configuration that works. I had it working in Lucid Landscape for a while but something broke and I wasn't able to fix it, it's the reason for the node error at the end of the stage.
This is probably the hackiest and most frustrating thing I've ever done in this game.
However, the pay-off is being able to use the entire grid that Zone Builder gives you.
(gif) https://media.discordapp.net/attachments/836380756895989801/914272856664322078/srb22844.gif
The issue is that when running through counterclockwise there is a HOM in software.
(gif) https://cdn.discordapp.com/attachments/836380756895989801/914272990974332938/srb22845.gif
There's my full documentation of my findings with nodebuilder/node split related errors and my methods to get around them. I may learn more as time goes on but this is the extent of what I know, and what it takes to solve these frustrating issues with map size when making a stage.
--Edit:--
I've come across a node anomoly I have absolutely zero explanation for- it seems I don't know as much as I think I do. In an attempt to fix Lucid Landscape the splits decided to do this, which, by all accounts, should absolutely demolish the game based on what I've found. I only tested this as a joke to see what it would do, and somehow it runs without any error whatsoever. This game is an enigma.