Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup gameplay stats code/UI and support RTA timing #2862

Conversation

garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented May 8, 2023

This aims to cleanup some of the UI quirks of the GameplayStats interface, as well as support for RTA timing.

To use RTA timing the user will need to check the box then create a new file with the box checked, this will make the new file use RTA timestamps.

The UI now stretches to fill the window, so people can make it as skinny or as wide as desired.

New RTA file completed:
Screenshot 2023-05-08 at 4 13 09 PM

New timestamps:
Screenshot 2023-05-08 at 4 13 30 PM

OLD timestamps:
Screenshot 2023-05-08 at 4 37 41 PM

New stretched:
Screenshot 2023-05-08 at 4 22 20 PM

New shrunk:
Screenshot 2023-05-08 at 4 22 13 PM

New counts:
Screenshot 2023-05-08 at 4 13 37 PM

Old Counts:
Screenshot 2023-05-08 at 4 37 43 PM

New breakdown:
Screenshot 2023-05-08 at 4 13 39 PM

Old Breakdown:
Screenshot 2023-05-08 at 4 37 50 PM

Options tab with options enabled:
Screenshot 2023-05-08 at 4 58 03 PM

Build Artifacts

@Malkierian
Copy link
Contributor

So, if I'm reading this correctly, toggling RTA will affect the way all the stat timers are calculated? Is "fileCreatedAt" where the RTA timestamp is kept? If so, what if they make a file an extended time before they start the run? Seems like that could be problematic for races. Are there reset strats that would affect the RTA timer(s)? What about people who wanted realtime info for a save file that took them multiple sessions over multiple days to complete?

@garrettjoecox
Copy link
Contributor Author

garrettjoecox commented May 8, 2023

So, if I'm reading this correctly, toggling RTA will affect the way all the stat timers are calculated?

Yes

Is "fileCreatedAt" where the RTA timestamp is kept? If so, what if they make a file an extended time before they start the run? Seems like that could be problematic for races.

Yes, this means that when preparing for a race you should be sitting on the name creation screen, upon starting the race/run you create the file and load into it. (This should only take a second or so, but admittedly it is different from when RTA runs start on vanilla)

Are there reset strats that would affect the RTA timer(s)? What about people who wanted realtime info for a save file that took them multiple sessions over multiple days to complete?

Not sure what you mean by either of these, if they intended to start an RTA session, and it took them a few days then the time stamps would show when they got it across those few days. But in cases where someone isn’t racing or speed running they probably shouldn’t be using RTA

@Malkierian
Copy link
Contributor

Yes, this means that when preparing for a race you should be sitting on the name creation screen, upon starting the race/run you create the file and load into it. (This should only take a second or so, but admittedly it is different from when RTA runs start on vanilla)

It should be easy enough to tie into OnLoadGame and check to see if it had been set yet or not, and set it then if it hadn't. No reason to keep things different from vanilla unnecessarily in those regards.

Are there reset strats that would affect the RTA timer(s)? What about people who wanted realtime info for a save file that took them multiple sessions over multiple days to complete?

Not sure what you mean by either of these, if they intended to start an RTA session, and it took them a few days then the time stamps would should when they got it across those few days. But in cases where someone isn’t racing or speed running they probably shouldn’t be using RTA

Looking back at it, the first one doesn't really make sense XD. But for the second, you can still have different timings if you use RTA because of scumming and such, and someone might want to have that capability for a non-speedrun or non-race run that they can't do in one sitting. Just saying, I wouldn't be surprised if there are people who complain about that.

@inspectredc
Copy link
Contributor

The RTA for mine seems to not work properly (Windows) and goes extremely fast.

rtatiming.mp4

@garrettjoecox
Copy link
Contributor Author

It should be easy enough to tie into OnLoadGame and check to see if it had been set yet or not, and set it then if it hadn't. No reason to keep things different from vanilla unnecessarily in those regards.

Good point I might look into this, could even start it on first non-c-up input, which is when hardware runs start for RTA.

But for the second, you can still have different timings if you use RTA because of scumming and such, and someone might want to have that capability for a non-speedrun or non-race run that they can't do in one sitting. Just saying, I wouldn't be surprised if there are people who complain about that.

I’m still not sure I really follow, if they aren’t planning on finishing in one sitting they should just not use RTA right, since the RTA information would be useless to them.

@Malkierian
Copy link
Contributor

I’m still not sure I really follow, if they aren’t planning on finishing in one sitting they should just not use RTA right, since the RTA information would be useless to them.

If you're using the current timer setup, and you reset without saving a lot (aka scumming), then your timers will be off compared to what you are actually spending in the game.

@garrettjoecox
Copy link
Contributor Author

