![Logo](https://github.com/fredzo/awtris/raw/master/docs/awtris-logo.png)
A Tetris game for Awtrix devices!
This project is a Tetris game designed to run on an Ulanzi Desktop Clock paired with a Wiimote controller for game commands.
It's inspired by the work of Aaron Liddiment and Scott Marley.
This project is built this frameworks/libraries:
The simplest way to use Awitrix is to run it in single player mode. For that you need one Ulanzi Desktop Clock and one Wiimote.
See Build And Install for installation procedure.
Once Awtris device is turned on :
- Press the "1" and "2" buttons on the Wiimote
- The LED1 will be on when they have finished connecting
You can now start a new game by pressing "1" or "2" button.
Hold the Wiimote horizontally and use "<", ">" and "v" keys to move Tertrominoes and "1" or "2" buttons to rotate Tetrominoes.
Adjust leds brightness by holding "A" button and pressing "+" or "-".
Adjust the volume of the buzzer by holding "B" (trigger) button and pressing "+" or "-".
Change the effect displayed on the board's background by pressing "+" or "-" buttons.
Available backgrounds are :
- None
- Plain
- Swim lanes
- Chessboard
- Stripes
- Waves
- Plasma
For Two Player mode you will need 2 Ulanzi Desktop Clocks and 2 Wiimotes. While the Wiimote is connected to Awtris module via Bluetooth, the communication between the two Awtris modules will run through the Wifi network. For that you will need to setup Wifi for each Awtris device with Autoconnect :
- Turn on your Awitris device
- Connect your Wiimote (needed for the Wifi stack to work properly in shared mode with Bluetooth)
- Use your phone or laptop to connect to the "Awtris" Wifi Access Point
- Enter your Wifi password in the captive portal using the AutoConnect menu.
- Wait for a few seconds for the password to be saved in the NVS memory (if password has not been saved upon restart, run the procedure one more time)
Once both Awtris devices are on and connected to the same Wifi network, press "Home" button on one of the remotes.
This will prompt for a 2 player game on the second device.
Just press "1" or "2" button on the second device to start the 2 player game.
In 2 player mode, each time a player manages 2, 3 or 4 lines at a time, the second player will receive 1, 2 or 4 lines at the bottom of his board.
The game ends whenever one of the players fills his screen.
To build the project, you just have to run Build command in PlatformIO.
Build
Installation is performed with Upload or Upload and Monitor commands in PlatformIO while the Awtris device is connected via USB.
Upload and Monitor
- Tetris game port to Awtris device using FastLed NeoMatrix
- Connection to Wiimote as a gamepad
- Tetris Music and sound effects using MelodyPlayer library (modified version to support tempo change an volume change)
- Change buzzer volume and LED brightness using Wiimote
- Change background effect using Wiimote
- Save settings (volume, brightness, background effect, high score) to NVS memory
- Connect the device to Wifi with AutoConnect
- 2 Player mode
- Documentation
- English Readme
- French Readme
- French Tutorial to create a Tetris game
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Fredzo - https://github.com/fredzo
Project Link: https://github.com/fredzo/awtris