-
Notifications
You must be signed in to change notification settings - Fork 61
Websocket Client-Server Framework Spike #1198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Websocket Client-Server Framework Spike #1198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool.
Note
Not merging into dev.
@azaleacolburn @ariesninjadev is this PR to be closed? |
Thinking that we will put this into a spike branch and just leave it. No reason to totally delete reference to this code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting this into a spike branch for now just so we have it, going to close this pr
…9/ws-client-server
0f05f86
into
spike/websocket-client-server-framework
Multiplayer Framework Spike: Websocket / Authoritative Server on Lazy Client Implementation
This PR contains multiple elements:
/multiplayer-spike
containing a barebones server and client that meet the spike requirements as specified by the ticketTest Stack
Included is a basic client-server setup that is meant to represent the framework that would be integrated into Synthesis. It pipes client inputs, simulates the world and physics on the server, and broadcasts the authoritative state to all clients on a fixed basis.
The spike server features:
The spike client features:
This spike does not feature:
Quick Setup
Online Test
An instance of the spike is live here until July 15th.
Testing the spike locally is very simple.
Prerequists:
Installation
cd multiplayer-spike npm install
Run
The server will start on port
3000
by defaultIndependent Tests
To verify the functionality, carry out the following tests:
Multi-Client Stability
Input Latency
Connection Health
Measured Metrics
All metrics observed on Windows
Performance
Memory
Based on these metrics, an implementation that uses authoritative server is probably plausible. It's also possible that other implementations including WebRTC are less memory intensive while being less performant.
Integration into Fission
These are thrown together code fragments that could serve as a basis for hooking this implementation into Synthesis.
System Integration
The multiplayer server should probably be integrated as a new system in Fission:
Jolt Integration
Replace the test physics in the spike with Jolt physics. This is easily the hardest part of this effort, unless I'm missing something, which I probably am. As an example, however, to sync the robot body:
MatchMode Integration
Thanks to the MatchMode system, we can hook some features easily, and add the following to make it actually functional:
Input System Integration
To allow inputs from Fission to work correctly through the server:
Global Configuration Changes
Changes required to support the server in a production environment
Dependencies
Modifications to
package,json
Build Config
Modifications to
vite.config.ts
Considerations and Optimizations
Beyond the missing features, these are things that should probably be implemented before multiplayer goes public.
Server Optimizations
Security
Workflow
Production
This concludes the Spike PR.
Do not merge
.