Micros With The Handicapped
Susan Semancik and C. Marshall Curtis The Delmarva Computer Club Wallops Island, VA
This VIC game demonstrates how the motor-impaired can communicate in several ways with a computer – using only the button on a joystick. There are also suggestions on adapting the game for the blind, to other computers, and for use with other kinds of input devices.
Many kinds of computer entertainment require keyboard interaction or other motor coordination that can be difficult and even impossible for motor-impaired individuals. This month we'll digress from our series on developing a daily communications program to explore how a game program can be modified to accept alternative input devices in order to allow the motor-impaired to interact with it.
In this "Color Master" game, the computer randomly fills a four-block pattern, choosing from seven colors, with repeats possible. The user tries to duplicate the hidden color pattern within ten guesses. The user's guesses are usually given by typing a letter or number for each color in the guess. To make this game more accessible to the motor-impaired, a menu of choices the user can make will be presented on the computer's screen, with a moving vertical arrow indicating the current menu choice which will be made if an input device is activated.
Figure 1 shows a typical layout for this game on the VIC computer's screen. The blocks for the user's ten possible guesses appear in the middle of the screen and are initially set to all white. A horizontal arrow will point to the current guess on which the user is working. The menu of choices appears at the bottom of the screen and includes blocks in each of the seven possible colors, movement left or right within the four blocks of the current guess, speeding up (+) or slowing down (-) of the menu's arrow, and requesting the computer to score the user's current guess. An advantage of a menu-driven game is that no written directions are needed to see what options are available during the game, since the choices are always visible in the menu.
The computer will score a guess in two ways, which are described at the top of the screen. Under the P-score, the computer will tell how many of the colors in the user's guess are correct colors in the right positions. The C-score will tell how many other colors are correct, but in the wrong positions. When the two scores add up to four, the user will have identified all of the colors in the hidden pattern. If the P-score is exactly four, then their positions are correct as well, and the game ends. Each time a P-score occurs, a whistle sound will be heard as an audible reward.
When the game is over, at the top of the screen will appear a score, which is inversely related to the number of guesses used to successfully duplicate the hidden pattern. The score ranges from a low score of zero, if not guessed within ten tries, to a top score of ten, if guessed in one try. The user's best score is also recorded at the top of the screen.
When the program is run, a horizontal arrow will point to the first row of white blocks which the user will be filling with his/her first guess. The first block of this row will be flashing to indicate that the user's response will be with respect to this block. A moving vertical arrow will point in turn to each of the possible responses the user can make from the menu. Program 1 assumes a joystick is attached to the VIC, and that the user will push the joystick button to indicate a response.
The program can be changed to permit the use of other means of input that may be more suitable to the needs of a particular handicap. Even sounds could be used in place of the colors so that a blind person could also participate, though fewer choices and a review option might be needed in this case as well. Lines 1040, 1080, and 241 need to be changed so that any activity on the joystick will indicate a user's response. (However, joystick movement to the right will not be picked up by this routine. Change the = 158 in lines 1040 and 1080 to <> 190, and change line 241 to = 190 instead of <> 158.) To change it so that any activity on a device attached to the user port will indicate a user's response, change the 37139 in line 9 to 37138. Also change the = 158 in lines 1040 and 1080 to <>255, and the <>158 in line 241 becomes = 255. Table 1 contains a description of the program's variables so that the program's logic will be easier to follow.
Try converting some of your favorite games to a menu-driven approach for alternative input. In future columns, the rest or our series on developing a communications program will provide additional techniques in this area.
The Delmarva Computer Club
P.O. Box 36
Wallops Island, VA 23337
Table 1.
Line 4 | DE controls the time delay for the arrow moving through the menu. Note: After a selection is made, the arrow pauses again at that selection, thereby allowing immediate multiple selections of a menu item. |
Line 5 | C() contains the color codes for the menu blocks. |
Lines 9, 10 | VI, V2, and PL control spacing and positioning within the menu for the vertical arrow. |
Line 20 | Draws ten rows, each with four white blocks. |
Line 22 | H() contains the computer's hidden color pattern. |
Lines 24,26 | Print the menu. |
Line 30 | At the start of the game, a horizontal arrow points at the first row of white blocks. L contains the screen line for the current guess row of blocks. |
Line 40 | P indicates which block in the current guess row will flash. G() contains the user's guess, which is preset to all white. |
Line 50 | B contains the color map location for the screen location of the flashing block; S is the screen location of the flashing block. |
Line 75 | Looks for a SCORE response. |
Line 80 | On a LEFT response, moves the flashing to the next block on the left in the current guess row, as long as it isn't already the leftmost block. |
Line 90 | On a RIGHT response, moves the flashing to the next block on the right in the current guess row, as long as it isn't already the rightmost one. |
Lines 100–110 | Set the flashing block in the current guess row to the selected color. |
Line 120 | Indicates the next block to the right will be the next block to flash, if not already at the rightmost block in the current guess row. |
Line 140 | K() is a copy of the hidden pattern and will be used for scoring. |
Line 150–170 | Y counts the P-score, which is the number of matches in both position and color. |
Lines 171–175 | Whistle sound for each P-score. |
Lines 180–190 | B counts the C-score, which is the number of matches only in color. |
Line 195 | Checks for end of game by a correct guess. |
Line 200 | Checks for end of game by running out of guesses. |
Line 210 | Points to the next guess row. |
Lines 220–230 | Reveal the hidden pattern. |
Lines 222–229 | Update the score and top score. |
Lines 240–242 | Wait for the user to respond before starting a new game. |
Line 1000 | V contains the current menu item number. VL contains the screen location of the current menu item. |
Line 1020 | Positions the vertical menu arrow. |
Line 1030–1060 | Flash the current block in the guess row and delay the arrow at the current menu item. |
Line 1040 | Looks for a user's response on the joystick button. |
Line 1080 | Waits for the user to release the joystick button in order to eliminate a "keyboard-bounce" type problem. |
Lines 1089–1110 | Code menu item's function with respect to the arrow's position. |