When I started studying CS 2.5 years ago, it was so I could make more technically impressive ways of annoying my friends. It started out accidentally learning some Python to script a visual romance novel starring my buddy Jake, and for better or for worse it snowballed to the point where I now know what Gram-Schmidt orthogonalisation is. I'm definitely a lot better at thinking about systems and flow control — and while the Rust slot machine isn't pure CS, it's my magnum opus and the logical conclusion of my study. Using the in-built electronics system in the game Rust, I designed, on a live PvP server mind you, a fully functional single-line slot machine with a variable pay table.
I played Rust back in 2020 and loved the electronics system, but anything beyond a sun-activated light switch was pure magic to me. Coming back recently, I realised the game has XOR and AND gates, Rand switches, and bitflop latches. Paired with the custom neon signs and automated resource dispensers, I had just enough to build something real. Drop money in the input box, the circuit activates, waits for a button press, then kicks off the Rand sequence. Some crude if-else logic assigns symbol probabilities — common symbols appear more often, and three of the rarer ones pay out a higher multiplier.
I would love to post a video, but as a thank you for enriching the server economy, a kindly gentleman flew over my base in a scrap helicopter and blew the casino up with a rocket launcher. And people say Rust is toxic?!