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

Base game swap timer on realtime #31

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Michael4d45
Copy link

When playing with my friends, the games would desync.
This is cause by two issues. 1 the shuffler counts frames and our computers would fun the games at a wide variety of frame-rates. For example, I would run Oot at 60 fps and theirs would run at 30 fps, causing my game to count to the frame limit faster.
The second cause is load times. My computer loads Spyro age of Dragon on the PlayStation significantly faster than my friend's laptops. Thus my game would start earlier each time the game loads.

This fix starts a timer when the shuffler starts and switches when the timer has been reached. The time limit is increased before the next game is launched, causing no time loss between each computer.

@Michael4d45
Copy link
Author

Note: This commit also changes the total-time.txt to output total play time, rather than total running time.

@authorblues
Copy link
Owner

Planning to pull this. The only thing I want to work out is whether there is an easy solution for pausing the shuffler like currently exists (pausing the emulator stops the frameadvance, so that works well). Not a necessary feature, just considering it carefully.

@Michael4d45
Copy link
Author

Michael4d45 commented Sep 4, 2021

The only thing I want to work out is whether there is an easy solution for pausing the shuffler like currently exists (pausing the emulator stops the frameadvance, so that works well). Not a necessary feature, just considering it carefully.

I've gotten it to work with the pause button on the keyboard. Otherwise, I couldn't find anyway for lua to know the game was paused. Also not in this branch, but I also implemented key bindings to move the timer backward and forward if people wanted to have control over the timer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants