Arduino Tetris: Difference between revisions
Adamcolton (talk | contribs) No edit summary |
Adamcolton (talk | contribs) No edit summary |
||
| Line 8: | Line 8: | ||
The whole thing should be tiny, just a few inches and should be able to run for a long time off a single battery. | The whole thing should be tiny, just a few inches and should be able to run for a long time off a single battery. | ||
== Score == | |||
* 1 : 1 | |||
* 2 : 3 | |||
* 3 : 9 X = +1 | |||
* 4 : 27 X = +3 | |||
The multiplier is added and reset when a piece lands without clearing a row. So clearing 4 lines get 27 points and sets the multiplier to 3, if the next piece clears 1 line, that get 3 points and leaves the multiplier at 3, if the next piece clears 3 lines, that gets 27 points and increases the multiplier to 4. If the next piece clears no lines, the multiplier is reset to 1. The multiplier cannot exceed two digits. The highest it could get is 5 successive tetris, which would only reach 15. So the first digit cannot get above 1. | |||
[[Category:Electronics]] | [[Category:Electronics]] | ||
Revision as of 19:22, 10 February 2017
Use an Arduino pro mini with a Nokia display and a few simple push buttons.
For power, there are 3.3v setup converts that can take the power from a single AAA battery and step it up to 3.3v. I want to add a mosfet and a button. The button will power the board, if the power button is held down long enough for the Arduino to power up (about 1 second), the Arduino will set a pin high to power the mosfet, which will keep power flowing. When the game is over, the Arduino will power itself off.
Controls will be 3 buttons on the right (← ↓ →), and two buttons on the left to rotate right and left.
The game will be a 10x20 grid, each cell having 3 pixels. The display is 84x48, but I'll use it sideways. The game board will take up 60x30. This should leave room across the bottom for the score and off to one side to show the next piece.
The whole thing should be tiny, just a few inches and should be able to run for a long time off a single battery.
Score
- 1 : 1
- 2 : 3
- 3 : 9 X = +1
- 4 : 27 X = +3
The multiplier is added and reset when a piece lands without clearing a row. So clearing 4 lines get 27 points and sets the multiplier to 3, if the next piece clears 1 line, that get 3 points and leaves the multiplier at 3, if the next piece clears 3 lines, that gets 27 points and increases the multiplier to 4. If the next piece clears no lines, the multiplier is reset to 1. The multiplier cannot exceed two digits. The highest it could get is 5 successive tetris, which would only reach 15. So the first digit cannot get above 1.