Skip to content

fredzo/awtris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues


Logo

A Tetris game for Awtrix devices!

About The Project

Awtris

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.

Awtris]

Built With

This project is built this frameworks/libraries:

  • PlatformIO
  • ESP32
  • MelodyPlayer
  • ESP32Wiimote
  • FastLed
  • NeoMatrix
  • AutoConnect

Usage

Single Player Mode

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 :

  1. Press the "1" and "2" buttons on the Wiimote
  2. 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.

Settings

Brightness

Adjust leds brightness by holding "A" button and pressing "+" or "-".

Buzzer volume

Adjust the volume of the buzzer by holding "B" (trigger) button and pressing "+" or "-".

Background effect

Change the effect displayed on the board's background by pressing "+" or "-" buttons.

Available backgrounds are :

  1. None
  2. Plain
  3. Swim lanes
  4. Chessboard
  5. Stripes
  6. Waves
  7. Plasma

Two Player Mode

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 :

  1. Turn on your Awitris device
  2. Connect your Wiimote (needed for the Wifi stack to work properly in shared mode with Bluetooth)
  3. Use your phone or laptop to connect to the "Awtris" Wifi Access Point
  4. Enter your Wifi password in the captive portal using the AutoConnect menu.
  5. 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)
Overview   Captiveportal

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.

Build And Install

Build

To build the project, you just have to run Build command in PlatformIO.

Build

Installation

Installation is performed with Upload or Upload and Monitor commands in PlatformIO while the Awtris device is connected via USB.

Upload and Monitor

Roadmap

  • 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).

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Fredzo - https://github.com/fredzo

Project Link: https://github.com/fredzo/awtris

About

Tertris game for Ulanzi Desk Clock

Resources

License

Stars

Watchers

Forks

Packages

No packages published