Skip to content

wrujel/tetris-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo status test

Tetris Game with JavaScript

HTML5 CSS3 JavaScript Vite

Classic Tetris game built with vanilla JavaScript, HTML5 Canvas, and CSS. Features score tracking, level progression, piece rotation, and keyboard controls.

Demo · Report issue · Suggest something

Table of Contents

Features

  • Classic Tetris gameplay mechanics
  • Canvas-based rendering using HTML5 Canvas API
  • Keyboard controls (arrow keys for movement and rotation)
  • Score tracking system (+10 points per row cleared)
  • Level progression with increasing speed
  • Piece rotation with collision validation
  • Row clearing when a line is completed
  • Game over detection
  • Start screen overlay
  • Responsive controls panel
  • Built with Vite for fast development and HMR
  • ESLint with Standard style

Tech Stack

Getting Started

Prerequisites

  • Node.js 16+
  • npm, yarn, pnpm, or bun

Installation

git clone https://github.com/wrujel/tetris-javascript.git
cd tetris-javascript
npm install

Running locally

npm run dev

Open http://localhost:5173 with your browser to see the result.

Build

npm run build

Project Structure

/
├── images/
│   └── screenshot.png
├── utils/
│   ├── canvas.js
│   ├── constants.js
│   └── pieces.js
├── index.html
├── main.js
├── style.css
└── package.json

Demo

You can check out the demo:

Demo

Authors

Contributing

Contributions are welcome! If you have suggestions or find bugs, please open an issue or submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is not currently licensed.


About

A modern implementation of the classic Tetris game, built with JavaScript, powered by Vite, and deployed on Vercel.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors