SPID3 – Halls of the Clear Creek (DND1 Remake)

I will be posting SPIDs (Slashie’s Project Idea Drafts) in the blog, they will be short ideas for games or other projects I may or may not develop into full projects. May be someone will be inspired by them and save me the trouble of developing them.

Remake Richard Garriott’s DND1 as a classic Ultima game with an overhead tiled view, keeping as much as possible of the original game elements but making it a balanced and fun experience, while at the same time evolving it in a different way than Akalabeth and Ultima 1.


Two years ago, I participated in a contest to recreate the original game so that it could be played in modern computers (as well as introduced into Shroud of the Avatar) the results can be played here

The original DND1 used a teletype as the means of player interaction, it printed the events happening into the world in paper, and the player typed the commands to guide his character through the (deadly) dungeon.

After creating a character (from three possible classes Fighter, Cleric or Wizard) and rolling his stats, the player can buy equipment from the dungeon shop (available items are weapons, armor some utility items as well as food).

Then, once in the dungeon, the player had access to the following commands:

  • Move around: In each of the cardinal directions, after moving the player could fall into traps.
  • Open Door
  • Search for traps and secret doors
  • Switch weapon at hand: i.e. wielding a weapon from inventory
  • Fight: Used when an enemy was next to the player. Combatants would hit each other until missing (savage!)
  • Look around: Since the game didn’t show the surroundings after each action, this would make it print the surroundings as a coded matrix.
  • Save Game
  • Use Magic: Use one of the bought spells
  • Buy Magic: Get access to spells according to player class.
  • Pass
  • Buy HP: Exchange gold for HP.

All these command would be changed as following

  • Move around: Use directional keys instead, moving the player into the map.
  • Open door: Used automatically when moving into a door.
  • Search: ‘S’earch command, would show secret doors and traps.
  • Switch: ‘Z’tats command, allowing wielding weapons and wearing armor.
  • Fight: Moving into monsters or ‘F’iring ranged weapons in a direction.
  • Look Around: No longer needed since the viewport is updated after each action.
  • Save Game: Ctrl+’S’
  • Use Magic: ‘C’ast spell, then the number of the spell, based on the learned Spells
  • Buy Magic: Instead of a command this would be done by talking with the mage shopkeeper (an NPC)
  • Pass: Spacebar
  • Buy HP: Instead of a command this would be done by talking with a trainer (an NPC)

The objective of the game would be the same as in the original: Killing all monsters in a floor and then advancing into the next one (with tougher monsters). There are 8 floors.

A light plot, previous to Ultima 1 and Akalabeth, would be introduced into the game.

Floors would be generated with a layour similar to Ultima 4 SMS dungeons.

Some data from the original:



Runner up for DND1 contest, and the public release of JSTTY

DND1 Contest winners were just announced by Lord British, and my entry happily ended up as a runner-up ^_^


Aside from the cool runner up perks (I particulary love the Collector Box including Trinket, Cloth Map and old school manual, and physical media for the game and the OST  :’)) , the best prize for me was being able to interact with Richard Garriott in many ways, and being given an opportunity to recreate an amazing piece of video games history. It was a wonderful community effort with a lot of people cooperating by transcoding the source, sharing ideas on how it worked and trying to figure it out. Thank you all!

If you want to play it by any chance, I recommend you take a look at the ultra complete illustrated manual, as well you might want to check out my own remake, DNDX, which may be less hard to your brain.

Thanks again to the cool guys at Portalarium, and be sure to check out Shroud of the Avatar if, by any chance, thou hast not!

winnerAlso, as promised, I’d like to publicly introduce JSTTY, the TTY display emulator for JavaScript I used for my entry and remake. It’s open source, you can find it here

With JSTTY you can simulate keyboard input as well as output in a teletype machine via a very simple API, I might write a tutorial soonish, in the meantime I’ll just say it’s as simple as:

  1. Create a HTML file with a canvas element, referencing jstt.js
  2. Initialize a JSTT object, referencing the id of the canvas element
  3. Use the print, printLine and inkey methods from the object

There’s a sample of how it works inside the project, it’s pretty simple 🙂

Screen Shot 2014-06-20 at 7.17.45 PM


DND1/DNDX – Finished at last

Oh my, it’s been quite a LOT of work!

I was frankly running out of motivation to finish this; had it not been for the other challengers and their messages in the forums, I would probably have given up :/

But it is not this day, this day WE FIGHT!

So, there are the finished version for both DND1 (The direct port) and… surprise oh surprise, DNDX, the remake I made from scratch!

Advanced UX
Advanced UX

The changelist from last version would be *huge*, save/load and dungeon generation have been implemented, as well as HUNDREDS of tweaks/bugfixes, not to mention the work on DNDX which was recreating the whole carbonara into modern JS.

Astonishing GFX!
Astonishing GFX!

DNDX is a much enhanced and user friendly version, seeking to make it a bit more enjoyable and playable game. Let me know what you think!

