[0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

This subforum contains all the issues which we already resolved.
Post Reply
ARandomStone
Burner Inserter
Burner Inserter
Posts: 16
Joined: Thu Apr 13, 2017 12:09 pm
Contact:

[0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by ARandomStone »

The setup:
I loaded the same savegame (currently in editor mode, paused) two times. Once i used the go 60ticks ahead button (first image). Once I manually advanced the game tick by tick for 60 ticks total (second image). As seen, the highlighted combinator (top right in both screenshots) holds the value 255 in the first case and 211 in the second case.

https://imgur.com/Fqh3hOg
http://imgur.com/VZB5E0k
I expected both ways to get me the same result.

Some additional info about the circuits you see in the screenshots (if needed):
In the rectangle of hazard concrete there are 3 contraptions.
Bottom right is just a clock to show me (and you) that both screenshots are taken the same number of ticks after loading the game. (The clock is at 5 at the time i saved the game.)
The other two are a sender (bottom) and receiver (top) for wireless signal trasmission. Right now it should repeatetly send the number 211. As described above, this only works in the "one tick at a time" case.

How does the wireless transmission work:
At the receiver the train is ready to leave station A, but the destination station B is currently disabled. If i keep station B at the sender disabled, the train stays at station A. If I enable it, the train leaves station A. This different behaviour is detected. Then i enable station B at the receiver shortly, so the train can actually get to B, than back to A and reset the situation this way. This process is repeated every 4 ticks.

Concluding thoughts:
This behaviour is consistent through the entire setup, not limited to this special save and/or the advancment of 60 ticks. I think the problem is based on how a train skips stations if they are disabled.

Let me know if you need any more informations.
Attachments
factorio-current.log
(5.34 KiB) Downloaded 137 times
000 Creative.zip
(769.49 KiB) Downloaded 108 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by Rseding91 »

Can you please try it after disabling the "generate neighbor chunks" option in the editor? Having that on when you aren't updating the game will change the game state which may cause what you're seeing.
If you want to get ahold of me I'm almost always on Discord.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by boskid »

Using simple in game contraptions like 8 bit display

and simple scope (can be extended from left by copying two columns and placing with overlap)


i can reproduce this (signals are: loco!=0, S==2, empty, transmitter)
- running continuous
77762-continuous.png
77762-continuous.png (508.27 KiB) Viewed 3174 times
- single stepping:
77762-steps.png
77762-steps.png (494.25 KiB) Viewed 3174 times
speculation

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by Rseding91 »

After looking at what Boskid mentioned i can confirm that I don't think there's a sane way i could change this on the game logic end.

If you read/write logic with circuits on train stops or rail signals you'll probably get different results when ticking one at a time vs all at once.

But, this isn't anything new. The paused logic is not "entire game is paused". In that state you can't have any side effects because you literally can't touch anything. The editor pausing is "entities are paused" most if not everything else still goes on. Map generation, player movement, calling scripts, adding/destroying entities and so on can all change what happens.

It was never the goal to make "entity paused" in the map editor behave identically if you do 60 x 1 tick vs 1 x 60 ticks. Sorry.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by Rseding91 »

Actually, thinking about it more as I typed that there's 1 thing i can try which might make this work. I'll post back with the results once I know.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13201
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by Rseding91 »

Ok, Boskid was kind enough to test out the idea I had and confirmed it fixed this issue. So, it's now fixed for the next version of 0.17.

The other areas I mentioned are still true though. So keep those in mind.
If you want to get ahold of me I'm almost always on Discord.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2241
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.76] Different results after advancing 60 x 1 tick vs 1 x 60 ticks

Post by boskid »

After fix, behavior under single step changed and will be same as previously when running continuous:
77762-steps-after-fix.png
77762-steps-after-fix.png (427.85 KiB) Viewed 3147 times

Post Reply

Return to “Resolved Problems and Bugs”