Catcher 1.1

{% trans 'Sorry, your browser does not support canvas -- please either update your browser or submit your requirements by phone or email.' %}

Accelerometer

Avatar for Purparus Purparus

Purpose: You have to catch the falling stones which position my vary during fall (1 pixel left or right). Every catch causes the falling speed to be increased. and the tone higher. When a stone is lost the game ends and presents the total of catches. How to play. Use the buttons to move the catcher left or right targeting the falling stone. Variables: iTone: It contains a value to represent a high tone that will be decremented when the gave is over; iStdTimer: It is the number of loops before the stone moves down one row. In summary it determines the falling rate. When debugging the program please change this to a low value (e.g. 10); iDecrValue: This is the value to be reduced from the iStdTimer after each catch increasing the falling speed; If debugging please change this number to e.g. 1 vCatcher: It holds the position of the "catcher". It is initial value is "2" (middle of the bottom line); bFailed: Boolean variable determining when the game is over; iScore: Variable holding the number of catches; iToneCatch: For each catch the tones increases its frequency and it is provided by this variable. The initial value is a low tone; iColumn: Column where the stone will be shwon. It may move 1 position left or right in each fall; iRow; Row where the stone is positioned. It goes from 4 to 1 (top down to represent the falling of the stone); iTimer: Loop counter representing the time a stone waits before fall one row. As more catches as faster the stone falls (the initial value provided by iTimerValue is reduced by iDecrValue); iPosAnt: Saves the previous position of the stone in order to switch the led off. I used it instead of clear pixels to avoid led flicker; bButtonPressed: Flag to control when a button was pressed what causes the stone position being cleared and the catcher moved

Report this project
Back to top