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

"Speed Up" key becomes the pause key when this is the game speed and the award screen closes #288

Closed
J-Shep opened this issue Jul 23, 2014 · 0 comments
Assignees
Labels
bug issue type S:Investigating State
Milestone

Comments

@J-Shep
Copy link
Contributor

J-Shep commented Jul 23, 2014

Quotes from #287 :

@MarkL1961 :

For me if you are using the speedup key when the award screen opens then once you close it the game is running fast and the speedup key becomes a pause key!"

@TheCycoONE:

In world:setSpeed it records the current speed so that when you unpause or unspeedup it can return to it. The problem is we're entering two temporary states, both speedup and pause.

I think it shouldn't overwrite the current speed when the game is currently Paused or SpeedUp.

I will try to fix this bug today.

@J-Shep J-Shep added this to the 0.40 milestone Jul 23, 2014
@J-Shep J-Shep self-assigned this Jul 23, 2014
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
This fix creates a very minor issue: the game speed wont be set to its
"Speed Up" state when a player is still holding down the "Speed Up" key
when they have closed the award screen and it has unpaused the game.

They can then resume the "Speed Up" speed state by releasing the "Speed
Up" key and then pressing it again.

I've created a commit which fixes this issue for the ASCII keyboards which
don't require UI:OnKeyUp() to provide UTF-8 key codes, which it currently
can't provide with the supported SDL version. So I've excluded this commit
because this missing support for UTF-8 keycodes would prevent the "Speed Up"
game speed state from being disabled.
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
This fix creates a very minor issue: the game speed wont be set to its
"Speed Up" state when a player is still holding down the "Speed Up" key
when they have closed the award screen and it has unpaused the game.

They can then resume the "Speed Up" speed state by releasing the "Speed
Up" key and then pressing it again.

I've created a commit which fixes this issue for ASCII keyboards which
don't require UI:OnKeyUp() to provide UTF-8 key codes, which it currently
can't provide with the supported SDL version. So I'm not going to publish
this commit until OnKeyUp() supports UTF-8 keycodes because the missing
support for UTF keycodes would prevent the "Speed Up" game speed state from
being disabled.
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
This fix creates a very minor issue: the game speed wont be set to its
"Speed Up" state when a player is still holding down the "Speed Up" key
when they have closed the award screen and it has unpaused the game.

They can then resume the "Speed Up" speed state by releasing the "Speed
Up" key and then pressing it again.
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
This fix creates a very minor issue: the game speed wont be set to its
"Speed Up" state when a player is still holding down the "Speed Up" key
when they have closed the award screen and it has unpaused the game.

They can then resume the "Speed Up" speed state by releasing the "Speed
Up" key and then pressing it again.
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
I needed to make the game know exactly when the "Speed Up" key had been
released so that the award window can make the game speed go back to its
"Speed Up" state when it knows that this state hasn't been cancelled
because its key hasn't been released while the award screen has been
shown.

I've also modified the pause key callback in world.lua so that if a
player pauses the game while holding down the "Speed Up" key, the game
speed will go back to its "Speed Up" state if the player doesn't release
the "Speed Up" key before they unpause their game.

Problem: foreign keyboard support
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
I needed to make the game know exactly when the "Speed Up" key had been
released so that the award window can make the game speed go back to its
"Speed Up" state when it knows that this state hasn't been cancelled
because its key hasn't been released while the award screen has been
shown.

I've also modified the pause key callback in world.lua so that if a
player pauses the game while holding down the "Speed Up" key, the game
speed will go back to its "Speed Up" state if the player doesn't release
the "Speed Up" key before they unpause their game.

Problem: foreign keyboard support
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 23, 2014
I needed to make the game know exactly when the "Speed Up" key had been
released so that the award window can make the game speed go back to its
"Speed Up" state when it knows that this state hasn't been cancelled
because its key hasn't been released while the award screen has been
shown.

I've also modified the pause key callback in world.lua so that if a
player pauses the game while holding down the "Speed Up" key, the game
speed will go back to its "Speed Up" state if the player doesn't release
the "Speed Up" key before they unpause their game.

Problem: foreign keyboard support
J-Shep pushed a commit to J-Shep/CorsixTH that referenced this issue Jul 27, 2014
This commit fixes an issue which made the "Speed Up" key pause
the game instead of speed it up after the award screen was closed.
TheCycoONE added a commit that referenced this issue Aug 1, 2014
Fixed Issue #288: The Award Screen "Speed Up" Key Bug
@J-Shep J-Shep added the Fixed label Aug 2, 2014
@J-Shep J-Shep closed this as completed Aug 2, 2014
@lewri lewri added bug issue type and removed Type-Game Error labels Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue type S:Investigating State
Projects
None yet
Development

No branches or pull requests

2 participants