HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
coding-horror
basic-computer-games
C#2021–2026
coding-horror / basic-computer-games

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/

11Distinct people
14Mentions
0Explicit recommenders
11.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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/

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year14 dated mentions

Observed mentions: 2021-02-19 01:25:43 UTC to 2026-06-21 13:29:46 UTC.

0123452021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC211
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC514
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC303
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

14 sources
This is exactly that. % git clone https://github.com/coding-horror/basic-computer-games.git Cloning into 'basic-computer-games'... remote: Enumerating objects: 23002, done. remote: Counting objects: 100% (1191/1191), done. remote: Compressing objects: 100% (542/542), done. remote: Total 23002 (delta 645), reused 1083 (delta 633), pack-reused 21811 Receiving objects: 100% (23002/23002), 76.04 MiB | 5.75 MiB/s, done. Resolving deltas: 100% (11501/11501), done. % cd basic-computer-games then open "index.html" in your browser. This lets you browse the games and play them. Or, for a web server experience, in that directory: % python -m http.server then go to http://localhost:8000/ .
In “BASIC Computer Games” code in modern languages
My example was "twice by one developer", not "twice across all indexed repos." A spot check shows that quite a few in your link are used specifically to ensure correct handling of Rust multi-level breaks work syntax, like https://github.com/rust-lang/rust-analyzer/blob/master/crate... , https://github.com/rust-lang/rustfmt/blob/master/tests/sourc... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... and likely more. Another is a translation of BASIC code to Rust, using break as a form of goto. https://github.com/coding-horror/basic-computer-games/blob/e... . The Python version at https://github.com/coding-horror/basic-computer-games/blob/e... doesn't use that approach. The example at https://github.com/tokio-rs/mio/blob/master/tests/tcp.rs is a nice one /
Read the rest
/ Wait for our TCP stream to connect 'outer: loop { poll.poll(&mut events, None).unwrap(); for event in events.iter() { if event.token() == Token(1) && event.is_writable() { break 'outer; } } } though it can be replaced with a helper-function (note: I don't fully know what the code is doing, but the following looks right): def find_writable_event(events): for event in events: if event.token() == Token(1) and event.is_writable(): return True while 1: poll.poll(events, None) if find_writable_event(events): break So while there's likely a good real-world example of something which can't easily be re-written in an alternative form for Python, simply pointing to a grep result isn't all that persuasive.
In Python multi-level break and continue
Definitely recommend MIT's Scratch, it's the closest thing (in terms of "they don't even know they're coding!") to Hypercard out there, tons of games and community examples, my kids make animated movies with it. There's a board game Robot Turtles based on the Logo version where you provide instructions via a stack of cards to navigate your turtle through a maze. The game is scored like golf, fewer cards are better, and it includes looping cards. Definitely designed more for elementary students but it's visual, intuitive, and you (as parent) can "design" the maze. There are several similar video games (they are simple and cute enough to paper their very dry subject matter, and they are level/puzzle based so easy to dole out in manageable amounts of enthusiasm ) Lightbot Human Resource Machine 7 Billion Humans Also my kids and I whiteboarde
Read the rest
d out and then coded a few of the games from https://github.com/coding-horror/basic-computer-games It was fun acting as the game designer who wanted this feature or that!
In Citizen developers are rapidly becoming the vanguard of corporate digitisation
I've been thinking about BASIC a lot, as I've been looking for "the easiest programming language for a non-programmer to learn". I'm not exactly sure that rewriting these in Python/Ruby/JS/VB.NET using "better coding patterns", because a lot of the things programmers take for granted are really tough for complete newcomers. Examples: - I remember when I started, using BlitzBasic, I had a really hard time understanding the concept of arrays. - A friend of mine, when showing him the statement 'x = x + 1' was confused; surely, x cannot also equal x+1. - When teaching Python, the concept of function parameters and variable scope is always a struggle. To some degree, having spaghetti code and all globals is useful for teaching because it 1) gets people excited to program and see something working and 2) demonstrates why you don't want to do t
Read the rest
hose things. I remember when trying to write my first text based CYOA game, I was so excited to add content to it and see it on screen, but also learned very quickly that having to scroll through 20 pages of if statements was not fun, and why functions would help. I'm not sure if someone explaining "encapsulation" to me would have really taken root. I think there should be a rewrite of the book, for modern languages and development environments, but keep the complexity extremely low, like 70's BASIC was intended. EDIT: Just looked at https://github.com/coding-horror/basic-computer-games/blob/m... , it actually looks like a pretty good blend of original but with mild improvements.
In Updating “101 Basic Computer Games” for 2021

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.