<-- PREVIOUS | NEXT -->

OpenLife: How To Kill A Project

Date: 2023-10-04 22:16

A very long time ago now, I started a project called OpenLife. It intended to be a replacement for BitLife, which I wrote in Python. The project has a rich history and a lot of complexity.

However, as proud of it as I am, I do think that it will remain in its current state for the foreseeable future, if not forever. Why is this?

A Brief History

This is a VERY high-level overview and doesn't do the project justice, but it should suffice.

Humble Beginnings

It all starts with BitLife. Over time, I was getting quite dissatisfied with the application, which I believed was suffering from its own success. The app had become riddled with ads, in-app purchases, and (later on) paid expansion packs that paywalled the best content the game had to offer. 

When BitLife was popular on YouTube, I watched a creator called Melcheko. This channel posted tutorials for the various weekly challenges as well as some exploits its creator had discovered (some of which remain to this day). Eventually, however, the creator behind the channel became jaded from making BitLife videos and moved on. At one point, he created a two-part mini-series in which he attempted to write a BitLife clone in Python. I thought to myself, "I could do that". And so an idea was born.

The Project Starts

I began publishing the project to GitHub very early on. The oldest version I published was 0.0.4, or Alpha 4 as it was known (I did not use semantic versioning until towards the end of the project). In this version, you can only age up to 12 years old, at which point the game ends. It was all very simple.

Eventually, I rapidly began adding new content, and the first major update was Alpha 11 (0.0.11). It's also the first update with a proper changelog. Alpha 11, amongst other things, added jobs into the game, and added the ability to save the game.

The Golden Age

Versions from 0.0.11 to 0.0.15 are part of what I call the "Golden Age". This was the absolute peak of what updates to the project.

Alpha 16

After the success of 0.0.15, I decided that Alpha 16 was going to be an update that solely fixed bugs. This meant that it took FOREVER because I didn't find any bugs and waited around to find some. Eventually, I gave up and made the update anyway.

Alpha 17

Alpha 17 was a major update that mainly focused on desperately trying to fix all of OpenLife's technical issues that made it difficult to develop for:

Alpha 17 did not fix any of those issues. In fact, it made them worse. Because of all of the issues and how they had become exponentially more complex with each release, I ended up disabling the save game in Alpha 17, meaning you cannot save/load the game. This was never fixed.

The Nuclear Option

Alpha 17 was released on December 18th, 2022. Almost immediately after release, I had a realisation. I was fed up with my codebase. I needed to nuke everything and rewrite it from the ground up.

This was no easy feat. It took until May 21, 2023. Almost 6 months. In fact, it took two tries. But the end result was worth it. The new, shiny codebase was far easier to work with and allowed for MUCH faster development.

Version 0.2

Once Beta 1 was out the door, I worked on Beta 2. This was fairly minor and added investments into the game. You could buy stock, metals, cryptocurrencies, bonds, and the like. 

It also added multiple nations into the game, each with their own behaviours.

The Dark Ages

After this, 0.3 was planned and worked on. But, quite quickly, I stopped for a while. Eventually, that became permanent.

The last update, 0.2.1, was released on May 28th, 2023. That was 4 months ago. What happened?

The Five Killers

I can pinpoint 5 causes for the OpenLife project dying out. The 5 deadly sins, the 5 pillars, the 5 whatever you want to call it. Here they are, in no particular order.

#1: I Got Bored

Simple as. I worked on OpenLife for a really long time, and eventually I reached a breaking point. I had to work on something else. Thankfully, I have no shortage of things to work on.

#2: Naming

Back in the Alpha days, and even still in the Beta 1 rewrite, I focused on making all variables easy to remember the names of but also very hard to know what they do if you don't take a closer look. I also tried to copy the old names to help with my own familiarity. I don't know why I did this, but I did. This made it hard to "jump back in" after my hiatus.

#3: One Massive File

The entire OpenLife source tree is located in a single file. That file is 10,000 lines long (this pales in comparison with, say, the leaked MS-DOS 6.0 source code, which is 684,476 lines long). This doesn't sound like a lot, but that is all in one massive file, so it makes it far worse. The fact that it is all in one file also makes it more inflexible, as trying to make large changes could sometimes cause a lot of problems.

#4: My Code Style Changed

My older code style gravitated towards a "big function does everything" way of working, which I don't do. These days, I opt for a "function calls other functions that do one thing" approach. These styles are widely incompatible with each other, and this makes development more difficult.

#5: I Forgot How OpenLife Works

Self-explanatory. Not working on something for almost 5 months makes you likely to have to re-learn the same things again.

How To Fix OpenLife

The only way to do so is a re-write. Not as dramatic as the last one, thankfully, most of the code is good enough, but some overhauls are needed. Notably, the code needs more modularity.

Why That Will (Probably) Never Happen

Conclusion

I don't think the project is entirely dead. In fact, I think it still has a chance of surviving. If I ever get a sudden burst of motivation, I'll do it, or if someone else thinks they can have a go at it, they are more than welcome to try.

I also learned a lot when writing OpenLife, like how base64 works, how to pickle and unpickle objects, as well as a lot of object-oriented concepts. That's something to be proud of for sure.