[0.15.19] take_screenshot() desyncs at high speed

Things that we don't consider worth fixing at this moment.
Post Reply
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

[0.15.19] take_screenshot() desyncs at high speed

Post by DaveMcW »

Steps to reproduce:
1. Load this save:
timer_1000x_speed.zip
(394.91 KiB) Downloaded 73 times
2. Run this command:

Code: Select all

/c game.take_screenshot{path=game.tick..".jpg"}
Expected result: The screenshot matches the file name.
Actual result: The screenshot is 129 ticks higher than the file name on my computer.

You can change game.speed to 1, to verify the timer really is in sync. It is a bug in the take_screenshot() function.

I was trying to automate screenshots of very short events far in the future, and this bug messes up my timing.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.15.19] take_screenshot() desyncs at high speed

Post by posila »

Hi, take_screenshot just queues screenshot request for rendering thread. If there are multiple updates in between rendering, screenshot is not from the same tick as take_screenshot was called.
You might call it a bug, but we won't "fix" it, I am sorry.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [0.15.19] take_screenshot() desyncs at high speed

Post by DaveMcW »

I found a workaround.

Code: Select all

/c game.take_screenshot{path=game.tick..".jpg"}
for i = 1, 1000000000 do end

Post Reply

Return to “Won't fix.”