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 Microsoft’s BASIC interpreters in the ’80s and early ’90s.
The best compliment I’ve received so far is from friends who grew up in the same era I did: when I fullscreen the browser, a few of them assumed it was a virtual machine running the real thing.
A QBasic port of the original BASIC-based DONKEY.BAS was one of the first programs I got running in it:
I know someone who might, if we could figure out how to get it off a DOS 5.25" floppy!
I’ve got a fairly large collection of several hundred programs from the early to late ’90s that I’ve been carefully testing A/B testing against period accurate hardware and my simulator but actual professionally used QBASIC-based applications from back with the source intact are hard to come by.
Remember this?
DoEventsI’ve already sunk hundreds of hours into building out the fidelity of QuickBASIC (everything down to emulating memory access so you can simulate realistic PEEKing and POKEing), so I don’t have the sanity points left to tackle any other variants myself, but I’d love to see a GW-BASIC version.
Kind of reminds me of how most people don’t know “Korobeiniki” (Коробейники) by name, they just call it the Tetris song.
"Oh, yes-- I play in the orchestra. I am in the auxiliary percussion and artillery sections."
...Until you found the BASIC dialect that came with MS-DOS, that is! GORILLA.BAS was bundled with DOS and was a fun little game you could play in those computers. It's not like you could access web games on the Internet - there was no Internet!
However QBASIC was likely the first freely available, all‑in‑one "batteries included" environment that came bundled with MS‑DOS 5 with a relatively friendly IDE that had built‑in help for every single command. GORILLA.BAS and NIBBLES.BAS were the gateway drugs for many future programmers.
You could get a PC for a thousand bucks back then, and shareware was a thing in 1990-91. Crystal Caves, Commander Keen, Duke Nukem were huge hits and there were tons of less popular games...not to mention copying commercial games from friends.
In the United States... In a lot of countries, computers cost a lot more than that in the local currency which, together with lower salaries, made computers inaccessible to most people.
I remember seeing people playing GORILLA.BAS in computer stores...
I say presumably because I played their excellent Secret Agent HD port but haven't played Crystal Caves yet.
- https://codepen.io/manz/pen/RmEQgv
He was involved in setting up the radar systems at Pearl Harbor, much good that did.
OSX, Firefox, browser size 3326×2830 pixels. Only happens at or around that particular size - resizing the window fixes the issue.
Never mind how compact, beginner-friendly, and just plain fun they were to use. It's been said countless times but I'll say it again - we've lost something over the years.
I learned to program with BASIC. It was awful. I didn’t know how awful it was until many years later. So I don’t miss the language. But something I miss is how easy it was to learn what your machine was doing.
The DOS boot and config involved only two files: CONFIG.SYS and AUTOEXEC.BAT, that was it. Most programs were self-contained, so you could copy the directory to a floppy disk and run them on another machine. If you broke something, copy the files again and restart; that was it… I “broke” config and programs many times, and it was a good way to learn.
The basics (window, events, renderer) can be done in about 30 lines:
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
static SDL_Window* window;
static SDL_Renderer* renderer;
int main(int argc, char* argv) {
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO|SDL_INIT_GAMEPAD);
SDL_CreateWindowAndRenderer("test", 640, 480, SDL_WINDOW_RESIZABLE, &window, &renderer);
SDL_Event event;
while(true) {
while(SDL_PollEvent(&event) != 0) {
if (event.type == SDL_EVENT_QUIT) {
goto ENDGAME;
}
//events go here
}
// update here
SDL_SetRenderDrawColor(renderer,0,0,0,255);
SDL_RenderClear(renderer);
// render here
SDL_RenderPresent(renderer);
}
ENDGAME:
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
}
I don't think you could get all of donkey.bas done in 131 lines, though. SDL3 does ship with an embedded debug font but that seems like cheating. You probably couldn't replicate the drawing code easily, it would probably need to be faked with images, and you'd need a font atlas for the text.Then port it to UE if they are interested in skill reuse for future projects:
SDL has a lot of issues, and falls into the "only if you must" category. Still better than .NET or Java in many ways, as spacial audio is easy in the mixer. =3
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/> 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
Gorillas.bas (it's more or less like worms, except with only 1 gorilla per team)
On the plus side: it was much prettier.