explaingit

coding-horror/basic-computer-games

11,060C#Audience · developerComplexity · 2/5Setup · easy

TLDR

A community effort to translate all games from the 1970s book 'BASIC Computer Games' into 10 modern languages, Python, JavaScript, Java, Rust, C#, and more, staying faithful to the originals.

Mindmap

mindmap
  root((basic-computer-games))
    Origin
      1970s BASIC book
      David Ahl
      1M copies sold
    Languages
      Python and JavaScript
      Java and Kotlin
      Rust and C#
    Games included
      Blackjack
      Basketball
      Animal guessing
    How to use
      Play in browser
      Study cross-language
      Contribute a port
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study how classic algorithms like Blackjack or a guessing game are implemented across 10 different programming languages.

USE CASE 2

Practice a new programming language by implementing one of the 96 games and comparing it to the reference port.

USE CASE 3

Play the original 1970s BASIC games in a browser using the included JavaScript-based BASIC emulator.

Tech stack

C#JavaJavaScriptPythonKotlinLuaPerlRuby

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

"BASIC Computer Games" was a programming book published in the 1970s by David Ahl. It sold over a million copies and introduced a generation of people to writing their own software. The book contained dozens of simple text-based games written in BASIC, an early programming language that ran on home computers of the era: games like Blackjack, Basketball, Animal (a guessing game), and Acey Ducey. This project is a community effort to translate all of those original games into 10 modern programming languages: C#, Java, JavaScript, Kotlin, Lua, Perl, Python, Ruby, Rust, and VB.NET. The repository organizes each game into its own folder, with subfolders for each language. The original BASIC source code is also included for reference, and the games can be played in a web browser using a JavaScript-based BASIC emulator. The guidelines for contributing emphasize staying faithful to the original programs: the same prompts, the same behavior, the same flow, just written in a modern language with modern conventions. Contributors are encouraged to use comments explaining what the code is doing, support both uppercase and lowercase input, and avoid adding new features that were not in the original. The project was started by Jeff Atwood, co-founder of Stack Overflow and author of the Coding Horror blog. He committed to donating $5 to Girls Who Code for every game ported in all 10 approved languages. The progress table in the README tracks which games have been completed in which languages.

Copy-paste prompts

Prompt 1
Show me the Python port of Blackjack from basic-computer-games and walk me through the game loop logic step by step.
Prompt 2
I am learning Rust. Take the Acey Ducey card game from basic-computer-games and explain the idiomatic Rust patterns used.
Prompt 3
Help me write a new port of the Basketball game from basic-computer-games in Go, following the contribution guidelines in the repo.
Prompt 4
Compare the JavaScript and Python implementations of the Animal guessing game from basic-computer-games and explain the key structural differences.
Open on GitHub → Explain another repo

← coding-horror on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.