So without further ado, check them out! All bug reports are appreciated, you can send the over @slashie_

DND1 – Continued renaming/testing/debugging, started working on DND1X

Link to current version

Finished renaming all obscure variable and line number pseudo functions into their real meanings in order to be able to debug properly.

Bringing order into the sourcecode
Bringing order into the sourcecode

Played through and all seems to be “working” ok; I think I’m leaving this version as the “replica” one, the one that seeks to be as faithful as possible to the original, I still value any bug reports you can send me tho!

Magic Missile!
Magic Missile!

…which takes me to the next step, now that I know quite well what’s going on into this ancient piece of BASIC, I’m up to remake it from the ground up in modern well structured JavaScript. I’m calling it DND1X, I’ve already started working on it… it should provide peace into my troubled mind after trying to replicate the original with all it’s woes. The idea with this one is trying to extrapolate the original game into a polished version that someone might even play and enjoy. This one will also have a working dungeon generator.

Clean output at last
Clean output at last

Of course, I’m keeping both codebases apart so people can experience the pain of the original one anytime they want. I should note however that even for the original I made some tweaks in order to make it at least a bit playable, the most noticeable is the change on player hitpoints which were originally an 1D8 for a fighter, to a (3D8)X3 range.

Finally, I thought I’d also link to some other entries into the challenge:

DND1 – Debugging and first stab at mobile

Renamed variables
Renamed variables

Spent some time renaming all variables to their real meaning in order to be able to debug it… found some bugs while at it! (from the original :P) thanks again to dejayc and others in the SoTA forums for their work on helping devise together the usages for all variables and weed out critical bugs, special thanks to dejayc for his digested version; this has been quite a community effort!

Now that I know a bit more about the game whose source code we have, my plans have shifted a bit from a verbatim copy retaining all bugs to a slightly corrected version with no critical or obvious bugs (I can’t help but imagine how hard it was to debug a program back then, and this is the first iteration!), then produce an optional tweaked version with better user experience and gameplay balance.

I NEED YOUR HELP! Please test the game and let me know if any issues arise 🙂


Interface with touch soft keyboard
Interface with touch soft keyboard

Also, yesterday I also had my first try at a mobile interface, it works but it’s not optimal for smartphones because of the small onscreen keyboard size. I’m thinking on a more efficient interface if a bit of a departure from the original (I’m almost sure Richard didn’t design this for smartphones with touchscreens back them).

At least this version should be usable on tablet devices.

DND1 Further fun

Just for fun, I added a Reference Card and some adornments to the game today.

Some Ancient DND Artifacts
Some Ancient DND Artifacts, and the reflection of a developer.

I also took some time to observe Richard’s picture of the original DND1, which includes three paper tape rolls with the program (probably different versions?) as well as a beautiful, ages old sheet of paper containing original input from the program.

In making the transcription, I *think* I have discovered something useful; there seems to have been more than one version of DND1! the version whose output is printed on that page is definitively an enhanced version over the one whose source code we finally got, it’s possible that the final DND1 had indeed character based maps, similar to the sample on the contest entry!

But there are just fun conjectures, who knows?


Yet Another Project: DnD1 port to JavaScript

This game ran in a computer similar to this (the lower end is the microcomputer)

Richard Garriott, creator of the Ultima Series, posted a call for warriors all around the globe to recreate one of his first games, and possibly one of the very first computer RPGs, into a modern accessible format.

How could I let this opportunity pass? as scarce the time as it always is (and more-so in these times of my life), I delved into the project; not caring much about the contest per se, but rather the option to recreate such an interesting piece of history.

The moment I saw the post I started researching on the topic and stumbled upon this video, I immediately knew what I was to do.

I decided to structure the project in two parts, a JavaScript teletype emulator (JSTTY) and the JavaScript port of the game itself; the teletype emulator was mostly fun to work in, had some help from fellow jucarave, and will probably open source it soon.

The second part was pretty different, and not straightforward at all.

At first I started just translating the original BASIC program into equivalent JS, but once I started developing the input module for JSTTY I figured out doing blocking input in JS to emulate the INPUT statements was not going to be simple. Ultimately I ditched all my advanced and rebooted development under a different paradigm.

So, instead of doing a direct translation, I had to read thru the logic and change the control flow so that it worked based on callbacks for the input methods.

My DnD 1 port
My port, running on JSTTY

Richard posted a link to a 24 pages scanned version of his BASIC source code; thankfully, dejayc, one of the members of the SoTA community went thru several iterations and finally produced a flat text file which made things much easier. I also got the absolutely awesome PDP-11 teletype font from him.

The game itself, it’s interesting trying to trace all the development that went from this initial version, to Akalabeth, the Ultima Series and beyond; there are certainly some aspect from this game that served as a bridge between the Dungeons and Dragons PnP RPG nerds and the whole cRPG genre.