Archetype

My first computer in college was a tiny Sharp IBM-compatible laptop with two 720K floppy drives and no hard drive. This was the development platform for Archetype, which ended up being about 6400 lines of Turbo Pascal.

Archetype was something of a language experiment, and has a certain minimalism that you may find either elegant or annoying. You can look at some sample code from “The Gorreven Papers”, one of the adventures included with Archetype, to see what I mean.

It can be used for more than just adventure games. Here is the complete listing for the Animal program in Archetype (included in the distribution).

Download

In 2014 I rewrote Archetype in standard C++11, partly as a way to learn some of the new C++11 features, but mostly to get Archetype out of its Turbo Pascal dead end. The result is available here on GitHub, and is about 6700 lines of code. (I also wrote an additional additional 2200 lines of tests. The original Archetype had zero tests, which shows that I’m more conscientious now than I was in 1992, and have a different development process.)

Here is a graph comparing the two projects by line of code. Note that the “C++ Modules” line is another way of organizing the same code as in “C++ Files”, treating each header and code file as a module.

Archetype, its source code, and the source code of the games that come with it, are all free. I only ask that you redistribute them in the same form as you found them, so that my authorship is not lost.

Older Downloads

The original 1.02 package doesn’t even run on PCs anymore, as it targeted the 8088 instruction set. You can run it on a virtual machine. The main Archetype package and the Archetype source code are both ZIP files.