Submission #10178: synabler's Flash Zilch in 00:12.458

Adobe Flash
baseline
(Submitted: zilch.swf 3877-PRES)
libTAS 1.4.7 + Ruffle nightly 2026-01-26
299
24
71
PowerOn
12485ad69c0c7442c1a41cb9aaaba310
TAS Timing
Parameters required: -g gl --no-gui
			
Submitted by synabler on 1/27/2026 4:41 PM
Submission Comments
Zilch is a Flash implementation of a dice game Zilch, aka Farkle, by Gaby Vanhegan. The objective of this game is to accumulate 10,000 points by rolling high-scoring combinations. In this TAS, I win the opponent as quickly as possible.
I TASed this game to learn how RNG works in Flash.
(Platform is supposed to be Flash, how do I change it?)

Game objectives

  • Emulator used: libTAS 1.4.7 + Ruffle nightly 2026-01-26 compiled with cargo build --package=ruffle_desktop --release. Versions prior to 2025-11-04 will desync.
  • Fastest completion
  • Heavy luck manipulation

Rules

How it was made

The minimum number of rolls required to win Zilch is 2: first, roll six 1's, earning 8,000 points and a free roll. Then immediately roll any combination that earns at least 2,000 points. The six 1's are mandatory, since that is the only combination worth at least 5,000 points.
But the six 1's alone require a 1 in 46,656 chance, and I'm not going to keep changing the system time until it works! Instead, I started by investigating how Ruffle implements RNG. It turns out the PR that mimics avmplus' behavior was merged in November 2025, and the relevant code can be found here. Essentially, the seed is the system time in microseconds when the RNG was first called, truncated to u32, and the entire RNG state is just a single u32 starting with the seed.
Next, I modified the Ruffle's source code to print things whenever the RNG is called. Here is what happens in Zilch:
  • Before loading the title screen, RNG is called in 3 different places, for a total of 165 times. The first call happens after 26 frames (1083333 microseconds).
  • After selecting the difficulty, RNG is called 7 times.
  • Under the "fast roll" setting, each die calls RNG 4 times. The result is determined like this (not sure if this is Ruffle-specific, nor how the order is determined):
...11323233264563166414 -> 544663
............6.5.3.6.4.4

...312225464564525 -> 455624
.......2.4.4.6.5.5
Then I created a TAS that just rolls and selects all dice twice (dice not counted in any valid combination are automatically excluded), wrote a brute-force program to find the ideal seed, and changed the system time to 315281 microseconds. I specifically looked for four 1's in the second roll, but other combinations are also possible, so it may not be the smallest seed that wins the game.

Rendering inaccuracy

Due to Ruffle being incomplete, the paper images for the title menu and the tutorial are not displayed. However, this does not affect the gameplay. The following screenshots are how they are actually shown in Adobe Flash Player:

Suggested screenshot

309

ikuyo: Claiming for judging.
ikuyo: Barely had a chance to blink on this one! Looks good, accepting.

despoa: Processing...
Last Edited by despoa on 4/21/2026 7:29 AM
Page History Latest diff List referrers Change Log