Monday, January 14, 2013

More About the Abandoned Farmhouse Adventure

I mentioned here earlier that I ported my Abandoned Farmhouse Adventure  game to the Raspberry Pi and got it into the Pi Store as a free download. Here are some more details about the game and how it was developed for people that may be interested.

The program was written in the C programming language, consisting of just over 800 lines of source code. I originally wrote it in March 2012 as a game for the Replica 1 Computer, a replica of the first computer, the Apple 1, offered by Apple Computer in 1976.

The Briel Replica 1 Computer
On the Replica 1 it was compiled using the CC65 compiler which supports the 8-bit 6502 microprocessor used by the Replica 1 (and Apple 1). It took me a few evenings and weekend mornings to design and write the game. The game had to fit within the hardware constraints of the Replica 1: a one MHz 8-bit processor with only a few kilobytes of memory and only text output.

I did most testing of the game on a Linux desktop system using the GNU gcc compiler, as it was faster and easier to build and debug than on the Replica 1.

The game was announced on the Briel Computers forum and made available to any Replica 1 or Apple 1 computer users who wanted to try it.

I've been following the Raspberry Pi since it's early development. With the announcement of the Raspberry Pi store, I thought it would be fun to get an application in the new store. The adventure game was already running on Linux so getting it on the Linux-based Raspberry Pi should be straightforward. Porting it to the Raspberry Pi involved adding lower case text (the Apple 1 could only display upper case text). I also removed some code that was specific to the CC65 compiler. Most of the work was figuring out how to publish an application in the Raspberry Pi app store, and waiting for it to pass through the application approval process.

Screen Shot Of The Game
For people trying the game, I won't give a solution or any spoilers, but here are a few hints. I suggest drawing out a map on a piece of paper and making notes as you play the game. Pay attention to any messages, like needing food or water, as these will soon become important in the game. Not all items in the game are necessarily needed to solve it; some may be red herrings. The game will take some time to solve. Keep at it. If you get frustrated, set it aside for a while and you may think of some new insight into how to solve it.

I would really like to hear from you if you solved the game, or even if you played it but did not complete it yet. As I write this the game has had 361 downloads but no one has actually reported completing the game. I don't think I made it too hard, but it is difficult as the developer to stand back and assess how challenging the game is.

I have been planning to make a version of the games with a Qt-based graphical user interface on it, which would be less like a retro text adventure game but more playable by people accustomed to modern GUIs.

Early Prototype of GUI Version of the Game
The game is open source and published under an Apache license. The source code can be found here. You are free to share, port, or modify the game subject to the terms of the Apache license. If you are really stuck solving the game and are at all fluent in C code, you could look at the source code to get some hints. Much of the code is data-driven and could be used to implement an entirely different adventure just by changing the map, strings, and some of the logic that handles special actions.

Finally, the farm described here is based on a real farmhouse where my father lived many years ago, right down to the layout of most of the rooms. And I also have a grandson who was almost three years old at the time I wrote this. It is interesting to think that in a few years he may come across this game in which he appears and maybe play it.

1 comment:

Anonymous said...

I finished it! It took me 48 turns. I did look in the source code some though.