Installing Terrarium, An Open Source Terraria Clone

Earlier today, I thought: “Man, Terraria sure is a great game. I should make a clone.”

Then later today, I thought: “Wait, somebody probably already did that.”

And, lo! An open source Terraria clone: Terrarium!

But man, I have to install so many dependencies. This kind of thing is a drag. I just want to try it out.

Fortunately, the instructions were pretty good.

Following the instructions in, first I installed MinGW and Allegro. MinGW is a C++ compiler, and Allegro is a game programming library for C++.

The Allegro installation instructions had a handy wiki containing the commands for adding the Allegro PPA. Thanks Allegro team!

Next, I copied linux-gcc-allegro5.0-release from build to the project root, then ran

But I was missing many allegro dependencies.

The output didn’t specify actual package names, so I did some apt-cache searching:

Here the match to what I want above is:

So off we go:

Repeated until all of the ‘no’ turned to ‘yes’:

Running make:

Whoops, git submodules needed.

Note: git stores the submodule config info in .gitmodules at the project root.

And now make is doing things:

But there’s a missing dependency that causes a fatal error in physics.cpp: Box2D.h.

So let’s find Box2D, which is an open source C++ engine for simulating rigid bodies in 2D.

The first one seems reasonable.

After installing, I get a cryptic message when running make again; it seems some run files were cached:

So I deleted exception.* from src_libs/futil/properties, then got this cryptic error:

And so on with:

So I just deleted linux-gcc-allegro5.0-release and re-copied it from /build/, re-ran and make, and bam:

So now what?

There’s an executable: terrarium. So let’s run it:

Whoops, missing config. Reading the again, it seems the terrarium executable needs to get moved up a level, next to the resources dir:


terrarium splash

All was not in vain. Though since we get that ‘up to date’ message whenever we re-run make, we’ll have to remove linux-gcc-allegro5.0-release every time, which is annoying. Script time!

Hold my pickaxe, I’m going in!

Matthew Odle

Indie dev, autodidactic polyglot, lover of programming, dad, musician, writer, mentor

Join the Discussion