Skip to main content

This guy’s Super Mario breakdowns are the best way to learn the basics of computer science

Super Mario World - Random Number Generation
In 1982, a 20-something programmer named Shigeru Miyamoto designed his very first game. Called Donkey Kong, its most significant contribution to gaming history was the introduction of central character of Jumpman. Later renamed Mario, Jumpman became the star of a series of astonishingly successful video games.

With titles like Super Mario World and Super Mario Bros. 3 among them, no-one disputes that these games are classics of their kind; able to transform even the dullest of rainy days into magical experiences.

Related Videos

But could they teach you computer science?

mariocode

Leap forward to the present day, and 22-year-old Alex Losego is convinced they can. Losego has been hard at work on a series of YouTube videos in which he breaks down the aforementioned Super Mario games under the title “Retro Game Mechanics Explained.”

In doing so, he’s shedding light on the obscure minutiae of titles many gamers know like the back of their hands, but which have rarely (if ever) been the subject of computer coding classes.

It’s oddly fascinating stuff, even if you’re a non-programmer or not planning on a career in games development — and will give you a new appreciation for “null sprite glitches” and the importance of random number generation, Super Nintendo style.

“I like sharing this information with other people,” Losego told Digital Trends. “That’s why I started making YouTube videos. People are fascinated by seeing what’s going on behind these games. If you’re playing Super Mario, and you see a glitch, you wonder how it happened. That’s what I want to help people understand.”

In his early twenties, Losego shouldn’t — strictly speaking — have grown up with the 16-bit Super Nintendo. Sony shipped its first-gen PlayStation the year he was born, and by the time he was in kindergarten, the Nintendo 64 and ill-fated Sega Dreamcast had joined the gaming fray. However, as he told us, “I had a Super Nintendo at home. It was during the later stages of its life, but our family wasn’t the quickest at getting the new machines.”

Super Mario Bros. 3 - Wrong Warp

Like a lot of kids, Losego wanted to develop his own games, or at least to create new levels for existing favorites. Unlike a lot of kids, he decided to delve into 65c816 assembly code, the programming language of the Super Nintendo, to do so.

Now in college, Losego no longer wants to work in gaming, but enjoys taking these games apart to explain how they work on a code-based level.

“Nintendo doesn’t release its source code for games, but some titles have previously been disassembled, or reverse-engineered, by fans,” he continued. “With others, I’ve had to disassemble them myself. Using an emulator, you can look at the memory in these games in real-time. That along with the disassembly lets me together what is going on. Sometimes it’s really difficult, though.”

Channel Trailer

He said that learning a decades-year-old assembly language has helped his own programming skills, much as learning a dead language like Latin helps you understand the root of many modern languages. With his YouTube videos taking off, he’s now using the games to give out computer science lessons online. (If you want to support him, consider contributing to his Patreon account.)

“I have a lot of ideas for expanding this series,” he said. “I want to focus on the programming side of things, but use the video games as an example. I hope that this will help people who want to get into computer science, but aren’t super confident about it. When they see that I’m using video games [to explore the subject], I think some people may be swayed because they think it’s cool.”

Hey, if you can learn some of the intricacies of programming while playing old Super Mario games, we’re all for it!

Editors' Recommendations

Exoprimal: release date, trailers, gameplay, and more
A group of players fights a T-Rex in Exoprimal.

Warning: There's been a crisis detected. You might call it a dino crisis, but Capcom won't. Exoprimal may look like the long-awaited revival of the Resident Evil spinoff series that replaced zombies with dinosaurs for a new twist on survival horror, but it's not. It's a new IP entirely.

Revealed at the March 2022 State of Play showcase, Exoprimal was a very unexpected announcement from Capcom. We didn't know what to expect going into the showcase, let alone that Capcom would be there with a brand new game. Unlike its other popular ongoing series and recent output of new IP, Exoprimal appears to take itself a bit less seriously, judging by the trailer and premise -- and it looks like a ton of fun. While it might not be the next Dino Crisis as some had hoped, here's everything we know about the chaotic dinosaur-filled shooter game Exoprimal.

Read more
How Zelda: Ocarina of Time speedrunners break the N64 in incredible new ways
ocarina of time speedrunners break game new ways respec featured

ReSpec is normally a column about the wonderful, technical world of PC gaming, but occasionally there are topics that are too good to pass up. The Legend of Zelda: Ocarina of Time is universally acclaimed as one the best Nintendo 64 games ever made, and while it's not a PC title, the highest-level, most technical speedruns of the game expose how games work on a fundamental level. More importantly, these incredible feats are only possible with a lot of community effort.

Ocarina of Time is a game that would take a normal player around 30 hours to beat; the most skilled speedrunners, who aim to play the game as fast as possible, can beat it in around three hours and 40 minutes without glitches. But the Any% category of the game, which tasks players with completing the game regardless of the methods used, is down to three minutes, 54 seconds, and 566 milliseconds. And yes, those milliseconds matter. The second-place record holder is less than a full second behind the world record.

Read more
Pikmin 4: release date, trailers, news, gameplay, and more
Pikmin 4 release date

When compared to Super Mario, The Legend of Zelda, and even Metroid, the Pikmin series was never a runaway success, but that hasn't stopped Nintendo from developing new installments. And we're glad, because the Pikmin series is full of wit, charm, and originality. During the September 2022 Direct, Nintendo finally unveiled the next entry, aptly titled Pikmin 4.

This announcement came nearly a decade after the previous entry, and although we don't know much about it, we're excited it's happening. The latest installment of the oddball strategy series is bringing some new features, including a brand new Pikmin type and an adorable dog companion. Positioned as the Switch's big summer 2023 release, it has the chance to get more eyes on the series than ever before.

Read more