A modern Tetris game built with Go using the Ebiten game engine.
- โ Smooth Tetromino movement & rotation
- โ Wall Kick System (SRS)
- โ Hard Drop (SPACE Key)
- โ Scoring System
- โ Game Speed Increases Over Time
- ๐ง Upcoming: Hold & Swap (SHIFT Key), & Leveling
This project follows a Go workspace structure:
go-tetris-ws/
โโโ tetris/ # Core Tetris game logic (library)
โ โโโ board.go
โ โโโ config.go
โ โโโ game.go
โ โโโ input.go
โ โโโ shapes.go
โ โโโ tetromino.go
โ โโโ ui.go
โ โโโ go.mod
โโโ tetris-main/ # Main entry point
โ โโโ go.mod
โ โโโ main.go
โโโ go.work # Go workspace file
โโโ README.md
โโโ LICENSE
โโโ .gitignore
$ git clone https://github.com/dynamicy/go-tetris.git
$ cd go-tetris/go-tetris-ws
$ go work use ./tetris ./tetris-main
$ cd tetris-main
$ go run .
$ go get github.com/dynamicy/go-tetris-ws/tetris
import "github.com/dynamicy/go-tetris-ws/tetris"
Key | Action |
---|---|
โ / โ | Move left / right |
โ | Soft Drop |
Space | Hard Drop |
Z / X | Rotate CCW / CW |
Shift | Hold Tetromino (Upcoming Feature) |
Want to improve Go-Tetris? Feel free to fork the repository, make changes, and submit a Pull Request!