Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

Conquer.io

Multiplayer territory control game inspired by Paper.io. Claim land, defend your turf, kill other players.

Live at: https://conquerio.riveer.cz

Tech stack

  • Frontend - React + Vite + TypeScript, canvas rendering
  • Backend - ASP.NET Core 9, raw WebSockets, JWT auth
  • Database - MySQL 8.0
  • Infra - Docker Compose, GitHub Actions CI/CD

Running locally

docker compose up --build

Project structure

backend/                  # ASP.NET Core API
  Endpoints/              # REST + WebSocket routes
  Game/                   # Game loop, rooms, tick system
    Messages/             # WebSocket protocol types
  Models/                 # DB entities
  Data/                   # EF Core context

frontend/                 # React + Vite
  src/
    game/                 # Canvas renderer, networking, input
    ui/                   # Login, death screen, etc
    api/                  # API client

Deployment

push to production branch → GitHub Actions → SSH into VPS → docker compose up --build
  • Only @riveerxd can merge into production (branch protection)
  • Workflow: .github/workflows/deploy.yml
  • VPS runs nginx with SSL (certbot) reverse proxying to the containers
  • Secrets (SSH key, VPS host) stored in GitHub repo secrets

Architecture

Server-authoritative multiplayer. Server runs a 20Hz tick loop, clients send direction input, server broadcasts game state. No client-side prediction, just interpolation between ticks.

Dependencies

Backend

Package Why
Pomelo.EntityFrameworkCore.MySql EF Core provider for MySQL - used instead of the Oracle one because it's better maintained and actually works with recent EF Core versions
Microsoft.AspNetCore.Identity.EntityFrameworkCore handles user registration, login, password hashing - no point rolling our own
Microsoft.AspNetCore.Authentication.JwtBearer validates JWT tokens on incoming requests
System.IdentityModel.Tokens.Jwt generates JWT tokens on login - JwtBearer only validates, this one creates them
Serilog.AspNetCore + sinks structured logging to console and rolling log files - built-in ASP.NET logging doesn't support file sinks out of the box
Microsoft.EntityFrameworkCore.Design needed for dotnet ef CLI (generating migrations) - not used at runtime
Microsoft.AspNetCore.OpenApi auto-generates OpenAPI docs, only enabled in dev

Frontend

Package Why
@vitejs/plugin-react Vite plugin for React - handles JSX transform and HMR during dev
@playwright/test end-to-end tests

Team

See CONTRIBUTING.md for workflow and work distribution.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages