No description
  • TypeScript 82.3%
  • HTML 16.5%
  • Dockerfile 1.2%
Find a file
Vitaly Shatalov 36afbe506c
All checks were successful
Build and Deploy Astroparty / build-and-push (push) Successful in 14s
Fix
2026-02-12 12:23:42 +07:00
.agent fix: reduce map updates on display 2026-01-30 19:20:14 +07:00
.forgejo/workflows Fix 2026-02-12 12:23:42 +07:00
maps trying to fix import error 2026-01-30 22:53:37 +07:00
packages trying to fix import error 2026-01-30 22:53:37 +07:00
.dockerignore Initial commit: AstroParty multiplayer game with Docker support 2026-01-29 23:42:38 +07:00
.env.example Initial commit: AstroParty multiplayer game with Docker support 2026-01-29 23:42:38 +07:00
.gitignore Initial commit: AstroParty multiplayer game with Docker support 2026-01-29 23:42:38 +07:00
astroparty-stack.yml Fix 2026-02-12 12:23:42 +07:00
docker-compose.yml Feature: Custom maps support, MAP EDITOR 2026-01-30 19:58:57 +07:00
Dockerfile Fix: maps and all 2026-01-30 20:17:49 +07:00
Dockerfile.map-editor Feature: Custom maps support, MAP EDITOR 2026-01-30 19:58:57 +07:00
package-lock.json Feature: Custom maps support, MAP EDITOR 2026-01-30 19:58:57 +07:00
package.json Fix: Add NODE_ENV=production to npm start script with cross-env 2026-01-30 00:05:27 +07:00
pnpm-workspace.yaml Initial commit: AstroParty multiplayer game with Docker support 2026-01-29 23:42:38 +07:00
README.md Initial commit: AstroParty multiplayer game with Docker support 2026-01-29 23:42:38 +07:00

🚀 AstroParty

A multiplayer browser-based space combat game inspired by classic Asteroids. Players control spaceships with simple two-button controls in an intense battle arena.

🎮 Game Features

  • 2-16 Players: Support for solo flight or intense multiplayer battles
  • Simple Controls: Two buttons - Thrust/Rotate and Fire
  • Jackbox-Style: Separate controller devices and shared display screen
  • Real-time Multiplayer: WebSocket-based synchronization

🏗️ Architecture

  • Server: Fastify + Socket.io + Matter.js physics
  • Display Client: Full-screen game field with Canvas rendering
  • Controller Client: Mobile-friendly two-button interface
  • Shared Package: Common types and game constants

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • pnpm 8+

Installation

# Install dependencies
pnpm install

# Copy environment variables
cp .env.example .env

Development

# Start all services (server + both clients)
pnpm dev

Development URLs:

Production URLs (after npm start):

Production

# Build all packages
npm run build

# Start server
npm start

🐳 Docker Deployment

Build Docker Image

# Build the Docker image
docker build -t astroparty:latest .

# Or use docker-compose
docker-compose build

Run with Docker

# Run with docker-compose (recommended)
docker-compose up -d

# Or run directly
docker run -d -p 3000:3000 \
  -e ROUND_DURATION=150000 \
  --name astroparty \
  astroparty:latest

Then open:

Stop Docker Container

# With docker-compose
docker-compose down

# Or stop container directly
docker stop astroparty
docker rm astroparty

🎯 How to Play

  1. Open the Display on a large screen (TV, monitor)
  2. Players open Controller on their phones/devices
  3. Enter your name and join
  4. Left Button: Press to thrust forward, release to rotate clockwise
  5. Right Button: Fire bullets (3 ammo, 2s reload per charge)
  6. Destroy other ships to score points!
  7. Ships wrap around screen edges, bullets disappear at edges

📁 Project Structure

astroparty/
├── packages/
│   ├── shared/          # Types and constants
│   ├── server/          # Game server
│   ├── client-display/  # Game field display
│   └── client-controller/ # Player controls
└── package.json

🔧 Configuration

Edit .env to configure:

  • PORT: Server port (default: 3000)
  • ROUND_DURATION: Round length in milliseconds (default: 150000 = 2:30)

🛠️ Tech Stack

  • TypeScript - Type safety
  • Fastify - Fast server framework
  • Socket.io - Real-time communication
  • Matter.js - Physics engine
  • Vite - Fast build tool
  • Canvas API - Game rendering

📝 License

MIT