A real-time Tetris game written in JavaScript using node.js and socket.io
You must download git
and node.js
to begin development
First clone the tetris-online repository on github
git clone https://github.com/StuffByLiang/tetris-online.git
To begin development, you must install required dependencies (run the commands in the project's root directory)
npm install
npm install --only=dev
Additionally, also install webpack
and docsify
npm i -g webpack webpack-cli docsify-cli
Run the following code and then in your browser visit http://localhost:3000
npm start
To incorporate your own changes, edit files under scripts and then compile them by typing the following command and the project's root directory. All changes under /scripts
will be autocompiled into /dist/bundle.js
webpack
Check the documentation! Run the following code and then in your browser visit http://localhost:3001
npm run docs
Visit new.html
in the root directory on the browser to play the game. Make sure you run webpack beforehand.