Skip to navigation
Logo Penaz's Area

cat /dev/random > penaz

VVVVVV's source code comes on GitHub.


VVVVVV's source code came on GitHub, and how this changed my point of view on many things.

Hello everyone,

Along with the new year, with the commit message "Hello WWWWWWorld!", the source code of the game "VVVVVV" landed on GitHub.

VVVVVV is one of my favourite videogames, and as a programmer I just couldn't avoid taking a peek at such code, trying to understand the techniques and structures that brought us something that is almost-universally labeled as "a great game", in it own small way.

What I saw, though, was very far from my expectations.

Reading such code has been a unique experience, mixed with a dash of disappointment, some drops of bitterness and critique. But in the end it was an epiphany, an emotional shake that maybe all programmers need once in their lives.

Let me explain.

Publishing this source code is equivalent to open Pandora's Box, removing a "veil" that makes a videogame look like an exceptional engineering feat.

Behind such veil, instead, functions to convert booleans into strings, "switch" statements with hundreds of "case" (think about hundreds of concatenated conditionals) and monolithic 7000-lines source files are hiding.

The code is arguably lacking structure, doesn't use huge patterns that allow for greater maintenance, it doesn't even have a dedicated structure to manage menus.

Although, if we think beyond the mere code, this is perfectly acceptable.

The game is shipped, works well and it's fun.

What kind of lesson can we get from this? A well-structured code allows for a great maintainability in the future of a product. And lacking a solid structure can effectively kill such product (unless you do a huge refactoring work). But if the developer is tied in an endless net of "structural improvements", without anything of substance being shipped (gameplay, in the case of a videogame), the product will never see the light of day.

This reasoning stands when it comes to knowledge too, I am 100% guilty of being stuck in an endless battle for knowledge before "diving myself" into developing a videogame.

There comes a time where we need to stop our "knowledge rush" and start writing code.

As we can see, we don't need to have great code structures to create a successful game. Sure, such structures will help, specially if you want to expand on the game in the future, but such structures must be at our service, and not be yet another obstacle for today's deeds, hoping for a better tomorrow.

Sometimes it's just necessary to roll up your sleeves and try.

Thanks to everyone for reading the first post of the year. See you next time!

Penaz.