Live data from Hacker News

Donkey.bas is 45 Years Old – 131 line of Glory

donkeybas.com

21–30 of 153 posts

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#22
post #12

Brings back memories of GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

I was more of a Nibbles[0] person. I played it with other people on my XT-class laptop in high school.

[0] https://en.wikipedia.org/wiki/Nibbles_(video_game)

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#24
post #19
post #12

Brings back memories of GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

For those who don't know why GORILLA.BAS is so cool... Back in the day, computers were expensive and games weren't readily available. Sometimes a parent would buy a computer for word processing or spreadsheets or take kids to the office which also had business computers. Children were curious about the computers but there wasn't really anything fun to do with them besides banging on the keyboard... ...Until you found…

It was also a very educational experience to start messing with the code until you broke it - forcing you to figure out how to fix it, to get your game back.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#25
post #7

Nice job. The sound effects are a bit too advanced because early IBM computers shipped with pretty simple, magnetically driven dynamic speakers. On a related note, I’ve actually spent the last four months working on a 100% faithful adaptation of both QBasic and QuickBasic 4.5 that runs entirely in the browser on a virtual CPU and hardware abstraction layer. It’s a love letter to everyone who learned to program on Mic…

aw neat I'd love to try doing this for its predecessor GWBASIC (my first programming language on the Tandy 1000EX)

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#26
post #12

Brings back memories of GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

I was more of a Nibbles[0] person. I played it with other people on my XT-class laptop in high school. [0] https://en.wikipedia.org/wiki/Nibbles_(video_game)

I’ve got the music in my head just from seeing it written down. And the sound effect from gorrilla.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#27
post #10

It says something about what a thoughtful development environment these early BASICs were, that you could make a full simple little game like this in only 131 lines even though they're ostensibly far less powerful than modern languages. I'm not sure if you could even get an SDL window open and game loop running in 131 lines of (non-golfed) C. Never mind how compact, beginner-friendly, and just plain fun they were to…

Python is the modern Basic replacement, and also has similar fundamental design trade-offs. VB6 was the peak of the OLE/Multimedia paradigm, and was functionally replaced by the web browser script sandbox.

> we've lost something over the years.

Indeed, Information Appliances were never general-purpose computers. Some people used to care about that sort of thing, and left civilization the GNU compilers as one of the most important intellectual artifacts of our generation. =3

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#28
This is what got me into programming. When I was a kid, I had a shitty 386 because my father got a computer second hand from a friend (we were poor). I was playing the game and then pressed a key and it took me to the basic editor. I was confused with what I saw and started changing things. I changed a number and the size of the explosion on the banana got bigger. My best friend at the time went to computer camp and explained to me that it was code. 30 years later I'm still programming.

Re: Donkey.bas is 45 Years Old – 131 line of Glory

#29
post #10

It says something about what a thoughtful development environment these early BASICs were, that you could make a full simple little game like this in only 131 lines even though they're ostensibly far less powerful than modern languages. I'm not sure if you could even get an SDL window open and game loop running in 131 lines of (non-golfed) C. Never mind how compact, beginner-friendly, and just plain fun they were to…

It was really cool! The ease of getting started was definitely one of the selling points for the “home computers” of that era (GW-BASIC ran on IBM compatible PCs instead, but the appeal of BASIC was the same). Brevity was an important feature since a lot of people obtained programs by typing them over from a magazine or recording them from the radio. And of course, there was no such thing as auto-complete (let alone AI generation).

That being said, SDL isn't actually that bad either. A minimal example is about 40 lines of code [1], not counting comments and blank lines, but including lines with just a curly brace which you could easily remove if you were concerned about size. A slightly more serious implementation of Snake runs about 345 lines of code [2].

And to be fair, DONKEY.BAS is also cheating slightly on the line metric by stuffing lines full of statements, like for example:

    A$=INKEY$:IF A$=CHR$(27) THEN 1298 ELSE POKE 106,0:IF LEN(A$)>0 THEN LINE (CX,CY)-(CX+28,CY+44),0,BF:CX=252-CX:PUT (CX,CY),CAR%,PRESET:SOUND 200,1

1. https://examples.libsdl.org/SDL3/renderer/01-clear/ 2. https://examples.libsdl.org/SDL3/demo/01-snake/
Post reply on HN