The game for two persons. You need to take land and defend already taken. Your army is points and made paths from them to surround enemy.
- TypeScript 55%
- JavaScript 37.1%
- HTML 6.9%
- Dockerfile 1%
| client | ||
| server | ||
| .dockerignore | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.html | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Maumataškis
A two-player strategy game of territory control, paths, and tactical surrounding.
🎮 How to Play
Objective
The goal of Maumataškis is to conquer more territory than your opponent. You do this by surrounding enemy points with your own points to form closed loops (territories).
Rules
- Turns: Players take turns placing one point on the grid.
- Placing Points: Points can only be placed on empty grid intersections.
- Capturing Territory:
- To capture land, you must form a closed cycle of points of your color.
- The cycle must enclose at least one of the opponent's points.
- Once a territory is formed, all area inside it is conquered, and any captured enemy points become neutral (grey).
- You cannot place points inside already captured territories.
- Winning: The game ends when a player surrenders or disconnects. The player with the highest "Conquered Land" score wins.
Controls
- Left Click: Place a point on the grid.
- Show Last Point: Highlights the last move made by your opponent.
- Surrender: Concede the game to your opponent.
- R Key: Reset the current game (only available to players, not spectators).
🏆 Features
Lobby & Matchmaking
- User Profiles: Enter a username to track your progress. Profiles are saved locally.
- Challenge System: Challenge any online user to a real-time match.
- Spectator Mode: Watch ongoing matches between other players.
- Bot Mode: Practice against an AI opponent.
Scoring & Rankings
Your performance is tracked through a global ranking system.
- Base Score: +10 for a win, -5 for a loss.
- Victory Margin: Bonus points for winning with a large area lead.
- Efficiency (Density): Bonus points for capturing large areas with fewer points.
🚀 Technical Setup
Prerequisites
- Node.js (v18+)
- npm
Installation
npm install
Running the Game
To run both the frontend and backend simultaneously:
npm start
- Frontend:
http://localhost:5173 - Backend:
http://localhost:3000
Running with Docker
You can also run the game using Docker and Docker Compose, which is the recommended way for production deployment.
-
Build and start the container:
docker-compose up -d --build -
Access the game:
- The game will be available at the domain configured in
docker-compose.yml(default:http://maumataskis.localhost). - The application is configured to work with Traefik as a reverse proxy.
- User data is persisted through a volume mapping for
user_data.json.
- The game will be available at the domain configured in
Note: Ensure you have a Docker network named traefik-public created, or update docker-compose.yml to match your Traefik setup.
docker network create traefik-public
🛠 Tech Stack
- Frontend: PixiJS, TypeScript, Vite
- Backend: Node.js, Express, Socket.io
- Logic: Custom implementation of Point-in-Polygon and Cycle Detection algorithms.