Hacker News new | past | comments | ask | show | jobs | submit login
Richard Garriott’s D&D #1 Contest (shroudoftheavatar.com)
42 points by nkurz on April 20, 2014 | hide | past | favorite | 24 comments

Contest terms include:

    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

Nothing like high-grade lawyer paranoia to sour all the fun for things like this.

Since it sounds like they are going to put this game in their real game as a mini-game, I can understand the strictness here. It would be lame if this was a free form hackathon, but really it is just a porting contest for producing an easter egg to put in their real game. It would be pretty strange legally to have someone else owning a game in their game.

It would not be even a tiny bit strange. Games almost always ship full of code that belongs to other people. Think about middleware (e.g. Bink codecs).

The obvious thing to do is that you're only eligible for the contest if you grant the contest-holders appropriate (non-exclusive) rights.

Why not just allow it to be open source.

There's a straightforward way around that: write a PDP11 interpreter, and have the copyright only apply to the Garriott's original code.

And don't forget the all-important

    © 1974 Tactical Studies Rules
... while you're at it.

Is it just me, or does this game strongly appear to be a roguelike that was written three years or so prior to Rogue?

Update: Also, I'm no longer familiar with any BASIC dialect, and I've never been familiar with any that ran on a PDP-11, but am I mistaken in thinking these two lines

  00210 FILE #1="DNG1"
  00220 FILE #2="DNG2",#3="DNG3",#4="DNG4",#5="DNG5",#6="DNG6"
reference other files, which judging by their names might contain dungeon definitions required for the game to work?

If so, I have to think this is going to be a short contest with a most disappointing result.

Somewhat roguelike, but since it was played on a teletype, you have a separate "look around" command that prints out a section of the map (line 06390). The undocumented command 10 (line 10730) prints the whole map, and another undocumented command 12 (line 11000) invokes a simple map editor.

The dungeon files contain just 25*25 numbers, and looking at line 02370 onwards their meanings are: 0 for empty space, 1 for wall, 2 for trap, 3 for secret door, 4 for door, 5 for monster, 6 for gold, 7 and 8 perhaps mushrooms (they increase your HP or CON by 1, then randomly choose whether to poison you; they are randomly scattered when reading the dungeon file on line 01445 onward).

I'm sure they were just ASCII text files or something else whose structure should be equally obvious from looking at the code.

    |        |       |
    +----+   |       |
         |   |       .
         .   .       .
         .   .       .
... etc.

Very little is obvious from looking at that code. I'm sure nonetheless that someone can and will deduce the format and produce workable dungeon files, but whether they have any resemblance to the originals is something only Richard Garriott, if anyone, can answer, which at best severely complicates the "faithful recreation" rule of the contest.

This was not a style that originated with Rogue necessarily.

Star Trek was written in 1971 and looks pretty similar as well. http://en.wikipedia.org/wiki/Star_Trek_(text_game)

Yeah without those dungeon files this is kind of pointless to try recreating.

There are plenty of people on HN who are good programmers / coders [1] and who will never have seen BASIC before.

I am really curious to know what they think of this source code. Is it readable and understandable without access to any kind of BASIC manual? Or are you making use of as much online documentation as you can to grok it?

BASIC isn't that ancient and should be familiar to anyone who has experience with C. Scanning the code here I don't think there's a lot of insight to be gleaned by studying it in depth. There really aren't any comments and program flow jumps around with GOTO frequently (there are no functions to call) so it's hard to tell what's going on without studying each line. Variable names are very short (1 to 2 characters) and don't tell you a lot about what's going on. If you really want to understand what the code is doing, you're probably going to need to spend a few hours going through it line by line and annotating in the margins where each 'function' is and what each variable means. Once you've done that it's probably best to just rewrite it in C using functions, etc.

I'd be tempted to just write a quick and dirty interpreter for the BASIC dialect in question. I could almost certainly do that more quickly than I could port that code to C.

I'm really hoping there's at least one submission which consists of a BBC BASIC interpreter written in C and compiled via asm.js into Javascript, thus satisfying the contest's requirements regarding platforms, and which executes the original BASIC code.

(What I'd really like to see is a PDP-11 emulator written in C and compiled via asm.js, &c., &c., but I doubt anyone seriously pursuing the contest will be quite that insane.)

Sure. You should know what a for loop is and recognize it. LET X = X + 1 should immediately tell you how they assign values to variables. GOTO 01410 should be obvious that it's going to that line. Math and comparison operators are the same as most languages. 00001 REM (C) 1977-2014 RICHARD GARRIOTT should immediately show that REM is some kind of code comment unless you're insane enough to think the language is going to execute a copyright statement that's preceded by a mysterious 'REM'. READ in a 1 to 7 loop seems to correspond to the dnd stat attributes in the DATA statement above it. Then there's another READ, with 2 variables, in a loop from 1 to 15, which seems to correspond to the 30 other variables in the previous data statement. etc. I have seen BASIC before, though.

The source code is a PDF of old printouts... I am having trouble getting OCR to work.

Anyone know where to find the text?

https://gist.github.com/daeken/11123897 I pulled it out of an OCR'd PDF that someone linked from the forums.

There's a missing newline on line 00590: https://gist.github.com/PiPeep/11126853/revisions

This looks far more readable. I'll add this URL to my comment in the other post.

The thread has some links to slightly different versions.

This claims to have copy and pastable text.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact