basic-computer-games
An updated version of the classic "Basic Computer Games" book, with well-written examples in a variety of common MEMORY SAFE, SCRIPTING programming languages. See https://coding-horror.github.io/basic-computer-games/
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.
"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.
Where it fits
- Study how classic algorithms like Blackjack or a guessing game are implemented across 10 different programming languages.
- Practice a new programming language by implementing one of the 96 games and comparing it to the reference port.
- Play the original 1970s BASIC games in a browser using the included JavaScript-based BASIC emulator.