BillarySquintin / FirstPersonMustard

FPS browser game where players shoot mustard paintballs at each other.

Home Page:http://glizzy.gg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FirstPersonMustard

FPS browser game where players shoot mustard paintballs at each other. Inspired by the Three.js FPS Example.

Architecture 

  • Physics

  • Server

    • Geckos.io or Netcode.io (probably Geckos for now)
    • Geckos seems more straightforward to use for me, although Netcode has more security features
  • State Synchronization

    • Snowglobe ☃️ or @geckosio/snapshot-interpolation (SI)
    • Although I was initially set on using the SI framework, it seems that Snowglobe will be better for my use-case because it features Display State Interpolation, which allows the physics to run at a different timestep than the displayed Threejs render. Although Snowglobe currently lacks integrated functions for interpolating between quaternions (rotation), I can copy the functions from SI. (lerp & slerp)

Core Functionality:

  • React-Three-Rapier
  • Typescript
  • Vite
  • PWA

Planned Extra Features:

  • Gamepad Support

  • Three-Mesh-BVH for collision on complex geometries (higher poly maps)

    • Decided against this for now b/c of potential conflicts with native Rapier collision detection
  • Offline Splitscreen Multiplayer

    • Render Two Separate Canvases
    • Solely Handle Physics Locally (remove server-side checking)
  • Offline Peer2Peer Local Multiplayer

    • Allow people to host LAN lobbies
    • Possibly add option to host your own local dedicated server for better performance

TODO:

  • Spheres as instanced mesh
  • Send all player inputs for each simulation frame between snapshots to maintain deterministic lockstep between sims

About

FPS browser game where players shoot mustard paintballs at each other.

http://glizzy.gg

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:TypeScript 85.0%Language:JavaScript 7.2%Language:HTML 6.6%Language:CSS 1.2%