https://discourse.codinghorror.com/t/updating-101-basic-computer-games-for-2021/7927/ Coding Horror Discussion Updating "101 Basic Computer Games" for 2021 codinghorror January 30, 2021, 8:48pm #1 Here's a topic to capture some thoughts on this potential project. I initially started thinking about it when I discovered this 2010 reboot: # Everything I Needed to Know About Programming I Learned from BASIC blog There was a 40th anniversary edition of Basic Computer Games, which apparently was updated to use Microsoft Small Basic? They even updated the cover heart_eyes [image] Here's an updated classic game from the book: Civil War was written in 1968 by three Students at Lexington High School, Massachusetts: L Cram, L. Goodie, and D. Hibbard. It was modified into a 2-player game by G. Paul and R. Hess of TIES, St. Paul, Minnesota. It was ported to Microsoft Small Basic by BIBLEBYTE BOOKS in 201... But I was really disappointed in the resulting updated code, I feel like an opportunity was missed to demonstrate better coding patterns that have emerged since the 1970s. I don't mean super fancy, complex things, but stuff as simple as, y'know, subroutines? Like James Shore said here https://www.jamesshore.com/v2/blog/2006/quality-with-a-name So I asked on Twitter and got a lot of responses: twitter.com [45d04d702390a21f715d97fabaae475c73950d6c] Jeff Atwood (codinghorror) What if.. we re-built these two books, with the programs rewritten and rearchitected into well written examples of Ruby, Python, JavaScript, and VB.NET versions of each game? And of course we'd "publish" it through a website, with permission? https://t.co/ kAlhnDYDpj [cdd36aa719170a8a6c091f66577566ab6c41c4a3_2_690x458] 10:04 PM - 18 Jan 2021 780 73 I'll update this as I figure out more and carve it into a blog post, possibly? 3 Likes codinghorror January 30, 2021, 8:57pm #2 And YES, I am asking the relevant parties for permission to do this. We aren't going to publish a book or anything but a website, available to all as a learning resource and part of computing history, would be nice! 1 Like codinghorror January 30, 2021, 9:32pm #3 The wikipedia entry on the book is here en.wikipedia.org [ac3212917b37bdb0f4e63805e52324] BASIC Computer Games BASIC Computer Games is a compilation of type-in computer games in the BASIC programming language collected by David H. Ahl. Some of the games were written or modified by Ahl as well. Among its better-known games are Hamurabi and Super Star Trek. Originally published in 1973 as 101 BASIC Computer Games, early versions used the BASIC found on Digital's minicomputers. Ahl purchased the rights to the book and republished it under the new name, later porting them to Microsoft BASIC for the emerging ... and aha, there were two versions of the book! The first version, 101 went into a second printing and eventually sold 10,000 copies. Ahl later noted that "was far more books than there were computers around, so people were buying three, four, five of them for each computer." The second version, BASIC, was re-printed many times and was the first computer book to sell a million copies. Harry McCracken called it "The single most influential book of the BASIC era" I've created a repo while we mull this over [bad] github.com [1522517] coding-horror/basic-computer-games An updated version of the classic "Basic Computer Games" and "More Basic Computer Games" books, with well-written examples in a variety of common programming languages - coding-... 1 Like lskbr January 30, 2021, 11:24pm #4 I contacted Mr. Ahl by email. He said this work is almost in public domain. But of course, proper permission should be granted. 2 Likes AdamDawes575 January 31, 2021, 12:54am #5 I thought I'd make a start by converting the first game, AceyDucey, across to C# (.NET Core 3.1). I personally find this version MUCH easier to read than the original! Feel free to criticise or suggest improvements. I've put the code online here: [c29] GitLab [10f2d759dce6ea753] BasicComputerGames / AceyDucey A C# (.NET Core) conversion of the AceyDucey game from the 1978 book "BASIC Computer Games". Part of codinghorror's Updating "101 Basic Computer Games" for 2021 project. Adam. 2 Likes codinghorror February 10, 2021, 3:54am #6 Thanks @lskbr and @AdamDawes575 - I have updated the github repo with a basic structure - let me know if you have any feedback on structure before we proceed? (I need to write a lot more about guidelines, instructions, goals - mostly we want the gameplay to be completely the same, but with modern coding practices behind the scenes, relative to the language the game is being translated to...) 1 Like lskbr February 10, 2021, 7:45am #7 It looks great. What is the plan? Should we fork the repo for each language? Or add a folder for each language version? I wrote an article to convert an Apple ][ Basic game to Python: Convertendo um jogo escrito em Basic para Python - Parte I :: Nilo Menezes -- Ex-junglecoders (in Portuguese, please use chrome to have it in English, just the code is important for the example). What I did was to add the original basic program at the top of the new version, let it commented out and write the translated version just after. The result is a mix of Basic and Python. For Rust, I wrote a few text console helpers here: [GITHUB] /lskbr/ spacegames And for Python, I have another library for console here: [GITHUB] / lskbr/colorconsole I know Miguel Icaza implemented a super text console library for C#, but I don't have the link. I'm not sure if it is a good fit, as it is probably more like ncurses, changing a lot from the basic programming model, but I may be wrong :smiley: I think we can also write a readme.md for each translation commenting on the challenges on each of them. 2 Likes codinghorror February 12, 2021, 5:15am #8 Here's a nice visual intro of why the book mattered - featuring the actual book! :star_struck: [d8f858bd8aaf40bf4aeaa97c2867c178718c7b68] 1 Like codinghorror February 16, 2021, 4:40am #9 OK cool! I've updated the repo with * better instructions, reduced focus to the first book * as suggested by @lskbr, one subfolder per target language (csharp, java, javascript, python, ruby, vbnet) * added readme.md per subfolder (as Git doesn't support empty folders) * added @AdamDawes575 c# version of Acey Ducey Repo is here: [bad] github.com [1522517] coding-horror/basic-computer-games An updated version of the classic "Basic Computer Games" book, with well-written examples in a variety of common programming languages 2 Likes lmorchard February 16, 2021, 4:21am #10 Just rolling into this thread after seeing mention on Twitter. I grew up with these books and still have my copies, albeit in rough shape. Wouldn't might taking a crack at transliterating a few of them! Probably going to attempt Super Star Trek if no one else gets to it first. I remember trying to convert that over to Star Trek: The Next Generation on a C64. One semi-random thought: It would be very cool if this repo were somehow usable & hackable as a Glitch project for in-browser tinkering. 2 Likes pironomy February 16, 2021, 4:17am #11 I'm looking at converting BOXING over to Python. Since the aim is to teach, I'm wondering if it makes sense to encourage the student to write the programs in a order that makes sense. We don't want to start with some random sub routine, do we? For instance, a Python port would start with a "if name == 'main':" block calling "play()". The play function would then iteratively be filled in along with any other supporting functions and data structures. This would be in contrast to a BASIC program which is almost obligated to be written linearly (I'm looking at you line numbers). I bring this up, because I feel like capturing the spirit of the original material implies we consider how the student is to learn from typing these programs. It'd be a bit more like a Bob Ross painting than a dot matrix print out. 2 Likes codinghorror February 16, 2021, 4:41am #12 # pironomy: I feel like capturing the spirit of the original material implies we consider how the student is to learn from typing these programs Hmm, good points raised - I think we can safely assume these won't be typed in, so I'd generally favor clean programming practices (commenting, subroutines, simplicity, taking advantage of built in language features) over everything else. 1 Like AdamDawes575 February 16, 2021, 7:45am #13 Looking good! This should be interesting. Have you considered a way of allowing people to "register" for implementing a project in a particular language? Just to avoid duplication of effort. I think I'll need to make some revisions to C# Acey Ducey in order to follow the Stay true to the original program guideline - I added some features, and on reflection the coloured console text may look pretty in execution, but adds unnecessary complexity to the code. 2 Likes ptdecker February 16, 2021, 3:12pm #14 I will try to contribute game versions in Go 2 Likes EricLippert February 16, 2021, 5:33pm #15 Looks great! Thanks for putting this together. Since I have just recently finished a massive blog series on Life, I'll start with a C# implementation of #55. 2 Likes codinghorror February 16, 2021, 10:40pm #16 # AdamDawes575: Have you considered a way of allowing people to "register" for implementing a project in a particular language? Just to avoid duplication of effort. Yeah I hadn't actually considered that - but I have mixed feelings about letting people "sign up" as they might sign up, and not progress at all, or sign up for too many things over enthusiastically, and block others from progressing... So I'm leaning toward the status quo at the moment. Stubs aren't really desirable. If you have something finished, check it in! At the very least, I can assure you no work will be lost - we can have multiple implementations in each language. 1 Like pironomy February 18, 2021, 1:04am #17 Fair enough. With respect to commenting, do we want comments to refer to the translation effort or more specifically on the modern implementation? For example, I would imagine this would create a lot of comments about 0 vs 1 indexing of arrays or how conditions differ in a more structured language vs BASIC. Just want to get an idea of what is expected. 2 Likes codinghorror February 19, 2021, 6:42pm #18 # pironomy: do we want comments to refer to the translation effort or more specifically on the modern implementation? I think both! One example: I believe the examples should be extended to work with uppercase and lowercase. 1 Like pironomy February 21, 2021, 3:10am #19 Agreed. We need to be flexible with inputs. "Yes", "yes" "YES" should all be equivalent inputs. However, I would like to posit that all outputted characters should remain exclusively in caps, cause IT LOOKS ENDEARING. Okay, in the context of the end of that last paragraph it looks like shouting, but in the console it looks endearing. :slight_smile: 2 Likes pironomy February 21, 2021, 3:28am #20 Does the use of modern language features in the place of some more round about code (e.g. The BASIC version Hangman uses an INT array to mark whether a letter has been used yet, while Python can do the same by adding letters to a set) extend to algorithms affecting behavior? I ask this, because the AI code for TicTacToe2 depends quite heavily on the non-structured GOTO (I can almost hear Dijkstra now) and translation is quite challenging. I believe I have a workable strategy, but wanted to know if replicating behavior perfectly is a requirement or if we slip in a different algorithm that does the same job (an analogue to array iteration vs set key lookup). I say this as my translation is quite convoluted. Alternatively, a successful translation may serve as an illustration of how stark the programming styles can be. Chuckles I think I'd have an easier time translating this particular one to NES. 2 Likes next page - * Home * Categories * FAQ/Guidelines * Terms of Service * Privacy Policy Powered by Discourse, best viewed with JavaScript enabled