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

Fast-forward speed limit is stored as 16-bit integer instead of 32 bits. #8768

Closed
James103 opened this issue Feb 28, 2021 · 5 comments
Closed

Comments

@James103
Copy link
Contributor

Version of OpenTTD

1.11.0-beta2

Expected result

Fast-forward speed limit is stored as a 32-bit unsigned integer, allowing for game speeds of several in-game years per second.

Actual result

Fast-forward speed limit is stored as 16-bit unsigned integer, limiting game speed to 655.35x normal if the fast-forward speed limiter is enabled.

Steps to reproduce

  1. Set fast-forward speed limit to 80355% of normal game speed (1 in-game year per second).
  2. Notice that the speed limit is instead set to 14819% of normal game speed (67 in-game days per second).
@LordAro
Copy link
Member

LordAro commented Feb 28, 2021

I would be impressed if you could find a computer where you could actually manage 655x speed

@TrueBrain
Copy link
Member

This is fully intended. You can always set it to 0 to go as fast as you can, but having the limit to 655x is already not a useful value to have. Soon there will be a GUI (I hope :P), which limits the speeds to something like 2x/4x/8x/16x/32x .. but not much more. It simply doesn't become useful from that moment on.

If you have a good argument why faster than, say, 128x is useful, I would love to hear. But I am going to close this ticket for now, as we consider this "working as intended" :) Sorry :)

@James103
Copy link
Contributor Author

James103 commented Feb 28, 2021

Map settings:
image

OS: Windows 10
CPU: Intel Core i5-9400F @ 2.9 GHz (boosts up to 3.8 GHz)
GPU: Nvidia GTX 1660

Video driver: win32-opengl (autodetected)
Blitter: 40bpp-anim (autodetected)

Test results with given setup:
image
(Actual game speed is close to or even above 400,000 ticks per second under optimal conditions with the given setup)

@TrueBrain
Copy link
Member

Map settings:
image

OS: Windows 10
CPU: Intel Core i5-9400F @ 2.9 GHz (boosts up to 3.8 GHz)
GPU: Nvidia GTX 1660

Video driver: win32-opengl (autodetected)
Blitter: 40bpp-anim (autodetected)

Test results with given setup:
image
(Actual game speed is close to or even above 400,000 ticks per second under optimal conditions with the given setup)

LOL! I did not know it could get that insane :D Nice :D

@TrueBrain
Copy link
Member

What did strike me odd about your story, that the value overflowed. This was unintended, and fixed with #8769. If you meant to say that, sorry, I did not pick up on that from this ticket :) you reported a solution, so it was a bit hard to backtrack to a problem :D

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

3 participants