[Not a bug] Weird running bug

This subforum contains all the issues which we already resolved.
Post Reply
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

[Not a bug] Weird running bug

Post by ficolas »

Idk if this is because of lag, but when you put the zoom in to the max, the player runs faster, and when it is out, the player runs slower, I thought it was an optic ilusion thing, so I tried counting the seconds, and yup, the player runs faster when the zoom is in

SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: Weird running bug

Post by SilverWarior »

As far as I know the game speed is currently heavy inpacted by FPS.

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Weird running bug

Post by drs9999 »

maybe your UPS (not FPS) dropped when you zoomed out?

I just made a quick test ( so I can be wrong) in a fresh game, so the UPS were allways at 60 and I did not see a difference in the running-speed/ duration.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Weird running bug

Post by MF- »

SilverWarior wrote:As far as I know the game speed is currently heavy inpacted by FPS.
it should not be in 2.10
It's giving me abrupt scene jumps when it skips frames...
Is the separation imperfect?

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Weird running bug

Post by slpwnd »

The problem with the render / update separation is that they are both still running in the same thread. The way this is done is that there is a timer set to rate 60 ticks per second and whenever this timer event is received the update is performed. If there are multiple queued timers in the row they are all performed (up to configurable Max Updates Per Frame). Only after this is the game rendered. After the rendering the game waits for the vsync to flip the video memory buffer to the screen.

This leads to complications:
1) When a vsync is missed (even by the slightest margin) the whole execution waits for the next vsync (typically 1/60s).
2) Sometimes the multiple updates per frames kick in even when this is technically not necessary (when discrepancies caused by blocked waiting add up).
3) It can happen that the thread starts waiting for the timer event even when it could start updating already.

We have some simple mechanisms to deal with 2 and 3 however the came is still shattering now and then. We hope that when the rendering and updating will be done in separate threads this will be way less visible.

The advantage of the previous simplified approach (1:1 update:rendering directed by the vsync) was that the game was always running "smooth" even though slower (30fps).

Post Reply

Return to “Resolved Problems and Bugs”