Tuesday, 26 July 2022

Larry Bethurum's 1966 "Bingo"


I have ported a very early BASIC game program from a Dartmouth-style BASIC to Micro Color BASIC for the TRS-80 MC-10. The source code I worked from required a fair amount of debugging to make sure that the game operated properly.  Although the game is noted in the Wikipedia discussion of the early history for video games, it was very difficult to find source code for it using Google.  Simple searches using the author's name and the game title didn't produce any links to source but only details like those mentioned in Wikipedia, such as:
Larry Bethurum, from the Phillips Exter Academy, submitted the BASIC source code of a bingo game to the DECUS user group. Comments in the code suggest the game was written on January 23, 1966 [gamicus.fandom.com/wiki/1966_in_video_gaming]
It was only when I returned to the mention in Wikipedia that I was able to chase down a reference link to the source code preserved on a Net archive site: http://pdp-10.trailing-edge.com/decuslib10-01/01/43,50110/bingo.gam.html

There were some major bugs in the source that would have prevented proper operation of the game:

1580 REM  THIS IS THE SLANT CHECK (M=-1) FOR BINGO*** 
1590 X=F
1600 Y=F
1610 IF B(X,Y)<>0 THEN 1740:REM FIXED ERROR-- CHANGED TO 1740 FROM 1720
1620 X=X+1
1630 Y=Y+1
1640 IF Y<F+5 THEN 1610
1650 IF Y=11 THEN 1700
1660 PRINT"YOU'VE GOT A   B I N G O * * *"
1670 W=1:WW=WW+1
1690 RETURN
1700 PRINT"I'VE GOT A   B I N G O * * * *"
1710 V=1:VV=VV+1
1720 RETURN

1730 REM  THIS IS THE SLANT CHECK (M=1) FOR BINGO***
1740 X=F+4
1750 Y=F
REM 1750 LET Y=X (THIS SEEMS TO BE AN ERROR)
1760 IF B(X,Y)<>0 THEN 1880
1770 X=X-1
1780 Y=Y+1
1790 IF Y<F+5 THEN 1760
1800 IF Y=11 THEN 1850
1810 PRINT"YOU'VE GOT A   B I N G O * * *"
1830 W=1:WW=WW+1
1840 RETURN
1850 PRINT"I'VE GOT A   B I N G O * * * *"
1870 V=1:VV=VV+1
1880 RETURN

The highlighted errors would prevent the program from jumping to the "slant check" for Bingo (bottom left to top right corner) at line 1740. And the error within that routine of assigning Y=X would have then prevented that routine from operating correctly even if it was jumped to.  Also, the search routines for the other directions used many jumps from out of uncompleted FOR/NEXT loops, which might not have caused problems on the original platform (some kind of DEC minicomputer) and BASIC, but put the Micro Color BASIC on the MC-10 into conniptions.  So I also had to change all those search routines so that proper exits from those FOR/NEXT loops occurred.

When the player chose to "play again" the program returned to a point at the beginning which involved re-DIMing already dimensioned arrays, which causes an error in Micro Color BASIC.  It also did not not zero certain variables like the win checks for each player stored in V and W or RESTORE the READ pointer for re-reading data. The original version of BASIC might have done this automatically, perhaps when re-dimensioning occurred, but in Micro Color BASIC, the process of re-starting had to be fixed to prevent these problems.  

It is possible that some of these bugs may have prevented users from having a particularly happy experience with the program, which might explain why there is so little record of the game on the Net today.  Or these might just have been bugs that entered into the program in the course of someone typing it in from the DECUS newsletter in which it was originally published.

The game was originally written for a system that would have printed its results on paper.  The program makes reference to "Dartmouth" as the location from which the program is being run which seems a reference to Dartmouth College, the original home of BASIC.  So it seems likely that the program was originally meant to be run on a Dartmouth BASIC time-share system using a printer as the primary output device. This would have prevented anything in the way of dynamic interaction between the user and the program. In effect, the program simply runs a virtual game of Bingo, which the user was encouraged to follow along with using "a pencil" and the printout of the two cards (the user's and the computer's).  The user is told to mark both their own and the program's card. Then the program would declare (and print) the winner at the end. So in the course of my debugging I decided to add some new options to increase the challenge of the game in keeping with its new 8-bit home computer environment.

I added MC-10 graphics around the bingo cards.  I added a display of the numbers on the cards being marked in reverse video.  Then I decided to add an arcade element.  The user must spot and "mark" the numbers of their own card under the constraint of a time limit. This was meant to recreate the tension of real Bingo players trying to keep track of all their cards and marking them with their dabbers as the numbers are called.  I added a very minor ability for the computer to also occasionally "miss" marking the number being called when in this mode.  I added a report at the end of the game of how many games the player wins and how many the computer wins.  Finally, I added a game level element which simply adjusts the speed of the delay for the player to hit the row number (1-5) of the number on their card for the number being called.  If they mess up and hit a wrong number, they fail to mark the number on their card.  The level also effects the degree of possibility that the computer will miss marking a number on its card.  However, if the user selects "no" to the "prompt mode" at program start-up the game will play like the original program.

The source for my version of the program can be found here:

https://github.com/jggames/trs80mc10/tree/master/quicktype/Casino/Bingo

The game can be played on GameJolt. Choose "Play Game" then the "Classic 8-bit BASIC game" menu option.  Select "BINGO" from the cassette menu and then type RUN.

https://gamejolt.com/games/jgmc-10games/339292

No comments:

Post a Comment