Making a C64 Text Adventure in C++

Last christmas, a forum I hang out on arranged a mini-competiton: to make a winter or xmas themed text adventure game.

c64midwinter

This struck a chord with me, and I got to thinking about my early attempts to make games on the C64. I never did get around to make one back then – I guess I just wasn’t experienced (or disciplind) enough back then- so I decided to finally make a C64 text adventure game as my entry for the competition.

Now, I didn’t feel like making a game on an actual C64 (or emulator), but I really wanted to get the same look and feel as if it was a proper old C64 game. First thing I did, was gather some inspiration on the subject. Back when I was new to the C64, there was a swedish computer magazine (called "Datormagazin"), and they published a series of articles about how to write your own text adventure in basic.

dmztextadventure

I still have those articles, and I re-read the series while making Midwinter Rites, my entry for the competition. I made my game in C++, using my Pixie engine, but I think the articles really inspired me to keep things in the right, oldschool style.

midwinter_title

Some time earlier, I had created an image of a goblin in Poser (the art package I use), and I managed to play around with it in photoshop to get it to look quite nice with the C64 colors and resolution, and that made for my title screen.

midwinter_screen1

As I made the game in only a couple of evenings, I didn’t really have time to plan things out in any detail, but I rather just had to dive in and get things done. I found the C64 font somewhere on the internet, and I created a pixie Sprite object for each character slot on screen, initializing each to a space, and changing the sprite images to display text. Pixie is good at handling lots of sprites though, so it’s not as weird a choice as it might sound. Most of the game is implemented in just one file, with a bunch of functions to display room descriptions and execute commands.

midwinter_screen2

As I wanted  an authentic feel to the game, I decided to include multiple ways to die and having to start over. I didn’t add the ability to load and save, as the game is quite short as it is now, but if I continue working on it, I will definitely add that.

midwinter_screen3

I found the most challenging bit to be making up the story. I didn’t really have anything planned out when I started, but just made everything up as I went along, going back and fixing up things as needed. In the end, I got a sort of coherent, but also quite linear and short, adventure game. And it feels like the good old ones :-)

If you want to give it a go, you can download Midwinter Rites here.

The source code is available as well for those interested. It uses the Pixie Game Engine(included in the download) but it is somewhat messy, as I had to rush things for the deadline…

Download the source code:
Midwinter Rites Source Code – 967 KB

2 Responses to “Making a C64 Text Adventure in C++”

  1. Jay says:

    Great job! and Good read! Brings backs memories remembering trying to write games for the Commodore, good times! And that specific magazine and series too was amazing. Would you mind put the whole pages up for readbility? This kind of things are great inspiration.

  2. Jay says:

    Also wanted to share few interesting things on the same subject, hope you find them to be interesting, I sure did!

    http://amr.abime.net/cover_scans_40

    http://www.commodore16.com/php/images/books/WriteyourownAdventurePrograms.pdf

    http://www.youtube.com/watch?v=LRhbcDzbGSU

Leave a Reply

You must be logged in to post a comment.