Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Mar 20, 2019 2:19 am

All times are UTC

Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Jan 26, 2018 7:40 pm 
User avatar

Joined: Fri Jan 26, 2018 7:25 pm
Posts: 1
Hi everyone,

I'm new here and started to play OpenTTD and noticed some minor issue. The window drag didn't feel smooth so I decided to look into it. I've done something like this on OpenRCT2 before where GetTickCount's resolution simply isn't precise enough.

So I've basically replaced the GetTickCount function with an alternative where we get 1ms resolution, this ensures the game also runs at exactly 33 ticks. I also moved the window update out of the game logic loop so it will get redrawn every iteration.

Heres also a comparison video:

Edit: I shall mention that GetHPFLocalTime is planned for another patch I know that it is currently unreferenced.

windowdrag.patch [6.04 KiB]
Downloaded 45 times
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.