The Wizard's Castle Trivia
Sometime in the mid to late 1970s, Joseph Power played a mainframe game called HOBBIT, a fantasy-game similar to the mainframe Star Trek space battles. He managed to obtain the HP BASIC listing, which he describes as "a horrible pile of spaghetti code".
He rewrote the program on a TRS-80, but soon got bored of it. Power, who played D&D, was used to more interactivity, and finally decided to write his own version, which became Wizard's Castle. In his original design, the player could buy a shovel with which he could bury his treasure so that monsters didn't steal them, but Power abandoned the idea due to the amount of code it would have required.
Power first implemented his game on the Exidy Sorcerer demo machine of an early computer store, New Dimensions in Computing (thus the name of the kingdom, N'dic). He finally managed to squeeze the text-only game into 16K, (ab)using the graphics memory for his own dark purposes. The game became very popular: Apparently, two computers were sold by parents of kids who were hooked on the game.
Power then struck a deal with Kilobaud magazine who was looking for programs for its startup software division. However, the deal wasn't executed, with Kilobaud first wanting a graphical version, and then completely leaving the Exidy market.
Power published the BASIC in 1980 in the Recreational Computing. By then, the program had already been ported to TRS-80, and later to the Apple II (by Power) and CP/M.
The Commodore PET/CBM version will also run on a Commodore 64 and Commodore 128 (in 64 mode).
Since this game was written in BASIC and had its source code published, it has enjoyed all sorts of conversions to niche systems and similar languages over its long lifespan, including one for the Sharp MZ-700, Adam Biltcliffe's version in Z-code, an adaptation to Cambridge Z88 BBC BASIC by C.L. Fenn, and ports to the HP-41, TI-83 and TI-89 scientific calculators by Dejan Ristanovic, Raymond Mullikin and Alex Morrise, repectively.
The game's source code was published on the July/August 1980's issue of the Recreational Computing Magazine.
The game's original Basic source code is only 917 lines long.