Richard Garriott created one of the very first computer based role playing games in 1977.
The game was inspired by a bet between Richard and his father Owen.
Richard had already written many smaller programs and simple games on the teletype he had access to since 1974. His early programs included calculating radio wave propagation in the ionosphere. Variations of this early “ray tracing” code he wrote won him numerous science fair competitions up through international competition. Still games were his obvious early passion.
Richard’s father told Richard, that if he could create a whole working role playing game, that he would split the cost of an Apple ][ computer with him. The result was DND #1!
DND #1 was created on a teletype at Clear Creek High School in Houston Texas, connected via an acoustic modem to a PDP 11 type mini-computer. Richard typed the game on a separate terminal onto paper tape spools, then read the tape strips into the terminal connected to the offsite computer, and ran the resulting program. The resulting program would play a simple Dungeons and Dragons like role-playing game. The player had a character that would explore a dungeon in search of treasure while fighting monsters along the way.
The players could visualize the world as a top down scene drawn with ascii characters. Asterisks were walls, spaces were corridors and other letters had other meanings. In this way, even this 1st game closely resembles the “Tile Graphics” that Richard created and standardized through his later work.
Predicted simulated original output style
Richard wrote 28 of these “DND” games in High school. He numbered them DND #1 through DND 28. When he finally had that Apple ][, he rewrote DND #28 to become DND 28b… also known as AKALABETH the precursor of all things Ultima!
No one has seen this game run since the retirement of the teletype in 1979, which is when Richard made the final printout of the game.
DND #1 represents one of the earliest known computer role playing games. Originally created and refined between the years 1975 – 1977, this game is one of the few true founding efforts of the entire computer gaming genre. Interestingly the ascii based “tile graphics” are a clear forerunner of what followed in Ultima and many other computer role playing games, and thus remains relevant to the genre’s history.
Richard has been eager to see this simple BASIC program, resurrected in a modern usable form, but remaining true to the original in as many ways as possible.
To achieve this end, Richard is offering a bounty of Shroud of the Avatar pledge rewards for the best reincarnations of DND #1!
Starting April 15th 2014, just past one year into the development of Shroud of the Avatar, and running for 1 month through May 15th, Richard via Portalarium will be accepting submissions of DND1 Resurrections in each of two versions. Submissions may be a Unity Version, and or a no-plug-in Browser Version. Winners will be announced shortly after the submission deadline.
Best Unity Version & Best no-plug in Browser Versions will receive a Citizen Level Pledge Reward worth approximately $550.
2 runners up in both categories will receive $165 Collector level pledge each.
To be eligible, entries must:
- Be a faithful recreation of the original, not embellished (e.g. No fancy graphics, stick with a traditional font on “yellow” paper.)
- Be fully working and debugged versions as similar to the original as possible.
- Be self-running, and not require any other installations that are not automatically requested during the running of the entry.
- Add a “© 1977-2014 Richard Garriott” at the beginning.
- May include an addition of “Ported by DEVELOPER NAME”.
- Must agree that all rights to this port remain property of Richard Garriott
Unity Version Entries must: Work inside unity, rendering to a texture, such that Portalarium can map it in Shroud of the Avatar onto an object or interface element. Unity versions earn bonus points for the more versions of Unity they support (web player, Windows, Mac, Linux, iOS, Android, PS3, etc.)
No plug-in Browser Version Entries earn bonus points if run on: 4 major browsers (Chrome, Internet Explorer, Firefox, Safari), 3 operating systems (windows, mac & linux), and 2 mobile platforms (iOs & Android).
All submissions must be received before May 15th!
Submissions and questions should be sent to: community@Portalarium.com
We look forward to reviewing your submissions, and rewarding the winners!
Discuss with the community!
We introduced a subforum here and chat channel #DND1 (use /join #DND1) for discussions and everything related to this contest!
Awesome! Looking forward to what the community does with this!
Speaking of community,
What would you guys think about setting up a forum/IRC for this project?
I nearly have the BASIC code compiled into Linux/Win binaries, that would allow anyone to be able to play the game. Not all web/javascript programmers have experience building from source, so this could get them into the game
I figure it might be nice to have some competition from some ambitious coders who might not have been patient enough to learn BASIC obviously you would still need to learn some BASIC to get the algorithm right. But that way we can work together on some of the hard parts to make sure we get this port to be as close as we can
If enough people are interested, I will put together a video of part 1, and setup the forum thread on the SOTA forums so we can work on this, and maybe an IRC chat
-John
Good idea, let me see, maybe we’ll just open a forum and IRC channel on SotA’s forum and chat…. will keep you posted!
That would be fantastic if you could set that up for us Ill keep an eye on this thread, if we get it up soon I will post up the basic instructions on how to get the basic compiler and everything setup so that those from other coding backgrounds can take a stab at it.
Really exciting to see what ideas come up
Done – see last line of post above for link to subforum and channel name. Enjoy!
Thanks!
I wouldn’t mind having a go, but the link to the BASIC source code is broken
Nevermind, I got it. The correct URL is this (notice the lower-case “dnd”).
That looks like a lot of fun!
Like !
Can we fix all the misspellings, or do we have to leave them be?
Gotta leave em I particularly like “NO SPIKES AH THATS TOO BAD CAUSE YOUR DEAD”
You can definitely fix the misspellings!
Nah…I think all the mis-spellings are part of the charm – it would be a shame to change them. That would be like fixing the grammar of “all your base are belong to us”!
I am just now starting to learn about Unity. Oh if this contest only came six months from now instead of right now with a month out deadline… But no worries. This looks like a whole bunch of fun, and I’ll be very much looking forward to what people who are *already* competent in Unity do with this.
I love BASIC. The only programming language I truly understood. (wipes a nostalgic tear away).
Can we get access to the DNG files? Otherwise, should we just craft our own?
You can download a “digitally remastered” version of the source code in PDF format at the following link:
https://www.shroudoftheavatar.com/forum/index.php?threads/dnd1_complete-digitally-remastered.9558/
This PDF version of the source code has text that you can copy and paste.
Does someone a good site for BASIC documentation, where i can learn the basic?? im not really used with procedural programming hehehhe…
Sounds like fun! Looking forward to seeing it in the game. Good luck all!
I’m looking over the code and I have one major concern. On line 210 – 264 it is loading from files named “DNG1”, “DNG2” … “DNG6” and “GMSTR”. Those don’t seem to be included anywhere. This is a flavor of BASIC I’m not familiar with/written 15+ years before I started programming so I may be missing something.
There appears to be a primitive “level editor” at 11000. Enter the dungeon number, and then a series of cartesian coordinate and tile type pairs. Enter a negative tile type to save. To get to it, there’s a hidden command of 12.
Incidentally, I think the “Predicted simulated original output style” must be from some other version of DND.
It looks like line 09080 was printed on top of line 09070. I wonder if Richard could take a guess as to what each line was supposed to print?
Never mind, I figured it out!
Anyone willing to transform the PDF into simple text? I mean, I know it is a competition, but that would be really useful for all people involved – we don’t even know how the program looks like.
I think the easier method would be to create a BASIC interpreter in C# (it does not need the same syntax, only the same options) and place the original code on it – if we make an OO approach to it, I don’t think it will have the same feel.
You can download a “digitally remastered” version of the source code in PDF format at the following link:
https://www.shroudoftheavatar.com/forum/index.php?threads/dnd1_complete-digitally-remastered.9558/
This PDF version of the source code has text that you can copy and paste.
Don’t we need that data that makes up the dungeon? It looks like there is a routine to read it in…
I played “Star Trek” on that kind of teletype in 75-77. Learned basic and fortran programming during junior and senior years of high school. We programmed blackjack and a few other simple games as well as accounting programs during that time. ( at least when we were not looking at long range scans and guessing target vectors). I played some games similar d&d games on early pcs, as well as adventure and Zork.
I’m sure it would take me until May 15th to learn how to program in the modern day. I turned towards medical school as a sophomore in college and left engineering behind. Still wonder how life would have turned out different if I had gone into computer engineering, graduating in 1981.
My youngest son is headed that way, he graduates next month with computing science and history degrees.
Heh, at Strake Jesuit in Houston, Tx! We were probably logging on to the same library computer.
Anyone know which version of BASIC this uses? I found the manual for PDP-11 BASIC here:
bitsavers.trailing-edge.com/pdf/dec/pdp11/basic/DEC-11-AJPB-D_PDP-11_BASIC_Programming_Manual_Dec70.pdf
Once we identify the language and find the correct reference manual, the next step would be to either OCR or manually transcribe the code from the PDF. OCR may be difficult due to the low resolution and lack of contrast in the PDF.
Next up would be finding an emulator to a) run the code and b) begin debugging it. I noticed on line 2417, for example, that the word “PRIT” is used instead of “PRINT”. Not good unless PRIT is an actual BASIC statement I’m not aware of, of course. More insidious will be any logic errors that don’t halt execution but only affect functionality.
After it’s running and debugged in an emulator the code will be at a point where it can be ported. I’m guessing a good next step after that would be identifying and renaming variables for clarity and chopping everything up into procedures based on the occurrence of GOTO’s and GOSUB’s.
While difficult, I think the task is possible, but without starting from a solid foundation there will be much weeping and gnashing of teeth.
I have a pdp-11 running bsd and rsx-11 under simh (linux and raspberry pi), no sweat.
An earlier comment here has a link to a PDF with transcribed text you can copy and paste.
And interestingly enough, I’m working on an online basic emulator to run this program too
Totally Tubular! Crap, that was the 1980s. Ah, Far out man!
Isn’t render to texture only available on Unity Pro? Can we just make it in Unity Free, it should easily be modifiable to set the Camera to Render to Texture?
Can someone who has abbyy reader or acrobat post the text. Might tool around with it in my spare time.
See earlier comments.
I understand the point that you are making. That is exactly how I feel when someone suggests a competition to “Write a story that could be used as an in-game book of fiction”, since I have zero talent in that area. The point is we are all different, and while I think it would be great if we could all get a chance to contribute in our own way, I don’t think its possible to do that in a single competition.
I am sure that there will be other competitions that draw on the many different skills and talents in the community, so that over time we all get a chance to participate.
Definitely tempted to give it a go, but this seems to be a dialect from before my time. So what does the statement:
FILE #1=”DNG1″
do (and is that a hashtag?)? Is it correct to assume that this is just file I/O and the statements:
FILE #1=”DNG1″
RESTORE #1
DATA “SWORD”,10,”2-H-SWORD”,15,”DAGGER”,3,”MACE”,5
would just write that string into it?
Finally, a coding contest. I wish I had more free time to have a go at it. Best of luck to everyone competing!
The dungeon files themselves are missing from the source.
What is this ‘fair’ you speak of? If everything had to be fair, there would be nothing.
If you don’t have the skills to participate, then it’s not for you, but you know what else isn’t for you? Complaining about it.
internet intimidation oh boy
Someone pledge Duke right now push us over 4mill fly to Austin and I’ll buy you all the beer you want while we party with portalarium!!!! <- this deserves some kind of MVP post like SC
Currently the dungeons look nothing like the illustration, they are digits from 1-9. Only the player named “SHAVS” can play the game, everyone else is stopped. Asking for instructions either quits the game or jumps into the middle of a loop and crashes.
Are we supposed to preserve all these things?
Since there is a competitive element to this, I can’t really show you my code or anything… but just wondering because, as the game is now in the included source, it’s just barely playable. You can’t hit a creature until it hits you first, it looks like, for instance.
Never mind, the monster logic is different than I said. Question remains — an exact port, including the weird stuff?
Looking at the listing I have noticed that (probably due to the acoustic modem connection) occasionally the odd letter is corrupted.
For example:
04870 GOCUB 08410
There are others, both before and after that one.
Another example is
04800 LET B(K,3)=B(K,3)-INT(C(1)*4/5I
which I think should be
04800 LET B(K,3)=B(K,3)-INT(C(1)*4/5)
Something to watch out for.
If I were to program a port of this, most likely I’d either do it in, well, BASIC, or straight-up C, which could get the feel of this perfectly.
this is not an equal contest for all
Contests aren’t equal. Those are called “raffles.” Contests are competitions involving a specific skill, and the winner will be whoever has taken the time to hone that skill. You are welcome to participate, and it is free to participate – so it is freely open to all. If you do not have as much skill in this area as others, you likely won’t win. Same with a contest involving writing, photoshop, painting, sculpting, level design, weightlifting, sports, hot-dog eating, music, racing, horseback riding…
like I said not equal to all most will be left out due to lack of knowledge. love how people chime in for people leaving feedback. prizes for this game that are given out should be avail to everyone equal. not based on 10 percent that can do a task. a pro tip for you too raffles are not equal you can buy or trick for better odds. like the raffles during pledge week probably thousands of gmail accounts opened.
My name’s not Stavs so I can’t play…
Brings back so many memories from that ‘age’ for me although I was using a very similar basic on a Tandy TRS80 with all the expansions and 48kb of memory back in 1977 and the Tandy allowed one to use colored blocks which were so much more immersive than ascii characters, honest !
Shame I don’t have time to port this over to Unity in time for the competition close but I will do it later in the year for sure just for the nostalgia. Thanks for the coding.
This is a cool idea – but a stupid execution! SInce no one has ever seen the game running, how are we supposed to understand what the final re-creation should be like? Do you expect people to read sourcecode from an age-old, unknown BASIC dialect and then execute it in their head to understand what it does exactly?
Oh, and as mentioned by many others already, there are lots of files missing, that were used by the game. Obviously dungeon-data-files.
So, while I, being a programmer myself, would love to join in on this, I see it as a big waste of time as long as Richard doesn’t take some effort to at least provide the code in electronic form, and with all the missing data files.
“Do you expect people to read sourcecode from an age-old, unknown BASIC dialect and then execute it in their head to understand what it does exactly?”
Uhm… that’s exactly what I did, actually. And many others.
Hello fellow backers. Happy easter and greetings from Germany.
The files “DNG1” to “DNG6” and “GMSTR” are not needed in there original form. They can easily be replaced by your own files when you understood the published source code.
I fixed some typos and corrupt goto statements. And btw. in my understanding the lines 09070 and 09080 should be:
09070 LET X2(M)=0
09080 GO TO 07000
I am not totally sure, but I think line 05740 needs also some reconsideration.
Up to now I am just missing the CLK statement from line 00160, which seems not to be very important as J9 is not used in the following lines anymore. And the FILE command (to read in the dungeons), which I replaced by some other command but unfortunatelly didnt work also. I will do some more research on this issue later.
Have a nice easter weekend
YEAH finally I got it running!
I used bywater (an ordinary basic interpreter), which is available in the software center of Ubuntu 14.4. I just replaced some statements.
I’m pretty sure the CLK is to create a seed for the random number generator.
Yup! That would be it exactly.
He doesn’t mean “fair” as in others have more knowledge or skill than other, it is just this is the second competition where only Unity skilled users have a chance to win great prizes. What about the rest of the community?
I just feel that this is more about Unity than SOTA.
Any programmer can win greeat prizes here…
Ahh, a raw HTML5 app, eh? *Cracks knuckles* Let’s do this…
I hand typed out the code from PDF. You can get a copy of the text on github.
https://github.com/kingmundi/DND1
It appears to be a BASIC dialect that ran on OS/8 for the PDP-8
I was wondering…
2. Be fully working and debugged versions as similar to the original as possible.
Debugged as in debug our own code, or as in debug the original code?
Probably both, as there are several points where necessary syntax is either wrong, or missing altogether, probably because of a typo (PRIT comes to mind…)
You don’t have to use Unity for this contest. You can use a web browser which is the route I am taking. Not that I need the prize I just like the challenge. This old school LB code is rattlin’ the beans around in ma brain pan.
I’m not formally entering the contest, but I thought it would be fun to port it to Applesoft BASIC. Source code here: http://users.ece.gatech.edu/~lanterma/historical/dnd1/
The ported code seems to play OK in Joshua Bell’s online Applesoft BASIC interpreter.
This contest is hilarious and awesome! I think it’s great that Richard is showing off the original code. Goodness me it reads like the old Apple Basic code. I can’t help but smile as I read down the page and reminisce about all my old coding adventures on the Apple II. I remember playing this style of game on mainframes when I was a freshman in college – (the original cloud computing by the way, mainframe and dumb terminal). I can’t wait to see the results of this. I wonder if we can get this working on the iPad.
What does the BASE keyword do, form the 4th line? That PDP manual doesn’t seem to mention it, and it’s not anywhere else in the code. Thanks
It sets the starting index number for an array. Thus, with BASE 0, arrays start at offset 0. Similarly, with BASE 1, arrays start at offset 1.
It would have been nice if it wasn’t only Unity or Browser.
Oh and I’m assumeing that this is what is meant by Unity? https://unity3d.com/
This does read as if it is from at least two different sources since it shouldn’t have been able to run with the number of incorrect goto line numbers. It is easy to understand and fix, but it seems really strange.
I would say it is probable that they intentionally posted an ‘early draft’ of the program, prior to debugging, since debugging the code is part of the conditions for the contest… just an insight.
I strongly doubt that was intentional. Based on Richard’s comments in twitter, I don’t think he has much detailed recollection of what was or wasn’t exactly in this particular one; remember he wrote 27 more! I suspect he found it in one of his many rooms of ancient treasures and thought “hey, this might be fun.”
I suspect some of the errors are modem line noise corruption.
Since the port is to be fully working, yet also as similar to the original as possible, would it be possible to get some clarifications?
1) Should the ported game output (cmd 6) be like the current source or like the PSOOS?
2) Should bugs in the current game be maintained or fixed in the port?
3) Should the ported game end on trick input (player name for example)?
4) Should the ported game support loading and saving?
5) Should the ported game support the “hidden” menu items?
At a more abstract level, I assume the port should maintain the tele-type interface. Is this correct?
I’ve taken a look at this and started converting it to C (for a UNIX environment, not Unity or the Web). So far I’ve got about half way down the listing, so I have the setup code, player movement and player attacks, but not enemy movement or magic use yet. I have also stubbed out all of the file access routines for the moment, since it is clear that modern computers have a very different idea of data formatting than is implied here.
The unusual minicomputer dialect of BASIC makes the conversion challenging – unlike some of the microcomputer dialects, it has a relatively full feature set, yet it still lacks all of the enhancements introduced by BBC BASIC, and accurate documentation is so far elusive. Fortunately it doesn’t seem to matter, since practically all of the features actually used are standard BASIC.
One thing to note is that although almost all of the constants used are integers, the variables are clearly floating-point capable, and are used as such – at least for hitpoint counting. One difference between BASIC and newer languages is that the division operator always has a floating-point result in BASIC (if the dialect is not limited to integers), whereas in C it only has a floating-point result if at least one of the arguments was floating-point. This is significant when using fractions as constants or multipliers.
There are some typos – whether by the original author or as a result of the worn-out hardware printing it out, is not always clear. The schoolboy spelling and grammar mistakes in the text strings are the most obvious, of course. I am liberally reworking the text to make it somewhat more professional in style, but not changing the meaning or experience too much.
There are also some fairly obvious logic bugs, which were presumably corrected in later versions of the game – I can’t imagine them going unnoticed for long. One of these appears to render the Mace weapon completely useless; another involves potentially selecting the wrong monster for range computations; there are also several weapons for which a critical hit delivers less damage than a normal one. In my conversion, I have fixed the former two bugs, but left an obvious way to put them back in for a more authentic version.
Finally, as previously noted, the map output is in a different format than described in the article, being in the form of numbers rather than symbols, and thus somewhat harder to read. The symbolic map must have been a feature of a later version of the game.
I suspect that most of those obvious bug fixes are in “DND #2″… maybe Richard can dig through his archives some more?
I’m keeping all the schoolboy spelling/types and the raw unfriendliness with the user because quite frankly that’s what gives value to this particular piece of code.
Work in progress: https://www.youtube.com/watch?v=_eXtqdae3G0
I just wish I knew how to do that stuff.
Way late post but has anyone seen notes for #2-28?