Brainteasers: Whodunnit

By Genevieve Ludinski

Originally published in EUG #58


There's a distinctly criminal feel to this issue's little brain straining utilities. In turn, Detective will test your powers of recollection and Whodunnit your powers of reaction. As usual, they are preceded by brief playing instructions as well as this text file in case you wish to make any improvements. Part 8 next issue!


Could you solve the cases and survive the perils of being a detective? Find out by playing this game.

Firstly you are briefed on the correct number-plates for the cars and trucks you are likely to see. Then you are stationed near a main road, watching cars and lorries travel past.

You are looking for a stolen vehicle whose plates have been changed. When you see a car or lorry you suspect, you must call up by radio the two squad cars in the area, and tell them to set up a road block.

If you time it right, the suspected vehicle, which veers off the road when it sees you are interested, will be caught. If your suspected vehicle was stolen and you catch it, the driver comes quietly and your score increases. If however you catch a vehicle which has not been stolen, the driver dresses you down, and your score decreases. If you do not catch the suspected vehicle, then you are told whether your suspicions were correct but your score is unchanged.

How To Play

Press C when you have read which cars and lorries have which number plates. You will then see cars and lorries travel by with the number plates they have attached to them displayed below the road. When you see a vehicle which you suspect has got the wrong number plate, then press A to get the white car at the top of the screen to set up a road block, or Z to have the other white car set up a trap. You may do this continuously, by trying to set up the road block just as the suspected vehicle passes by.

If you catch the vehicle you will hear police-car sirens as the other squad cars approach. Then you are told the result. Press RETURN to play again.

Programming Hints

The cars and lorries are made up of two user-defined characters next to each other. They are animated, or made to travel along the road, in line 350. They are animated by PRINTing them in successive positions along the road, preceded by a space to erase the back half og the previously-drawn vehicle.

You can make the game more difficult by making the vehicles whizz past faster. To do this reduce the value of K in line 300.


Looking through the window you see him standing in his study. Then you hear a gun shot and he falls to the ground. You walk into the house and go into his study.

There are four men there. You know their names. You find a note which the victim must have written as he died. This is a clue to his murderer. You must decide which of the four men is the murderer before they slip out of the room.

How To Play

The victim's note is by the man lying down. You must work out which of the names of the other men has some connection with this word. For example, if the written word "Cider" is shadowed by the four men Dull, Old, Lager and Snow, it is Mr Lager who is the murderer as Lager and Cider are both drinks. Alternatively words that are related may have the same or opposite meanings. For example, Big and Large, also Hot and Cold are related.

Key in the number below the suspected murderer before the fourth man disappears off the screen.

If you're right, you hear police sirens as their cars approach. If you're wrong or too late, you don't. The score is given on the top line. Press RETURN to play again.

Programming Hints

This program illustrates how the ENVELOPE statement can be used to create sound effects. This allows the pitch of the amplitude (volume) of a note to be continuously varied in a short time or both. As a gun shot has a constant pitch the three pitch parameters of the ENVELOPE statement in line 340 are zero. As a gun shot has a sharp attack phase and a slower delay the volume initially shoots up to a maximum 126 before going down more slowly. This is the 126 after the 10. ENVELOPE commands are quite tricky but you can find the ENVELOPE statement you require with limited knowledge by trial and error.

If you want to add more words to the game, add some more DATA statements at the end of the program. Put in sets of three words that are related. Read the other words in lines 690 and 710 for ideas. Make sure that each set is not related to the other words in those lines. When you have added the extra words, count up the total number of sets of words from line 690 and assign it to TT in line 240.