Massive WIP; check out https://eds-game-for-ftp-game-jam-2022.initialed85.cc/
Arrows to fly around, left alt to fire, anyone else at the above URL at the same time will be in the same multiplayer game.
The code is at https://github.com/initialed85/eds-game-for-ftp-game-jam-2022
- Rust w/ Bevy for game framework
- Network multiplayer via WebSocket
- Native server
- WASM client
- Shipped on my home Kube cluster
Noteworthy items:
- Client's send key input events as they happen
- Server applies inputs and executes physics
- Server sends updates at 15 Hz
- Clients execute physics at 60 fps in between updates from server to keep things feeling smooth
- Clients use exponential smoothed moving average to keep things further feeling smooth (handling the error between the Client-executed physics and the next update of truth from the Server)
Remaining stuff
- Fix the server side timestep
- The feel of the game varies pending how much grunt the server has
- Somehow establish time sync between Server and Client and use that to more accurately apply input events and update events (vs right now it just happens on receipt)
- The feel is further impacted by latency / jitter from Client to Server
- Implement lives and damage for the players or something like that
- Have some UI stuff
- Maybe implement a status / remote control API out of the Client and do it all in React on the browser side?
Realistically
- Probably leave it as it is because I'm bored with it and it's as complete as any of my other personal projects (i.e. not)