rough draft first guide
This commit is contained in:
@@ -84,6 +84,41 @@ We can't control the absolute entity ID a particular item will receive, but we c
|
||||
multiple entities. By observing the drop delay for a "reference" item, we can predict the behavior
|
||||
of other items.
|
||||
|
||||
#example[
|
||||
For example, suppose we spawn an item $A$, then 2 game ticks later we spawn an item $B$. Assume no
|
||||
other entities spawn between them, so $A$ and $B$ have consecutive IDs. Wait for the items to
|
||||
settle, then remove the supporting blocks. If we observe item $A$ start to fall 1 game tick after
|
||||
the support is removed, we can predict when item $B$ will fall.
|
||||
|
||||
It'll be easier if we orient ourselves around the tick when the support blocks are removed, call
|
||||
that $t=0$. Say the age is $"age"_(A, 0)$ at that time. We have that item $A$ falls at $t=1$.
|
||||
|
||||
$A$ fell when it was $"age"_(A, 1) = "age"_(A, 0) + 1$ old, so we can put all this into a relation
|
||||
that pins down the mod 4 cycle.
|
||||
|
||||
$ "age"_(A, 0) + 1 + "id"_A equiv 0 (mod 4) $
|
||||
|
||||
We want to find the equivalent relation for $B$, where $x$ will be the tick in which $B$ falls.
|
||||
|
||||
$ "age"_(B, 0) + x + "id"_B equiv 0 (mod 4) $
|
||||
|
||||
We know that $A$ has the item ID immediately before $B$, so $"id"_A = "id"_B - 1$.
|
||||
|
||||
We also know that $A$ is 2gt older than $B$, so $"age"_(A, 0) = "age"_(B, 0) + 2$.
|
||||
|
||||
So take the relation for $A$ and substitute in these values for $B$.
|
||||
|
||||
$
|
||||
"age"_(A, 0) + 1 + "id"_A & equiv 0 (mod 4) \
|
||||
"age"_(B, 0) + 2 + 1 + "id"_B - 1 & equiv 0 (mod 4) \
|
||||
"age"_(B, 0) + 2 + "id"_B & equiv 0 (mod 4) \
|
||||
$
|
||||
|
||||
Compare with the relation for $B$ and we see that $x=2$.
|
||||
|
||||
#callout(kind: "tip", label: "Therefore:")[$B$ falls at time $t=2$.]
|
||||
]
|
||||
|
||||
#example[
|
||||
Suppose we spawn four items in order. For simplicity, spawn them all in the same tick so their
|
||||
ages are equal, and assume no other entities spawn.
|
||||
|
||||
Reference in New Issue
Block a user