Celeste developers release some of their messy code as open-source

Credit: Matt Makes Games
Credit: Matt Makes Games /
facebooktwitterreddit

Developers Noel Berry and Matt Thorson have released the movement code from their recent platforming game Celeste, and it’s a bit of an undocumented mess.

When you work on alone or on a very small team, sometimes software development best practices can be ignored. Things like documentation, code abstraction, and clean code structure can fall by the wayside. As long as it works efficiently and the developers can maintain it, does code quality really matter? A few days ago, the two lone developers of the critically acclaimed platformer Celeste released some of their movement code as open source on GitHub. And let’s just say it shows that you don’t need to write clean code to make a tremendous game.

As a professional software developer by trade, software quality, and coding best practices were pounded into my head from the early days of my education. Heck, I’ve taken a couple of classes in college where software development processes were the primary topic. When you are working with a large team, which is how a large majority of software is developed, it’s important that anyone else who ever has to even glance at your code understands it.

That means writing clean, understandable code with documentation as necessary. You have to ensure that your code is maintainable and extendable for future changes. Every single line of your code needs to be efficient and usable. Things like adhering to the rules of object-oriented programming by abstracting code into their own classes are drilled into your head in nearly all educational computer science programs.

https://twitter.com/MattThorson/status/969336877663764481

But looking at this single, 5400-line C# files from Celeste, it throws a number of these best practices out the window. That amount of code in a single file is usually frowned upon, and it contains a ton of interacting variables across a bunch of different functionality. Not to mention its extremely messy structure with zero documentation. Looking at this from a professional software development standpoint, this looks like something I wrote in my high school “Intro to Programming” class. This code would probably get me a failing grade on a graduate school assignment.

However, indie game development is a completely different beast than AAA game development or typical enterprise software development. This was a two-man team where time is money and getting a working product out was probably more important than writing clean code. They aren’t migrating the code to another team, they aren’t worried about future code extensibility for long-term support, and they aren’t dealing with changing customer requirements. So if it works for them, then why not? Clearly, the code runs efficiently, the game doesn’t have any technical issues (at least personally I have not seen any), they’ve updated it post-launch, and they’ve released the game on multiple platforms.

Celeste
Matt Makes Games /

Next: 10 games you may have missed in January 2018: Celeste & more

Sure, Noel Berry and Matt Thorson didn’t write some of the cleanest code ever. But that messy code resulted in an amazing platformer that is arguably one of the best games of 2018 so far. And you have to give major props to them for releasing this code as a learning tool, putting it all out there for critique. This is an inspiration to all aspiring indie developers: you don’t have to write perfect code to make a good game. As developer Rami Ismail said on Twitter: “the least functional code you can write is no code because you’re too worried about it to start.”