Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/levpaul/webrtc-mmo-server

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/levpaul/webrtc-mmo-server

  • v0.0.0-20201021060452-7c34e1e26923
  • Source
  • Go
  • Socket score

Version published
Created
Source

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

FAQs

Package last updated on 21 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc