Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Similar background here. The public library had Apple II machines and I became quite enamored with making proto-text adventures in Applesoft BASIC. Because you had to sign-up for time I wrote a lot of my programs longhand on nth generation photocopies of "program template" sheets that they handed out at the library (lined paper with columns for line numbers, statements, comments, etc).

The spaghetti code was astounding, and I remember squeezing line numbers between existing code-- adding a "31 GOTO 40" so I could squeeze a "room" into lines 32-39.

I never did grok the idea of building an "engine". Mostly I had PRINTs, INPUTs, and IF/GOTOs.



One of the most humbling moments in my life was learning from a friend what a object was, and how that differed from GOTO statements. I had already done something similar by inventing abstraction, when I figured out that I could pre-define certain musical notes and then use those defined notes more simply in my BASIC code. I had not, however, made the leap between re-using notes and re-using rooms in a text adventure. That realization that all re-used things can be abstracted was formative, and I am very thankful to my friend for having explained what he was doing with rooms. At some level, I regret that I learned BASIC before an object-oriented language; at another, I'm glad that I did, because my training in stupidity made very obvious to me my shortcoming in logic when I learned a better way.


I'm jealous of your experience. That sounds very cool.

Looking back I wish I'd had a mentor. I think I would have accomplished so much more if I'd had somebody to offer some guidance and gentle direction.


By the time I was a kid, most of the x86 computers I was exposed to were running DOS with the included QBasic IDE so I never had to worry about things like this.

However, we had old stacks of Compute magazine [1] lying around with BASIC source games printed out - and I remember initially being confused as to why all the line numbers were separated by intervals of 10...

[1] https://en.wikipedia.org/wiki/Compute!


>The spaghetti code was astounding, and I remember squeezing line numbers between existing code-- adding a "31 GOTO 40" so I could squeeze a "room" into lines 32-39.

I spent too many nights trying to implement complex text adventures in Commodore 64 Basic and I'm sure that instead of permanently damaging me (at least in the sense that Dijkstra meant) it just made me appreciate more all the abstractions later languages introduced to me.


Love it! It really is a good first program to write as a kid (at least those from a certain generation).

And my memory might be from our Apple 2gs and AppleScript, actually (hence my caveat in the comment). But I’m sure the program was just PRINTs, INPUTs, IFs and GOTOs :)




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

Search: