FPS browser game where players shoot mustard paintballs at each other. Inspired by the Three.js FPS Example.
-
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)
- React-Three-Rapier
- Typescript
- Vite
- PWA
-
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
- Spheres as instanced mesh
- Send all player inputs for each simulation frame between snapshots to maintain deterministic lockstep between sims