Racing game for the Commodore 64, type-in listing!
Get it here!
So in the olden days, the very first personal computers came with a programming environment built-in. In fact, it was the thing you started in after the computer had fired up.
That sounds like a hassle, and maybe it was because manufacturers started taking these programming environments out and replaced them by operating systems, but it wasn’t that bad.
If you wanted to calculate something, all you had to do was punch in a program to calculate it for you. And if you wanted to play a game, you could copy one from a book or a magazine and play it.
10 rem mega monster racer by venlosoft 12 rem press 1 to go left and 2 to go right 100 x=10 110 weg=5 120 scr=0 300 get c 310 if c=1 then x=x-1 312 if c=2 then x=x+1 320 weg=weg+int(rnd(0)*3)-1 322 if weg<0 then weg=0 324 if weg>20 then weg=20 330 if x<weg then 600 332 if x>weg+10 then 600 400 print tab(weg) "!" tab(x) "v" tab(11+weg) "!" 410 scr=scr+1 500 goto 300 600 print: print "boom!!!" 610 print "you drove" scr "kilometers 612 print "without incident." 620 print "say goodbye to your deductible!"
This is a small racing game. It is based on similar games I have seen. You control your sleek racing car by pressing 1 for left and 2 for right.
I will leave it as an exercise for the reader how to get this program into a Commodore 64 or one of the many available emulators, as explaining that here could make this post of few dozen times larger. I mean, you could always type it in if you felt particularly … historical.
What one used to do once a BASIC program was typed in was save it to disk or cassette, assuming one was lucky enough to own a device that let one do exactly that.
OK, this ‘one’ stuff isn’t working for me.
Once the game is in the C64’s memory, you type ‘run’ to start it.
As you can see in the GIF above, the ‘v’ represents your car, the exclamation points represent the sides of the road and imagination represents your only limit.
The next step would be – and I am not saying I ever did that – change the name of the author, copy the game to a 1,000 cassettes, have a mate design cool covers, go to a computer fair and sell them for 2 bob a piece, as your first steps on the way to becoming a billionaire. By the time players would find out the game was a bit meh, you would be miles away.
You could also add a title screen, a game loop, joystick controls, a high score table and so on.
You could even turn it into flappy bird (assuming gravity is to the side of the screen and not the bottom).
One version I saw even played this on a printer, back when printers were typewriters hooked up to a computer, so that you could see what you were playing.
Porting the game
The game’s BASIC is fairly standard, so you should be able to port it to other BASICs of the time. I imagine that the
tab() commands may work differently on other machines.
Starting up with BASIC
I would like to get back to this for a second. It was a little bit weird to boot into a programming environment back in the day, especially if you never had any interest in programming yourself.
The experience wasn’t too bad, though.
For one thing, all environments were text based in the late 1970s, early 1980s. You weren’t missing out on some sleek user interface that all the cool kids were using. The cool kids also had a command line.
Second, the programming environment tended to double as the operating system, so you had commands to list files, load programs, run programs and so on.
Third, computers of the day started up fast. Like, really fast. Like, blink and you were there. So if you wanted to load an environment better suited to your needs, you did not need to spend much time inside the programming environment.
Finally, the environment doubled as the editor and was therefore, at least in some respects, more powerful than most other command line interfaces of the day. (Although that power was mostly focussed on editing your code.)
And none of that mattered much if you were into programming. Having an expressive and powerful language (meaning: having a programming language that even relative beginners could use to create meaningful software) on start-up turned out to be the gateway drug for a lot of budding programmers.
I’ve searched long for this Basicprogram.
Thanks for that and the good article!