Jump to content

Two timers with same total time will slowly lose sync with eachother.


OmaiGrundles
  • Branch: Live Branch Version: Windows Pending

I had 2 timers that i wanted to use in sync for an contraption I was testing out.

First timer was set for 9 second ON, 1 second OFF.

Second timer was set for 8 seconds ON, 2 seconds OFF.

I hit pause and reset both timers. while the game ran, the timers slowly became more and more out of sync with each other after each cycle of the timers.

Should be pretty easy to reproduce, If you cant I can probably send the save file.

 

Also, I looked and there was no "output_log" file in the location described, you need to update the instructions on the report bug page.


Steps to Reproduce

Just create two timers with the same total time on each, but with different on/off times, and let them run for a while.




User Feedback


Did you set them directly or via sliders? May be some issue with the limited resolution of single-floats or some race-condition. 

Share this comment


Link to comment
Share on other sites

I did some more testing. It seems that timers will stay in sync if their on/off times are the inverse of eachother.

A timer with 2/8 syncs perfectly with a timer with 8/2.

A timer with 1/9 syncs perfectly with another 1/9 timer.

A timer with 1/9 loses sync with a timer with 2/8.

A timer with 2/3 loses sync with a timer with 1/4.

I would attach a save file but this is from my 'testing world' save and its over 2MB.

 

Edited by OmaiGrundles

Share this comment


Link to comment
Share on other sites

They probably are running into some rounding errors when they convert a setting to ticks on and ticks off. May be the low "Float" precision striking again. They should probably normalize all input to ticks directly and eliminate conversion completely. Of course, I could be completely off about this, as I have not looked at the code.

Edited by Gurgel
  • Like 1

Share this comment


Link to comment
Share on other sites

On 4/10/2020 at 5:20 AM, Gurgel said:

They probably are running into some rounding errors when they convert a setting to ticks on and ticks off. May be the low "Float" precision striking again. They should probably normalize all input to ticks directly and eliminate conversion completely. Of course, I could be completely off about this, as I have not looked at the code.

https://www.youtube.com/watch?v=mchN0d5MXY4
check this, its just pure automation, and the ticks dont have the same lenght. At every 6th loop the door dont open totaly and dont let the gas move in.  

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...