Skip to content

Go-Tetris is a Tetris clone written in Go using the Ebiten game engine. It supports smooth gameplay, keyboard controls, line clearing, and scoring. Future plans include AI opponent, online multiplayer, and customizable themes.

Notifications You must be signed in to change notification settings

dynamicy/go-tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Go-Tetris

A modern Tetris game built with Go using the Ebiten game engine.

🚀 Features

  • ✅ 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

📂 Project Structure

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

🚀 Installation & Running

1️⃣ Clone the Repository

$ git clone https://github.com/dynamicy/go-tetris.git
$ cd go-tetris/go-tetris-ws

2️⃣ Setup Go Workspace

$ go work use ./tetris ./tetris-main

3️⃣ Run the Game

$ cd tetris-main
$ go run .

📦 Using Go-Tetris as a Module

You can import the core Tetris game logic into other projects:

$ go get github.com/dynamicy/go-tetris-ws/tetris

Then, use it in your own Go project:

import "github.com/dynamicy/go-tetris-ws/tetris"

🕹️ Controls

Key Action
← / → Move left / right
Soft Drop
Space Hard Drop
Z / X Rotate CCW / CW
Shift Hold Tetromino (Upcoming Feature)

📢 How to Contribute

Want to improve Go-Tetris? Feel free to fork the repository, make changes, and submit a Pull Request!

About

Go-Tetris is a Tetris clone written in Go using the Ebiten game engine. It supports smooth gameplay, keyboard controls, line clearing, and scoring. Future plans include AI opponent, online multiplayer, and customizable themes.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages