Skip to content

emogerov/Trolley-Racing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trolley Racing

Frontend is static and can be deployed to GitHub Pages.
Multiplayer rooms run on a separate WebSocket server.

Local Run

  1. Install deps:
    • npm install
  2. Start multiplayer server:
    • npm run mp:server
  3. Start static game:
    • npm run serve
  4. Open:
    • http://127.0.0.1:4173

Local Run With Docker

  1. Start both containers:
    • docker compose up --build
  2. Open:
    • http://127.0.0.1:4173
  3. Multiplayer server URL in game menu:
    • ws://127.0.0.1:8787/ws

Deploy Frontend (GitHub Pages)

The workflow file is:

  • .github/workflows/deploy-pages.yml

Steps:

  1. Push to main.
  2. In GitHub repo settings, enable Pages and set source to GitHub Actions.
  3. The action deploys index.html, styles, src, assets, admin.

Deploy Multiplayer Server (One-Click)

This repo includes:

  • Dockerfile
  • render.yaml

One-click button template:

Deploy to Render

After deploy, the game can use the default public server URL in config, or you can override in Advanced:

  • wss://<your-render-service>.onrender.com/ws

Important:

  • If frontend is HTTPS (GitHub Pages), multiplayer must use wss:// (not ws://).

Host + Join Flow

  1. Host enters room code, picks laps, clicks Host Online Room.
  2. Host clicks Copy Invite Link and sends it to friends.
  3. Joiners open invite link and click Join Online Room.
  4. Advanced server override is optional (hidden under Advanced).

Debug Overlay

Visual debug panel is hidden by default.

To show it, append query param:

  • ?debug=1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors