Home

Awesome

What are we doing?

We’re updating the first million selling computer book, BASIC Computer Games, for 2022 and beyond!

Where can we discuss it?

Please see the discussion here for a worklog and conversation around this project.

Project structure

I have moved all the original BASIC source code into a folder for each project in the original book (first volume). Note that Lyle Kopnicky has generously normalized all the code (thanks Lyle!) to run against Vintage Basic circa 2009:

I’ve included all the games here for your tinkering pleasure. I’ve tested and tweaked each one of them to make sure they’ll run with Vintage BASIC, though you may see a few oddities. That’s part of the fun of playing with BASIC: it never works quite the same on two machines. The games will play better if you keep CAPS LOCK on, as they were designed to be used with capital-letter input.

Each project has subfolders corresponding to the languages we’d like to see the games ported to. This is based on the 2022 TIOBE index of top languages that are memory safe and general purpose scripting languages per this post:

  1. C#
  2. Java
  3. JavaScript
  4. Kotlin
  5. Lua
  6. Perl
  7. Python
  8. Ruby
  9. Rust
  10. VB.NET

📢 Note that in March 2022 we removed Pascal / Object Pascal and replaced it with Rust as we couldn’t determine if Pascal is effectively memory safe. We’ve also added Lua, as it made the top 20 in TIOBE (as of 2022) and it is both memory safe and a scripting language. The Pascal ports were moved to the alternate languages folder.

⚠️ Please note that we have decided, as a project, that we do not want any IDE-specific or build-specific files in the repository. Please refrain from committing any files to the repository that only exist to work with a specific IDE or a specific build system.

Alternate Languages

If you wish to port one of the programs to a language not in our list – that is, a language which is either not memory safe, or not a general purpose scripting language, you can do so via the 00_Alternate_Languages folder. Place your port in the appropriate game subfolder, in a subfolder named for the language. Please note that these ports are appreciated, but they will not count toward the donation total at the end of the project.

Project goals

Feel free to begin converting these classic games into the above list of modern, memory safe languages. In fact, courtesy of @mojoaxel, you can even view the JavaScript versions in your web browser at

https://coding-horror.github.io/basic-computer-games/

But first, a few guidelines:

Emulation and Bugfixes

We want the general behavior of the original programs to be preserved, however, we also want to update them, specifically:

Please note that on the back of the Basic Computer Games book it says Microsoft 8K Basic, Rev 4.0 was the version David Ahl used to test, so that is the level of compatibility we are looking for.  QBasic on the DOS emulation is a later version of Basic but one that retains downwards compatibility so far in our testing. To verify behavior, try running the programs in your browser with JS BASIC, effectively Applesoft BASIC.

Have fun!

Thank you for taking part in this project to update a classic programming book – one of the most influential programming books in computing history – for 2022 and beyond!

NOTE: per the official blog post announcement, I will be donating $5 for each contributed program in the 10 agreed upon languages to Girls Who Code.

Current Progress

<details><summary>toggle for game by language table</summary>
Namecsharpjavajavascriptkotlinluaperlpythonrubyrustvbnet
01_Acey_Duceyxxxxxxxxxx
02_Amazingxxxxxxxx
03_Animalxxxxxxxxxx
04_Awarixxxxxxxx
05_Bagelsxxxxxxxxxx
06_Bannerxxxxxxxx
07_Basketballxxxxxxx
08_Batnumxxxxxxxx
09_Battlexxxxxx
10_Blackjackxxxxxxx
11_Bombardmentxxxxxxxx
12_Bombs_Awayxxxxxxx
13_Bouncexxxxxxx
14_Bowlingxxxxxx
15_Boxingxxxxxx
16_Bugxxxxxx
17_Bullfightxxxxxx
18_Bullseyexxxxxxx
19_Bunnyxxxxxxx
20_Buzzwordxxxxxxxxx
21_Calendarxxxxxxxx
22_Changexxxxxxx
23_Checkersxxxxxx
24_Chemistxxxxxxx
25_Chiefxxxxxxxx
26_Chompxxxxxx
27_Civil_Warxxxxx
28_Combatxxxxxx
29_Crapsxxxxxxxxx
30_Cubexxxxxxx
31_Depth_Chargexxxxxxx
32_Diamondxxxxxxxxx
33_Dicexxxxxxxxx
34_Digitsxxxxxx
35_Even_Winsxxxxxx
36_Flip_Flopxxxxxxxx
37_Footballxxxx
38_Fur_Traderxxxxxx
39_Golfxxxx
40_Gomokoxxxxxx
41_Guessxxxxxxxx
42_Gunnerxxxxxx
43_Hammurabixxxxx
44_Hangmanxxxxxxx
45_Helloxxxxxxxx
46_Hexapawnxxx
47_Hi-Loxxxxxxxxx
48_High_IQxxxxx
49_Hockeyxxxx
50_Horseracexxxx
51_Hurklexxxxxxxx
52_Kinemaxxxxxxx
53_Kingxxxxx
54_Letterxxxxxxxx
55_Lifexxxxxxxx
56_Life_for_Twoxxxxxx
57_Literature_Quizxxxxxxx
58_Lovexxxxxxx
59_Lunar_LEM_Rocketxxxxx
60_Mastermindxxxxxxx
61_Math_Dicexxxxxxxx
62_Mugwumpxxxxxxx
63_Namexxxxxxxx
64_Nicomachusxxxxxxx
65_Nimxxxxxx
66_Numberxxxxxxx
67_One_Checkxxxxxx
68_Orbitxxxxxxxx
69_Pizzaxxxxxxx
70_Poetryxxxxxxx
71_Pokerxxxx
72_Queenxxxxxx
73_Reversexxxxxxx
74_Rock_Scissors_Paperxxxxxxxxx
75_Roulettexxxxxxx
76_Russian_Roulettexxxxxxxxx
77_Salvoxxxx
78_Sine_Wavexxxxxxxxx
79_Slalomxxxx
80_Slotsxxxxxxx
81_Splatxxxxxxx
82_Starsxxxxxxxx
83_Stock_Marketxxxxx
84_Super_Star_Trekxxxxxx
85_Synonymxxxxxxx
86_Targetxxxxxx
87_3-D_Plotxxxxxxx
88_3-D_Tic-Tac-Toexxxx
89_Tic-Tac-Toexxxxxxxx
90_Towerxxxxxxx
91_Trainxxxxxxxx
92_Trapxxxxxxxx
93_23_Matchesxxxxxxxx
94_Warxxxxxxxxx
95_Weekdayxxxxxxx
96_Wordxxxxxxxx
</details>