Balatro's mind-bending code uses mouse jitter for random number generation, along with a bunch of clever maths I'm too dense to fully appreciate

1 week ago 16

Rommie Analytics

Let me start off this article with a caveat: I am not a coding expert. I'm also not particularly good at maths. Which means some of the explanations in the video above fly over the top of my head at considerable speed.

One thing I do understand, however, is that the code that makes up roguelike deckbuilder Balatro is very clever. YouTube channel Howdy has reverse-engineered the game's source code to pull out some of its more bizarre nuances—and if you're more mathematically minded than me, you might even understand half of it.

One key takeaway that does make sense, though, is the way it uses mouse sensor jitter as 'cheap hardware entropy for RNG'. It's an impressive bit of lateral thinking, as the game takes hardware input data and puts it to work for random number generating purposes.

Read Entire Article