This should not be merged yet, and should only be merged after #93 as those changes are used here. Feel free to look over the code now and let me know if I'm doing something fundamentally wrong, so I can fix it before I keep working on it :)
RTA Speedrun Mode for PlatinumQuest
This pull requests adds a real-time speedrunning mode into PlatinumQuest, for competing on the MBP, PQ, and MBU (PE) speedrun leaderboards.
My goals for this mode:
This mode should time a players run from start to end, automatically starting and stopping at the correct points.
This mode should level the playing field for anyone using any computer to compete fairly. Particularly, this mode will remove loading times.
This mode should largely behave as if it didn't exist, and time runs without doing anything special. Particularly, menuing is still included in the final time and will not be automatically skipped/etc (in contrast to HiGuy's MissionQueue system which changes how menuing works).
An exception that I'd like to implement: The ability to skip needing to enter your name if you get a local top 5 score. This can be done by editing your prefs file and setting all PBs of all levels to 0, but that's annoying to setup and means you can't keep track of if you do end up getting a new PB during the speedrun.
Going along with the above point, it'd be nice to enable recording and automatically save .rrec files in the chance of a PB, without interrupting the run (as if recording was disabled).
This mode should time any sub-categories that are subsets of the current run. So, if you do a full game run of MBP, this mode will also produce final times for Beginner/Intermediate/etc.
This mode should also support multi-game speedruns, for example, a colored name speedrun. In addition to providing the final time for each sub-category, it will provide the final time for each sub-game.
Implementation
To perform a speedrun using this mode, a player will navigate to the final level in the speedrun in the PlayMissionGui, open the menu bar to the RTA Speedrun dialog, and select "Set Final Level". Then, the player can select "Start Speedrun", navigate to the first level of the speedrun, and press Play. Time begins on the first frame of the first level, and ends when the final mission is completed.
I created a file platinum/server/scripts/rtaspeedrun.cs containing most of the new logic, and platinum/client/ui/RtaSpeedrunDlg.gui containing the GUI part. I also edited some other gui/script files where needed. I'm not very knowledgeable on torquescript so let me know if these changes suck ass
Some of the above goals I laid out have not yet been completed, and there's more left to do. Here's a list of things off the top of my head:
[ ] Figure out how to make the visual timers update properly when the game is paused. It does correctly time the run when paused, but the visual timer doesn't update until the game is resumed.
[ ] Skip the name entering if you get a top 5 score
[ ] Automatically save .rrec if you're recording and get a PB
[x] Use the correct font for the PlayMissionGui button, and just like, make that button look actually good lmao
[ ] I'm using the correct font now but the button graphic still looks like ass lol - Use a good looking button graphic
[ ] Oh yeah and figure out a spot for the button in the first place since right now it's going too far on the lowest resolutions
[x] Add special cases for sub-category game ends, in the case that a game has a "bonus" category that we don't want counted
[ ] Make the GUI much better looking
[X] Create LiveSplit autosplitter, possibly creating an MBExtender module which can be easily scanned with LiveSplit to find the needed data and remove the need for manual effort with each new PQ release
[ ] Along with above, maybe even create a LiveSplit One autosplitter opening a websocket directly within PQ, for cross platform autosplitting. That'd be epic
[ ] Give a warning when a player sets the Final Level as an MBG level, letting them know that the MBG leaderboard only accepts runs from vanilla MBG and not PQ
[ ] Speedrun recovery on crash, so if PQ crashes during a speedrun, it can recover what the timer was and let the player continue the speedrun
This should not be merged yet, and should only be merged after #93 as those changes are used here. Feel free to look over the code now and let me know if I'm doing something fundamentally wrong, so I can fix it before I keep working on it :)
RTA Speedrun Mode for PlatinumQuest
This pull requests adds a real-time speedrunning mode into PlatinumQuest, for competing on the MBP, PQ, and MBU (PE) speedrun leaderboards.
My goals for this mode:
Implementation
To perform a speedrun using this mode, a player will navigate to the final level in the speedrun in the PlayMissionGui, open the menu bar to the RTA Speedrun dialog, and select "Set Final Level". Then, the player can select "Start Speedrun", navigate to the first level of the speedrun, and press Play. Time begins on the first frame of the first level, and ends when the final mission is completed.
I created a file
platinum/server/scripts/rtaspeedrun.cs
containing most of the new logic, andplatinum/client/ui/RtaSpeedrunDlg.gui
containing the GUI part. I also edited some other gui/script files where needed. I'm not very knowledgeable on torquescript so let me know if these changes suck assDemos
Full run of MBU including bonus levels, showing how it calculates the final time of each sub-category: https://www.youtube.com/watch?v=nJ8rg0kLIlo
Demo of LiveSplit autosplitter: https://youtu.be/NEwpWPhl33M
Basic/early GUI: https://youtu.be/pf41xZOo3Do
Earlier demo, no GUI but multiple categories and it times each one: https://youtu.be/Id6w8PsrlVw
Future Plans/TODOs
Some of the above goals I laid out have not yet been completed, and there's more left to do. Here's a list of things off the top of my head: