szunami / symmetris

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hathora Topdown Shooter

Overiew

Multiplayer 2D shooter demo made using Hathora Buildkits + Phaser

Assets from Kenney

Try it

The game is playable at https://visionary-sunshine-827244.netlify.app/

A screenshot of symmetris.

Running locally

To run locally:

APP_ID=<appId>
HATHORA_APP_SECRET=<appSecret>
  • Start server: inside server directory run npm start (remember to npm install first)
  • Start client: inside client directory run npm start (remember to npm install first)

Architecture

Fully server authoritative game:

  • Client sends user inputs to server
  • Server processes the inputs and runs game simulation (at 20fps)
  • Server broadcasts state snapshots to clients (at 20fps)
  • Client interpolates the state snapshots and renders the game UI (at 60fps)
  • No prediction on the client side

Room based architecture:

  • One player creates a game session and gets back a roomId
  • They send the roomId to others
  • Others can join the same session with this roomId

About


Languages

Language:TypeScript 98.4%Language:HTML 1.0%Language:Dockerfile 0.4%Language:Shell 0.2%