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

Pause key does not work in Windows - takes long time to kick in (up to 4 minutes) #1027

Open
kheckwrecker opened this issue Feb 11, 2025 · 5 comments

Comments

@kheckwrecker
Copy link

Manual and screen says game can be paused by hitting the Pause key or the "|" key (shift+). All that does in Windows is lock up the game. Hitting either or both do not unpause the game and leaves it locked up. I'd be interested in whether this works in Linux.

@evertvorster
Copy link
Contributor

Hmm... On Linux, when you hit Pause/Break... the game stops.
About a minute later there is a "paused" graphic that pops up, and the game is then properly paused. You can move your cursor, and music is playing, but it seems the simulation is stopped.

When you hit Pause/Break again, the simulation starts up again. Interestingly enough, while I was testing this, I was looking at the Serenity space station. When unpausing the game it fully disappears for a second or so.

@kheckwrecker
Copy link
Author

kheckwrecker commented Feb 12, 2025

Interesting. I'll have to try waiting a bit longer in Windows and see if it behaves the same way. Regardless, it probably should not take a minute for pause to kick in.

Edit - I tried this. Waited about 4 minutes, and the game remained locked up. At first, the music continued to play for about a minute, but eventually stopped. The screen remained frozen. However, no "paused" graphic ever appeared. Pressing the Pause/Break again had no effect.

@BenjamenMeyer
Copy link
Member

FYI - the Pause is really just a time manipulation in the game - it doesn't truly stop; it just changes the time to go extremely slow - something like 1 second becomes 1 billionth of a nanosecond. This ends up effecting how long it takes for the pause/unpause to work, and it may end up being machine dependent.

@royfalk I wonder if there's a better way that we could implement the Pause...but it'll probably take a bit to figure out.

@kheckwrecker do you see anything popping up in the logs to denote that the correct key was pressed?
You should see something like:

FireKeyboard::TogglePause(): Pause key detected

that's the first thing to check.

@royfalk
Copy link
Contributor

royfalk commented Feb 14, 2025

I wonder if there's a better way that we could implement the Pause...but it'll probably take a bit to figure out.

Refactor the main loop. Extract keyboard to its own thread. Pause everything else.

@kheckwrecker
Copy link
Author

@kheckwrecker do you see anything popping up in the logs to denote that the correct key was pressed? You should see something like:

FireKeyboard::TogglePause(): Pause key detected

that's the first thing to check.

I ran the latest beta of release 0.9 to try pausing again and just wait and see what happens. The first time, about 2 minutes after pressing the Pause key, the word "Paused" appeared in the middle of the screen. The second time I tried, it took over 4 minutes before "Paused" appeared. Interestingly enough, when you hit the Pause key again, the game unpauses immediately.

Bottom line, I think there's a problem with the Pause key function if it takes a long time to kick in.

Also, there was nothing in the log file, but please remember that the Windows builds are not generating anything like a stdout file, so that may not be surprising.

@kheckwrecker kheckwrecker changed the title Pause key does not work in Windows - locks up game Pause key does not work in Windows - takes long time to kick in (up to 4 minutes) Feb 20, 2025
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

No branches or pull requests

4 participants