https://github.com/levpaul/gecserv
https://github.com/levpaul/gecserv
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/levpaul/gecserv
- Owner: levpaul
- Created: 2020-01-19T07:29:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-21T06:04:57.000Z (over 4 years ago)
- Last Synced: 2024-04-18T02:56:55.072Z (12 months ago)
- Language: Go
- Size: 214 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-pion - levpaul/gecserv - UDP game server for an action MMO (DataChannel)
README
## Go ECS Server
This is a toy project to experience developing a UDP game server for an action MMO style game. The idea is to have MMO type mechanics mixed with a fast paced "real-time" action PVP mechanics. Basically mix FPS netcode with runescape.
# TODO:
7 Feb
- Impl propagation system
- Impl player movement system
- Write benchmarking software## BIG ARCH CONCRETE
- Input/output with players is handled via event bus
- Game state is managed via ECS design## BIG ARCH WOOD
- Single map open world - divided into sectors for horizontal scaling
- "Interest" zones for player updates made by dividing map sectors to locales and taking surroundings
- Client/Server prediction + Small Lag compensation UDP net design
- Separate servers for non-gameworld systems, like chat
## BIG ARCH VAPEN8TION- Persistence layer (probably dynamo + redis caches?)
- Are _all_ C in ECS flatbuffer managed?# Network
### Brief Architecture
- Each play connects via WebRTC/UDP
- Players sync game state updates with server (60tick? or 20tick?)
- Players send input commands to server
- Server processes input commands at 60fps
- Server sends partial updates to each client at 60fps
- If server has no input from client then server "predicts" client action instead, by repeating previous input
- On subsequent old packets coming in, server can replay them### Brief Details
- Client sends inputs with gametick #
- If client action includes hit-tests for attacks, server rolls back target to client's gametick for hit testing
- If client hits based on what "they saw" then rewrite game state to accept hit