Certain level design errors can be very time-consuming to troubleshoot, but easily caught by a computer. I propose that we add a set of validation rules that check the level before the geometry is rendered, and give a user a chance to correct it before they waste time rendering and then troubleshooting issues.
Overview
Before a level is rendered, some validation checks should be run. If an error is detected (and we're not in batch mode), a pop-up should list the errors. The user would then have the option to go back and correct the errors, or proceed anyway. Each error in the list should be selectable. When selected, the offending part of the level should be highlighted (or the view changed to focus on it).
In batch mode, the errors should be logged and then ignored.
It also seems reasonable to have a settings menu containing one checkbox per validation rule, and let the user disable whichever ones they find unhelpful.
The following validation rules are low-hanging fruit:
- The presence of any Room Entrance, Creature Den, Whack-a-mole Hole, Scavenger Hole, Hive, or Garbage Worm that don't have a node index assigned.
- Any shortcut that isn't connected.
- Any L1 ramp in level bounds that has bad geometry (like the kind the editor tries to avoid letting you place).
- The level doesn't contain any BlackGoo (this one should be disabled by default)
- The level doesn't contain an entrance (unless there's a way that kind of level is useful, that I'm just not aware of).
- Any object is placed out of bounds (aside from poles, fissures, and anything else that might actually be reasonable to place there).
Comparisons to Other Software
This proposed feature is similar to a Design Rules check in PCB design software. Using the software KiCad as an example, you can run the validation at any time, and this window pops up listing all of the errors it finds:
Each error type can be disabled, selected as a warning, or a more urgent error. Selecting an issue in the UI closes the popup and selects the offending element:
The location of each warning or error shows up in the main editor window as an arrow pointing at the issue. I find this less useful than the UI just because of the amount of visual clutter it adds.
Certain level design errors can be very time-consuming to troubleshoot, but easily caught by a computer. I propose that we add a set of validation rules that check the level before the geometry is rendered, and give a user a chance to correct it before they waste time rendering and then troubleshooting issues.
Overview
Before a level is rendered, some validation checks should be run. If an error is detected (and we're not in batch mode), a pop-up should list the errors. The user would then have the option to go back and correct the errors, or proceed anyway. Each error in the list should be selectable. When selected, the offending part of the level should be highlighted (or the view changed to focus on it).
In batch mode, the errors should be logged and then ignored.
It also seems reasonable to have a settings menu containing one checkbox per validation rule, and let the user disable whichever ones they find unhelpful.
The following validation rules are low-hanging fruit:
Comparisons to Other Software
This proposed feature is similar to a Design Rules check in PCB design software. Using the software KiCad as an example, you can run the validation at any time, and this window pops up listing all of the errors it finds:
Each error type can be disabled, selected as a warning, or a more urgent error. Selecting an issue in the UI closes the popup and selects the offending element:
The location of each warning or error shows up in the main editor window as an arrow pointing at the issue. I find this less useful than the UI just because of the amount of visual clutter it adds.