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 58.6%
  • JavaScript 34.2%
  • HTML 6.8%
  • Dockerfile 0.4%
Find a file
Arnas Udovic e10193a3d3
All checks were successful
Deploy / deploy (push) Successful in 1m9s
start game improvenment
2026-07-06 12:21:55 +03:00
.air/plans fix dot colors; db 2026-07-02 23:50:33 +03:00
.forgejo/workflows try to fix circling 2026-07-01 22:23:50 +03:00
client start game improvenment 2026-07-06 12:21:55 +03:00
server start game improvenment 2026-07-06 12:21:55 +03:00
.dockerignore added separate games, translations, docker 2026-02-13 19:20:55 +02:00
.gitignore added separate games, translations, docker 2026-02-13 19:20:55 +02:00
docker-compose.yml fix dot colors; db 2026-07-02 23:50:33 +03:00
Dockerfile Update working Dockerfiel 2026-07-01 18:54:03 +03:00
index.html start game improvenment 2026-07-06 12:21:55 +03:00
LICENSE Initial commit 2026-02-13 08:56:43 +00:00
package-lock.json fix dot colors; db 2026-07-02 23:50:33 +03:00
package.json fix dot colors; db 2026-07-02 23:50:33 +03:00
README.md fix dot colors; db 2026-07-02 23:50:33 +03:00
TODO.md start game improvenment 2026-07-06 12:21:55 +03:00
tsconfig.json moved logic from pygame maumataskis 2026-02-13 11:30:38 +02:00

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

  1. Turns: Players take turns placing one point on the grid.
  2. Placing Points: Points can only be placed on empty grid intersections.
  3. 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.
  4. 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
  • PostgreSQL

Installation

npm install

Running the Game

Create a PostgreSQL database and set DATABASE_URL before starting the server:

export DATABASE_URL=postgres://maumataskis:maumataskis@localhost:5432/maumataskis

To run both the frontend and backend:

npm start
  • Frontend: http://localhost:5173
  • Backend: http://localhost:3000

On startup the server creates the required tables automatically. Users, rankings, active game sessions, point moves, surround events, and game history are stored in PostgreSQL. Active games are rebuilt from saved moves when players reconnect after a restart.

Running with Docker

You can also run the game using Docker and Docker Compose, which is the recommended way for production deployment.

  1. Build and start the container:

    docker-compose up -d --build
    
  2. 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.
    • PostgreSQL data is persisted in the named postgres-data volume.

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.