Software.com logo
Jan 17, 2020

VVVVVV and duct tape development

VVVVVV

Terry Cavanagh, an indie game developer, released the source code to his wildly popular platformer VVVVVV to celebrate the game’s 10th anniversary.

What’s VVVVVV? Released in 2010, VVVVVV follows the story of Captain Viridian, an explorer who must navigate an extraterrestrial Super Mario-like world without jumping. Players can only change the direction of gravity as they navigate labyrinthine levels.

VVVVVV received widespread praise for its innovative game mechanics and quickly became one of the most viral indie games of the past decade. After an initial launch on Windows and OS X, it was quickly ported to Linux, iOS, Android, Nintendo Switch, Playstation 4, and even the Commodore 64.

Now VVVVVV joins an exclusive group of popular games—including SimCity, Doom, Duke Nukem, and Civilization—that have released their underlying source code.

What’s in the code? According to Cavanagh, "it’s kind of a mess."

One file stretches 7,703 lines long and includes a switch statement with more than 300 cases. That’s on top of the more than 500 if statements in the same file.

Why does it matter? It’s rare to be able to peer into another developer’s successful project, since many open source GitHub projects—which can be backed by large engineering teams—are highly polished.

VVVVVV shows us that software development is often a complex process, requiring tradeoffs between speed, features, and clean code.

With tight deadlines, developers often don’t have time to pause and refactor code, instead opting to add features—which leads to absurd situations like monstrous switch statements—in order to ship products on time. Software lifespans also force developers to optimize for the short term, rather than the long term.

All of those tradeoffs are held together with duct tape—temporary code that sustains a fragile project for so long that it eventually becomes permanent.

As for Terry, he noted: "Every screenshot I see posted of terrible things in the VVVVVV source code only makes me more powerful."

Want to get more of these in your inbox?

Subscribe for weekly updates from the Software team.