A downloadable game for Windows

Download NowName your own price

Overview

Empire is a European game of conquest for the Commodore 64. I found it on a disk along with Tetris, Duotris, and a File Manager program. It has no relation to the well-known game of the same name. I have no idea where it came from - the game had no credits, and I've been unable to find any mention of it on the internet.

Despite Empire being fully text-based, it became a favorite of mine and my brother's as it allowed for a Risk-like game of conquest without area-of-control strategies. Instead, the focus was on building up your economy and choosing who to attack. We spent many hours playing together, sometimes with larger groups (up to seven people could play!)

Development

Empire was interesting to me because it was programmed in BASIC - meaning that the full source code was available for inspection. However, even at around 520 lines of code, it wasn't easy to understand as the C64 limited variable names to two characters.  Moreover, the code involved a lot of math crammed into single lines, the use of GOSUBs (which were useful for creating reusable methods but confused me at the time), and GOTO statements (which were the absolute devil).

I decided to recreate the game for a modern computer as a gift to my brother, thinking it wouldn't be that difficult. I extracted the original source and printed it out, then set out to replicate the game's logic in C. I used the Allegro graphics library to generate a simple environment that looked like the Commodore 64.

The project turned out to be much trickier than I had expected. The same issues that made it difficult for me to understand the game on the original hardware were only marginally alleviated by having the program printed out. I drew flowcharts. I created tables of variables. I deconstructed formulas. Along the way I found bugs: some of which I had experienced while playing, others that were lurking. Dead code and unused variables were also in the mix, further adding to the confusion.

I persevered and came up with an extremely faithful port. The new version includes an "enhanced" version that fixes the obvious exploits and pain points. I also included ways to change the game's colors and to speed up the game (I wish I had taken this one a step further for an immediate end to AI turns).

Legacy

Empire is the largest project I've ever undertaken to unravel code from another system and it was very gratifying to work on. I've included some of the original source code in the screenshots, along with my notes. 

The zip file includes:

  • The game executable
  • The original BASIC source code
  • The updated game's source code in C

I hope you enjoy playing.

If you ever played the original, or you know who made it, please let me know as I'd love to give them credit and to have a chance to talk with them about the game!

Download

Download NowName your own price

Click download now to get access to the following files:

Empire.zip 1 MB

Leave a comment

Log in with itch.io to leave a comment.