Skip to content

enijar/shape-shooter

Repository files navigation

Shape Shooter

Battle-Royale, but you're all shapes...

Play Online!

Getting Started

cp client/env.example.ts client/env.ts
cp server/env.example.ts server/env.ts
npm install
npm start
# Client runs on http://localhost:8080
# Server runs on http://localhost:3000

Self-Hosting

If you want to self-host this game, follow the following installation instructions.

Hardware Requirements

  • Min. 4GB RAM
  • Min. 4vCPU
  • Min. 300MB available storage

Software Requirements

  • Ubuntu 20.04 (or a similar Debian Linux distro)
  • NGINX 1.17
  • Node.JS 16.10
  • NPM 7
  • PM2 4.5

Server Installation

# Clone the latest stable code into /var/www/shape-shooter
git clone https://github.com/enijar/shape-shooter /var/www/shape-shooter

# Enter the git directory
cd /var/www/shape-shooter

# Create env files
cp client/env.example.ts client/env.ts
cp server/env.example.ts server/env.ts
# Modify the newly created env files to change default game settings 👆

# Install + build
npm install
npm run build

# Install PM2 globally (if not already installed)
npm add -g pm2

# Run the game server with PM2
pm2 start --name "shape-shooter" /var/www/shape-shooter/server/build/index.js

NGINX Config

server {
    listen [::]:443 ssl ipv6only=on;
    listen 443 ssl;
    server_name shapeshooter.io;

    location /api {
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_pass http://localhost:3000;
    }

    location / {
        index index.html;
        absolute_redirect off;
        root /var/www/shape-shooter/client/build;
        try_files $uri $uri/ /index.html =404;
    }

    # SSL settings...
}

About

Battle-Royal, but you're all shapes with weapons!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published