Updating "101 Basic Computer Games" for 2022 and beyond

I would like to contribute (VB.NET and C#).

Would it be a good idea to standardize the .NET ports as follows:

  • .NET 6 (with nullable enabled, although that probably won’t matter)
  • .sln and .csproj/.vbproj in the same subfolder
  • Top-level statements and/or file-level namespaces (preserving some of the procedural flavor of the original programs)
  • Writing multiline strings directly to the console in a single call (instead of multiple Console.WriteLine)

Could the repo have some way to generate such templates, either to be run once, adding this skeleton for all the ports at once; or per port, as someone is ready to begin a port?

More generally, are there other skeleton bits that could be added for each port in other languages? Are there similar standardizations for ports in other languages: e.g. a specific version of ECMAScript, or specific Python language version?

2 Likes

Definitely! Feel free to add that skeleton to all the csharp and vbnet folders!

1 Like

If I did that there would be no simple/automatic way to determine if there wasn’t a given port in C# or VB.NET, via this script – Add script to find missing implementations by joshgrib · Pull Request #372 · coding-horror/basic-computer-games · GitHub – without some fancy heuristics.

Not having such an automated script would mean maintaining a list of complete/incomplete ports.

1 Like

By interesting coincidence, last year I converted a game I found in a very early Creative Computing, “Deep Space,” from BASIC to Python.

I played the game on a teletype equipped “mini computer” at my cousin’s school in the mid 70s. When I got an iBM PC in 1983, I typed in the BASIC listing (from “The Best of Creative Computing”), fancied up the interface a little, and got it running.

Amazingly, I still had the BASIC listing after all these years. Over the course of a couple of weeks I successfully ported it to Python.

If this is of interest, I’ll post it on the Github space.

I really loved those old CC games!

2 Likes

These two books have a number of game listings; I suspect most if not all were duplicated in the 101 Basic Computer Games books.

Volume I:

best_of_cc_1

Volume II:

best_of_cc_2
In addition to listings, and articles about computers in education that are of historical interest, there are some oddities, like Trots & Bonnie cartoons, and CC advertisements draw by R. Crumb.

2 Likes

Yes! I have both of those books, and got David Ahl to sign them too. I didn’t include in the blog post since it was mostly about the later compilations:

The idea was the BASIC books collected the “greatest hits” of game listings published in Creative Computing originally.

1 Like

this is an awesome project! is there anything left to be done? I was looking through the github repo and all the games I looked at seemed to have be done in all the languages already.

2 Likes

No definitely not. Tons are not done yet! Check the folders closely…

1 Like

It seems a bit arbitrary to eliminate Go based on being able to do something this obscure to break memory safety. I mean, if you try hard enough you can break memory safety in Java too, and null pointer dereferencing exceptions are endemic to the language, one of the things Kotlin tries to fix.

Not arguing for Kotlin, or even for Go, just saying that it seems perverse to exclude Go but include Java.

(FWIW I have about 7 years of experience with Go, and 20 with Java.)

3 Likes

The question in my first post might have been hidden in plain sight: Would the Deep Space port I made be appropriate to post here? It wasn’t in 101 Basic Computer Games, but since it was published in Creative Computing I thought it might be of interest.

I might have Wumpus II typed in as well, and could have a go at a Python port.

2 Likes

Well, it looks like we need to exclude Pascal for the same reason so if enough of us can really agree that Go is properly memory safe, I am happy to revisit that decision … we need another language to replace it with, I want to keep the count at 8!

@stefanj We are focusing on the first 101 games to start, to keep things manageable, but eventually we want to do both books!

2 Likes

I’m going to guess that the programs shouldn’t have any dependencies beyond the appropriate language’s standard library?

e.g. no ncurses

2 Likes

Yeah, I think a minimum of dependencies is in the spirit of the original books and programs?

1 Like

The memory-safe requirement is particularly funny because BASIC itself allowed you to read and write arbitrary values from/to any memory location with zero protections! (POKE)

3 Likes

Well, I guess that’s true… but I always thought of BASIC as a scripting language first and foremost:

1 Like

Has anyone created a table or a spreadsheet that tracks which games are already rewritten in which languages? Some of the more popular languages are mostly complete. In my rather small sample set I was seeing about one in six or seven are still available in some languages. I know we don’t want anyone calling dibs, but I’d like to see at a glance which ones are yet to be done instead of having to look through every one of the game folders.
If nobody has done this yet I may add it to the readme, assuming nobody objects.

2 Likes

Good idea! Someone kindly contributed a program that iterates through and lists all incomplete games, I think in both Python and C#… they are in the utilities folder:

https://github.com/coding-horror/basic-computer-games/tree/main/00_Utilities

1 Like

Can anyone recommend a good syntax highlighter for VS Code for the original BASIC source?

2 Likes

Can there be a top-level .gitignore file to prevent the usual suspects from being added accidentally? (e.g. Java .class files, IntelliJ project files, etc.)

1 Like

Sounds good to me, feel free to send through a PR!

1 Like