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