Skip to content

maxwellito/tetrispad

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

TetrisPad

Plug your Novation Launchpad and PLAY!

Single page app using the WebMIDI API to use the Novation Launchpad as a screen for a Tetris.

Demo of Tetrispad

Controls

  • , , : Move the current block
  • a, s: Rotate the current block
  • spacebar: Pause the game

Code structure

The approach is quite classic, it's OOP.

  • Controller class simulate the controller. It listens events from the keyboard to format and dispatch events to who needs it.
  • Launchpad class wait for the Launchpad to be available on the MIDI API and allow to send/receive messages.
  • Grid class is a wrapper to manages the LEDs of the Launchpad. The point of it is to facilitate the LEDs controls and reduce the amount of the messages to send the Launchpad.
  • Game class contain the entire Tetris game logic.

Contributors

Any crazy ideas are welcome (as long as your help :)

Please don't ask to setup a Webpack+Babel+WhatsoEver.. The Midi API is only accessible on modern browsers and these ones should be ES6 ready: feel again this pleasure to work on a repo without build system, it's so niiiice :)

About

Use the Novation Launchpad to play Tetris

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published