A modern implementation of the classic Tic Tac Toe game with multiplayer support, hard AI opponent and a unique nested quiz mechanic, built using Ebiten and Go, and compiled to WebAssembly for web deployment. This project was developed as part of the "Elegant programming in Go" course miniproject at HEIA-FR, Switzerland.
🎮 Access the game online: https://maiscommentz.github.io/goonker/
-
Classic Gameplay - Full implementation of Tic Tac Toe with standard rules built using Ebiten library.
-
Game Modes - Play against an AI bot or another player in multiplayer mode.
-
Nested Quiz - A player can conquer a cell by answering a question correctly.
-
Web Interface - Interactive web application compiled to WebAssembly for optimal performance.
-
Client-Server Architecture - Strict separation of client and server logic with a robust Go backend featuring a hub system for managing games and players, all communicated via structured packets.
-
Containerized Deployment - Docker for simple and reproducible deployment.
.
├── client/ # Client application
│ ├── assets/
│ ├── ui/
│ ├── game.go
│ ├── main.go
│ └── network.go
├── server/ # Backend server
│ ├── hub/ # Game management
│ ├── logic/ # Game logic
│ └── main.go
├── common/ # Shared client-server code
│ └── packets.go
├── web/ # Web resources
│ ├── demo.wasm # (generated at build time)
│ ├── index.html
│ └── wasm_exec.js
└── Dockerfile # Docker configuration
- Go 1.24 or higher
- Docker (optional)
Launch the server and client:
go run ./server
go run ./clientCompile the client to WebAssembly:
GOOS=js GOARCH=wasm go build -o ./web/demo.wasm ./clientdocker build -t goonker .
docker run -p 8080:8080 goonkerThe project uses automated workflows to ensure code quality and facilitate deployment. Here are the key elements:
-
Linting and Testing: On every push or pull request, the codebase is automatically linted and tested to maintain high standards.
-
Client Deployment: The client is compiled to WebAssembly on each push to the main branch, ensuring the latest version is always ready for deployment. It is then deployed to GitHub Pages, making the game accessible online.
-
Server Deployment: A docker image of the backend server is built and pushed to the repository registry. It is then deployed to a Self-Hosted Server using SSH. This ensures the server is always running the latest version.
This process ensures fast, reliable updates without manual intervention.
- Filipe Casimiro Ferreira - @maiscommentz
- Louis Pasquier - @louis-pasquier