Introducing Marathon Run. (I was going to call it Marathon Mode, but NiGHTS Mode being right next to it on the menu looked terrible.)
Basically a dedicated Record Attack-like experience for speedrunning the game as a continuous chunk rather than ILs. Has several quality of life features.
- An unambiguous timing bar across the bottom of the screen, always displaying the current time, drawn under the FPS but above everything else, ticking up until you reach the ending.
- Has realtime and in-game timer options, selected at run start - the latter ignoring loads, lagspikes, and intermissions.
- "Live Event Backups" - a category of run fit for major events like GDQ, where the ability to recover from crashes or chokes makes for better entertainment. Essentially a modified SP savefile, down to using the same basic functions, but has its own filename and tweaked internal layout.
- Only the best in "antisplice" technology - providing two contrasty notches in the timing bar that is based on the real time the executable has been open for and isn't restored with the Live Event Backup, making spliced runs basically intractable.
- Disable the console (pausing is still allowed, but the timer will still increment).
- Quitting the run if the game is modified midway through, like Record Attack.
- Hitting "Retry" doesn't require a confirmation, like Record Attack (and if you haven't hit the first checkpoint in the first map, it has no life cost and restarts the timer).
- Show centiseconds on HUD automagically, like Record Attack.
- Hidden behind the "Unlock Record Attack" condition to avoid confusing new players... like Record Attack.
- Automatically skip intermissions as if you're holding down the spin button.
- "spmarathon_start" MainCfg block parameter and "marathonnext" mapheader parameter, allowing for a customised flow (makes this fit for purpose for an eventual SUGOI port).
- The global integer bitflag sequence "marathonmode" is available to Lua to read, alongside the properties mentioned above.
- Disabling inter-level custom cutscenes by default with a menu option to toggle this (won't show up if the mod doesn't have any custom cutscenes), although either way ending cutscenes (vanilla or custom) remain intact since is time is called before them.
- Won't show up if you have a mod that consists of only one level (determined by spmarathon_start's nextlevel; this won't trip if you manually set its marathonnext).
- Unconditional gratitude on the evaluation screen, instead of a negging "Try again..." if you didn't get all the emeralds (which you may not have been aiming for).
- Gorgeous new menu (no new assets required, unless you wanna give it a header later).
Changes which were required for the above but affect other areas of the game include:
- "useBlackRock" MainCfg block parameter, which can be used to disable the presence of the Black Rock or Egg Rock in both the Evaluation screen and the Marathon Run menu (for total conversions with different stories).
- Disabling Continues in NiGHTS mode, to match the most common singleplayer experience post 2.2.4's release (is reverted if useContinues is set to true).
- Hiding the exitmove "powerup" on the Powerup Display HUD outside of multiplayer. (Okay, this isn't really related, I just saw this bug in action a lot while doing test runs and got annoyed enough to fix it here.)
- The ability to use V_DrawPromptBack (in hardcode only at the moment, but) to draw in terms of pixels rather than rows of text, by providing negative instead of positive inputs).
- A refactoring of redundant game saves smattered across the ending, credits, and evaluation - in addition to saving the game slightly earlier.
- Minor m_menu.c touchups and refactorings here and there.
Built using feedback from the official server's #speedruns channel, among other places.
For public consumption and testing, at least until 2.2.5 is a thing (fingers crossed y'alls are happy with this): srb2win_marathonmode.exe (LAST UPDATED: 21:36 GMT 15/05/2020)
Haven't fully tested this, but quick bug: Pressing "any other key" to continue to Marathon Run when there is live event save data ejects you into HOM hell instead.
Also, I think a casual mode that pasues the global timer when the game is paused/lost focus would be a good addition to this. The live event backup also seems easy to make spliced runs with, maybe change the color of the bottom bar depending on what mode player is using.
Personally I think "THANKS FOR THE RUN" is a bit iffy... Maybe simply use "CONGRATULATIONS"?
Suggestion: An option to start with all Chaos Emeralds pre-collected, in case that someone wants to do a run where they can turn Super from the start.
This could be locked behind a "clear the game with all Chaos Emeralds" condition, of course, and have the condition be able to be changed in add-ons.
A few nitpicks:
useBlackRockis a welcome addition, but the Egg Rock's sounds still play if it's disabled.
- Live event backups should probably be mod-specific, or at least be ignored/cleared when switching gamedata. Currently, starting and exiting a marathon run in a mod, then starting one in the base game (or vice versa) will detect and try to load the live event backup of the former.
- The FPS counter should display in front of the marathon mode bar, as it can be very hard to see when HUD transparency is set to non-default values.
- I think Marathon Run should be above Tutorial in the 1 Player menu, so it's grouped with the other two record attack modes.
added 28 commits
Toggle commit list
d593e2e1...9cd9d2e0 - 20 commits from branch
- e99d38ff - Make a falsy useBlackRoc prevent doing Black Rock sparkle calculations and Egg Rock pulse sounds.
- 2aa542d2 - Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into marathonmode
- 4348ebdf - Make live event backup files savedata specific (new format: `live%s.bkp`, where…
- 271c6d35 - Re-order Marathon bar to be drawn before FPS and captions if applicable.
- f06206cd - Fix "press any other key" sending you to HOM hell.
- 47419ce0 - Introducing "antisplice" - a pair of small highlights on the Marathon bar that…
- 1e3e9c81 - Remove emblem hints from Marathon Run (I think Options is good just for the sake…
- 9686ad2d - * In-game timer option! Doesn't tick in intermission or in lag, only when a…
- d593e2e1...9cd9d2e0 - 20 commits from branch
16:45 GMT 15/05/2020 Changelog:
- Has realtime and in-game timer options, selected at run start - the latter ignoring loads, lagspikes, and intermissions - based on comments in dage4's testing stream
- Only the best in "antisplice" technology - providing two contrasty notches in the timing bar that is based on the real time the executable has been open for and isn't restored with the Live Event Backup, making spliced runs basically intractable - based on comments by @katsy
- Hitting "Retry" doesn't require a confirmation, like Record Attack (and if you haven't hit the first checkpoint in the first map, it has no life cost and restarts the timer) - based on comments by helvian
- Removed Emblem Hints from pause menu - based on comments by LunickTMM
Also fixed every bug mentioned by katsy and @spherallic, except didn't change the order of Marathon Run per latter comment - I plain forgot. I'll do that later, unless the branch is merge-ready before I get around to it :v
katsy - Additional circumstances where timer is acceptably paused? Maybe later. Have addressed everything else you've touched on.
@Golden - Why is it iffy? Games run at live events have had modifications to their beat-the-game messages before, and "thanks for the run" is hardly obscene.
@Zwip-Zwap_Zapony - Out of scope. Make a savedata-enabled mod that gives you emeralds on the first tic of play.
21:36 GMT 15/05/2020 Changelog:
- Swap location of Tutorial and Marathon Run, per sphere's suggestion.
- Lock Marathon Run if Record Attack isn't available, to avoid confusing new players.
- Correctly reset map/timer for retries before the first checkpoint of the run where the first map in Marathon Run is LF_NORELOAD (by forcing a reload when the retry option is used).
Should now be stable.