Skip to content

native: divergence at tic 180 #495

Description

@MarcusKainth

ROM sha256

9a6a47d01119f67580e48e9875207186c25efd56ff93019df331eb307cfaa5d9

WAD sha256

1d7d43be501e67d927e415e0b8f3e29c3bf33075e859721816f652a526cac771

ClickHouse version

26.8.2.7

First divergent tic (gametic)

180

What disagrees

A mobj field

The divergence report

native diff itself stops reporting at tic 175, an unrelated chase
limitation already tracked. The simulation still computes every tic
past that point, and reading m_health for mobj slot 258 (a spectre,
m_type = 13) directly out of native_state against the probe's own
probe_state shows the two disagree eight tics before the tic 175
report, on the tic the slot takes its next hit:

tic  native m_health[258]  probe m_health[258]
179  90                    90
180  90                    5
181  90                    5
...
186  90                    5
187  25                    5
...
195  25                    5
196  1                     5
197  1                     -19
198  -2                    -19

The probe's spectre takes an 85-point hit at tic 180 (90 to 5) and
dies at tic 197 (5 to -19). Native's own spectre takes a 65-point hit
seven tics later, at tic 187 (90 to 25), and dies one tic after the
probe, at tic 198 (1 to -2). Both traces agree on every earlier tic
for this slot, including its position, state and flags through
tic 179.

Random draws at that tic

Not read; the divergence is in a damage amount and its timing, not
prndindex, and the query above did not check the probe's own
random-call log for tic 180.

Reproduction

./target/release/clickdoom native load --fresh --host localhost --port 18125 --password clickdoom --database clickdoom_native
./target/release/clickdoom native load --probe refemu/reference_traces/demo3/probe.9a6a47d01119.tsv --host localhost --port 18125 --password clickdoom --database clickdoom_native
./target/release/clickdoom native diff 500 --probe refemu/reference_traces/demo3/probe.9a6a47d01119.tsv --host localhost --port 18125 --password clickdoom --database clickdoom_native

Then, against the same database, compare m_health[258] in
native_state and probe_state for tic/gametic 179 through 198.

Analysis, if you have any

Found while chasing an unrelated report: a fireball still in flight
at tic 197 explodes against this same spectre, since the spectre is
still alive and MF_SOLID in native's own state at that tic while
the probe's copy is already a corpse. The fireball's own flight and
impact test match the state they are given; the state itself is
already wrong by the time the fireball reaches it. Whatever attack
lands the first hit on this spectre (most likely the player's own
weapon fire) is worth checking first: the damage amount (85 against
65) and its timing (tic 180 against tic 187) both disagree, which
points at the attack's own hit resolution or its damage roll rather
than at the spectre's state cycle.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: nativeNative mode: the tic simulation and renderer as SQL, and the WAD loaderdivergencerefemu and sqlcpu disagree on the same ROM

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions