Richard Garriott’s DND #1 Contest!

teletype

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.

Photo-DND-#1

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.

 DND1 Graphics

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.

sourceCode

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:

  1. Be a faithful recreation of the original, not embellished (e.g. No fancy graphics, stick with a traditional font on “yellow” paper.)
  2. Be fully working and debugged versions as similar to the original as possible.
  3. Be self-running, and not require any other installations that are not automatically requested during the running of the entry.
  4. Add a “© 1977-2014 Richard Garriott” at the beginning.
  5. May include an addition of “Ported by DEVELOPER NAME”.
  6. 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!



80 thoughts on “Richard Garriott’s DND #1 Contest!


    1. John J. Donna IIJohn J. Donna II

      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 :)

        1. John J. Donna IIJohn J. Donna II

          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





    1. theArk0stheArk0s

      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”! ;)


  1. BelrindorBelrindor

    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. :)






  2. Fenyx4

    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.

    1. abovenyquistabovenyquist

      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.



  3. algumacoisaqqalgumacoisaqq

    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.



  4. Bones13Bones13

    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.



  5. SanctimoniaSanctimonia

    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.

    1. dejayc

      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 :)



  6. disastorm

    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?



  7. WombyWomby

    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.


  8. Minakta MoriyaMinakta Moriya

    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?




  9. Fosco

    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.


  10. Midgard TheDragonKingMidgard TheDragonKing

    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 :)


  11. Tipa

    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.


  12. WombyWomby

    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.



    1. Dame LoriDame Lori

      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…

      1. TheLarperTheLarper

        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.


  13. CageCage

    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.


  14. MaeseDude

    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.

    1. abovenyquistabovenyquist

      “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.


  15. Sheltem

    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 :)

    1. Sheltem

      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.


  16. Gracekain

    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.




  17. Fox CunningFox Cunning

    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?

    1. TachysTachys

      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…)


  18. LeondegranceLeondegrance

    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.



  19. PeteWiPeteWi

    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. :)





  20. Sorwen

    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.

    1. TachysTachys

      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.

      1. abovenyquistabovenyquist

        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.


  21. sarabellum

    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?


  22. Taihennami

    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.

    1. slashslash

      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. :)




Leave a Reply