Skip to content

Latest commit

ย 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

StickmanArena

ย StickMan Arena

Real-Time Multiplayer Stickman Fighting โ€” Phaser 3, Socket.IO & Next.js

Next.js Phaser 3 Socket.IO Express TypeScript

Last Commit Repo Size Realtime Multiplayer Open Source


Features ยท Architecture ยท Tech Stack ยท Getting Started


StickMan Arena is a real-time multiplayer stickman fighting game. Two players, one arena, last stickman standing wins. Built as a three-package workspace: a Phaser 3 client, an Express + Socket.IO game server, and a shared package for types and validation โ€” so client and server can never disagree on the game contract.


โœจ Features

  • โš”๏ธ 1v1 Arena Fights โ€” real-time stickman combat with a friend
  • ๐Ÿ”Œ Socket.IO Realtime โ€” authoritative server with live position sync
  • ๐Ÿ“ฆ Shared Contracts โ€” types, constants, and validation shared between client & server
  • ๐ŸŽฎ Phaser 3 Rendering โ€” 60 FPS canvas gameplay
  • ๐Ÿงช Tested Server โ€” Vitest suite on the game server
  • ๐ŸŒ Deployable Anywhere โ€” client on Vercel, server on Railway

๐Ÿ—๏ธ System Architecture

flowchart LR
    subgraph Client [Client โ€” Next.js + Phaser 3]
        A[Game Scene]
        B[Input Controller]
    end

    subgraph Server [Server โ€” Express + Socket.IO]
        C[Game Rooms]
        D[Physics / State Sync]
        E[Validation]
    end

    subgraph Shared [Shared Workspace]
        F[Types ยท Constants ยท Validation]
    end

    A --> C
    B --> C
    C -->|State Broadcast| A
    F -.-> A
    F -.-> C
    E -.-> F
Loading
stickman-arena/
โ”œโ”€โ”€ client/          # Next.js 14 + Phaser 3 (deploys to Vercel)
โ”œโ”€โ”€ server/          # Express + Socket.IO (deploys to Railway)
โ””โ”€โ”€ shared/          # Types, constants, validation (workspace package)

Design principle: all gameplay contracts (message schemas, constants, input validation) live in shared and are imported by both ends โ€” a type error anywhere in the pipeline is caught at compile time.


๐Ÿงฐ Tech Stack

Layer Technology
Client Next.js 14 ยท React 18 ยท Phaser 3.88
Realtime Socket.IO 4.8 (client + server)
Server Express 4.21 ยท uuid
Shared TypeScript workspace package
Testing Vitest (server)
Deployment Vercel (client) ยท Railway (server)

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 20+
  • npm workspaces enabled (default)

Installation

# 1. Clone
git clone https://github.com/Manthan-13521/StickmanArena-Game.git
cd StickmanArena-Game

# 2. Install all workspaces
npm install

# 3. Build shared types (required before server/client)
npm run build --workspace=shared

# 4. Start both in dev mode
npm run dev

Open http://localhost:3000 for the client. The game server runs on port 3001.

Environment Variables

Variable Where Purpose
PORT server Server port (default 3001)
NEXT_PUBLIC_SERVER_URL client WebSocket server URL

๐Ÿ”ญ Roadmap

  • Spectator mode
  • Power-ups & arenas selection
  • Matchmaking + ranked ELO
  • Mobile touch controls
  • Replay / spectator camera

๐Ÿค Contributing

Contributions welcome โ€” fork, build the workspaces, and open a PR.


๐Ÿ“„ License

All rights reserved.


ยฉ 2026 Manthan Jaiswal โ€” Built with Phaser 3, Socket.IO & Next.js.

About

๐ŸŽฎ 2D Stickman Action Game

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages