Team Fortress 2 (Valve, 2007), red against blue. Every shot rolls a number from 0 to 9,999, and when it lands under your chance, the shot comes out glowing: a critical hit, three times the damage. But the chance isn't the same for everyone. The game adds up the damage you dealt in the last twenty seconds, and the more it finds, the bigger your chance.
The numbers are in the game code Valve released on 18 February 2025, the same today: 2% a shot with no recent damage, up to 8% at 800 damage or more (200 gives 3.5%, 400 gives 5%, 600 gives 6.5%). Melee swings go from 15% to 60%. Rapid-fire weapons roll once a second, and a winning roll makes every shot for two seconds a crit. Damage from the last two seconds doesn't count yet.
Valve's update notes of 2 February 2009 put it this way: "Overall, critical hit chance is now much more recent-performance based." And the game's own developer commentary gives the reason, in Kelly Thornton's words: "the better you're doing, the more likely you'll continue to do well. This helps create those rare high moments, where a single player goes on a rampage and gets 3 or 4 kills in rapid succession."
The yard, the mercenaries, the weapons, the damage of each hit and the fifty-shot tallies (yours 1 crit, his 4) are our own simplified version, drawn in code: the rule and its numbers are the game's, the hits are our sim's. The round is shown sped up, his glowing launch slowed down.
Random crits: keep them, or switch them off?
Sources: Team Fortress 2's game code in Valve's Source SDK 2013 (github.com/ValveSoftware/source-sdk-2013: tf_weaponbase.cpp, tf_weaponbase_melee.cpp, tf_player_shared.cpp, tf_shareddefs.h), added 18 February 2025 ("The TF2 SDK has arrived!", TF2 blog). Valve, "Team Fortress 2 Update Released", 2 February 2009. Team Fortress 2 developer commentary, Kelly Thornton (2007).
Sounds and music: our own, made in code.
Unofficial. Not affiliated with or endorsed by Valve. Team Fortress is a trademark of Valve Corporation.
