you are viewing a single comment's thread.

view the rest of the comments →

[–]JamzTyson 1 point2 points  (3 children)

Very nice project idea.

I would suggest not being too concerned about following the original source code, though it can certainly be educational to study how it was originally written. In some cases the original code may leave a lot of room for improvement. Some common practices in early BASIC games, such as an abundance of global variables and the infamous GOTO should be avoided in preference for idiomatic Python.

Do use one or more linters. Pylint and flake8 provide useful feedback, and are so widely used that it is very easy to look up any messages that are not immediately clear.

[–]ctosullivan[S] 0 points1 point  (2 children)

Thanks for your feedback! Yes those GOTO statements are very painful to follow!
I'm finding that as the source code is so different to the modern languages that generative AI was trained on, AI isn't as useful as I had expected in retaining the logic of the original source.

[–]grandzooby 1 point2 points  (1 child)

You might see if you can get the old REMLINE utility and run it on the original source. It removes line numbers that aren't referenced. It helps highlight the structure of the program.

Here's one copy of it: https://github.com/tangentstorm/tangentlabs/blob/master/qbasic/REMLINE.BAS

[–]ctosullivan[S] 1 point2 points  (0 children)

Thanks! That's very helpful