The RTA for mine seems to not work properly (Windows) and goes extremely fast.

That’s unfortunate, I had kind of worried that relying on that timing call wasn’t reliable but it worked on Mac/Linux

@garrettjoecox
Copy link
Contributor Author

If you're using the current timer setup, and you reset without saving a lot (aka scumming), then your timers will be off compared to what you are actually spending in the game.

Right, this is the point of using RTA. I think I’m just misunderstanding the original statement 😝

@inspectredc
Copy link
Contributor

Good point I might look into this, could even start it on first non-c-up input, which is when hardware runs start for RTA.

just note this is for when the intro sequence has been completed, since you need to press buttons through text. i think maybe making an option down the line for a race save file could be an idea too?

@Malkierian
Copy link
Contributor

If you're using the current timer setup, and you reset without saving a lot (aka scumming), then your timers will be off compared to what you are actually spending in the game.

Right, this is the point of using RTA. I think I’m just misunderstanding the original statement 😝

The point being, people might want to know the realtime of their run instead of the scummed times of their run, but they might not get a randomizer done in one sitting, and that means that they would have numerous hours of non-run-time included in the RTA stats. Thinking about it now, that probably shouldn't be something you tie into RTA with, since that's meant to be speedrun with, but maybe there should be a third option later on, if you don't intend to make the play/pause time version keep track of that with sectional saving.

@garrettjoecox
Copy link
Contributor Author

garrettjoecox commented May 8, 2023

If you're using the current timer setup, and you reset without saving a lot (aka scumming), then your timers will be off compared to what you are actually spending in the game.

Right, this is the point of using RTA. I think I’m just misunderstanding the original statement 😝

If you’re saying a user might want to know both gameplay time and scummed time, I think that would be separate from this, and would likely be solved with the sectional saving thing you are working on

@garrettjoecox
Copy link
Contributor Author

@Malkierian Yeah it looks like we both met in the middle 😅 I think that would indeed be separate from RTA

@garrettjoecox
Copy link
Contributor Author

garrettjoecox commented May 8, 2023

Good point I might look into this, could even start it on first non-c-up input, which is when hardware runs start for RTA.

just note this is for when the intro sequence has been completed, since you need to press buttons through text. i think maybe making an option down the line for a race save file could be an idea too?

Yeah, I imagine on most races/runs the intro cutscene will be skipped, but it shouldn’t be too hard to account for both cases

@garrettjoecox garrettjoecox force-pushed the cleanup-gameplay-stats-and-rta branch from 7051887 to 917acc1 Compare May 9, 2023 00:50
@garrettjoecox
Copy link
Contributor Author

The RTA for mine seems to not work properly (Windows) and goes extremely fast.

That’s unfortunate, I had kind of worried that relying on that timing call wasn’t reliable but it worked on Mac/Linux

@inspectredc I seem to have fixed this on Windows, probably need to verify it works on switch before merging this

@inspectredc
Copy link
Contributor

Yep works on windows now!

@garrettjoecox garrettjoecox force-pushed the cleanup-gameplay-stats-and-rta branch 2 times, most recently from f555ea4 to 80c881e Compare May 10, 2023 21:40
@garrettjoecox
Copy link
Contributor Author

The RTA timestamp is now started on first non-c-up input after intro cutscene. (this is inline with the RTA timing rules on hardware runs)

@garrettjoecox garrettjoecox force-pushed the cleanup-gameplay-stats-and-rta branch from 80c881e to 52c9d6e Compare May 17, 2023 17:35
@briaguya-ai
Copy link
Contributor

image

set my clock back an hour and stuff got silly, seems the RTA timer won't play nice with daylight savings time

Copy link
Contributor

@briaguya-ai briaguya-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this will underflow if the player sets their clock back too far but I don't think that's a dealbreaker. Overall these changes look great.

:shipit:

@leggettc18
Copy link
Contributor

The RTA for mine seems to not work properly (Windows) and goes extremely fast.

That’s unfortunate, I had kind of worried that relying on that timing call wasn’t reliable but it worked on Mac/Linux

@inspectredc I seem to have fixed this on Windows, probably need to verify it works on switch before merging this

Anyone tested on Switch that you're aware of? If not I'll check it out and merge if it works, if it has been tested then I'll just merge.

@leggettc18
Copy link
Contributor

I just went ahead and tested it, seems to work fine on Switch, so I'm merging now.

@leggettc18 leggettc18 merged commit 5de1240 into HarbourMasters:develop May 21, 2023
7 checks passed
@garrettjoecox garrettjoecox deleted the cleanup-gameplay-stats-and-rta branch May 24, 2023 14:22
@garrettjoecox garrettjoecox added this to the Sulu (7.1.x) milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants