Menu

1 / 6

Balatro's mind-bending code uses mouse jitter for random number generation, along with a bunch of clever maths…

PC Gamer·Andy Edser·6 months ago
#7jZZXd8V
Reading 0:00
15s threshold

Balatro Source Code Review: "Bad" Code & Math Tricks - YouTube

Watch On

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'.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.