I make Smashy Crossroads: Mega Pileup, a car-crash game about one junction and a lot of rush-hour traffic. You drag back, let go, and try to wreck as many cars as you can in a single launch. It's free, it has no ads, there's nothing to buy, and it plays offline. The 3D edition runs in the browser on three.js, and it's coming to Google Play in December.
This first devlog is about the smallest system in the game that matters most: the chain timer. It's the thing that makes the second crash worth more than the first.
The whole idea is one number
Every wreck is a link in a chain. If the next wreck lands before a short timer runs out, the chain grows. If not, it resets to zero. That's it.
Here's the reset, trimmed for reading:
if (run.chain > 0) { run.chainT += dt; if (run.chainT > D.chainWin) run.chain = 0; } And here's the other half. Each time a wreck pays out, the clock goes back to zero:
r.chain++; r.chainT = 0; D.chainWin is the window in seconds. It comes from the difficulty table, so it isn't one fixed value: Easy gives you six seconds, Medium five, Hard four. Medium is the default.
What a link is worth
Each extra link adds half again of the base cash. The payout multiplier is:
mult = Math.min(D.multCap, (1 + (r.chain - 1) * 0.5) * (r.fever > 0 ? 2 : 1)); So a three-wreck chain pays double, a five-wreck chain pays triple, and so on, until the cap for that difficulty (×6 on Easy, ×5 on Medium, ×4 on Hard). The cap is there so a long chain on a busy junction can't run away from everything else in the game and make the leaderboards meaningless.
Gold Rush, and what the cap does to it
Reach a long enough chain (seven links on Medium) and Gold Rush starts: double cash, for ten seconds on Medium. The r.fever > 0 in the formula above is that doubling.
The cap applies to Gold Rush too, and that changes what Gold Rush is for. Once you're in it on Medium, one more hit already reaches the ×5 cap. The bigger effect comes after a chain drops. The chain restarts at one, but Gold Rush is still running, so the doubled multiplier takes you from ×2 back up to the cap in four wrecks instead of nine. In practice, that makes it work as a safety net more than a jackpot.
The clock runs on game time
The chain timer doesn't count real seconds. It counts the dt that the simulation is given, and the main loop scales that:
const rdt = Math.min((t - last) / 1000, 0.05); const dt = rdt * (drag && settings.slowMo ? 0.3 : tScale); Two things fall out of that. First, when slow motion kicks in while you aim, the chain clock slows with everything else, so the window is measured in game time, not wall-clock time: at the aiming slow-motion (0.3 speed) a 5-second Medium window lasts about 17 real seconds while you line up the next hit. Second, a single frame can only add 50 milliseconds, so a hitch or a background tab can't swallow a chain in one go.
Only crashes you caused pay
A chain that farms itself would be a bug, not a feature. So a wreck only pays if it carries a tag that starts at your car. The tag spreads on contact from your car, and from moving tagged wrecks. A car that dies against a stationary tagged wreck still pays. But the cars it bumped on the way don't pick up the tag, which is what stops one pile-up from feeding itself for ever.
The check is plain. In wreck(), cash is only awarded if b.tag is set.
Same rules for everyone on the leaderboards
Because the window, the cap and Gold Rush all come from one difficulty table, I could pin the online modes to a single row of it. The Daily Junction, the Weekly Gauntlet, Survival and challenge codes always run on Medium, whatever difficulty you've picked for normal play. That way a score on a shared board means the same thing for everyone.
One thing I got wrong
The in-game guide told players that wrecks chain within 4 seconds. The table says Medium is 5. The two had drifted apart, because the guide was written as plain text and the numbers live somewhere else. I've changed the guide wording to match the table: it now says "a few seconds apart" and lists 6, 5 and 4 seconds for Easy, Medium and Hard.
Try it
The 3D edition has a free browser demo, so you can feel the timer rather than read about it. Chain three wrecks, then watch the number climb.
- Play the free browser demo: https://gridlock2d.netlify.app/3d/play/
- Pre-register on Google Play: https://gridlock2d.netlify.app
Next devlog: how the Map Maker turns a junction into a short share code.
This article was written with the help of AI and checked against the game code by me before publishing.


