Net Demo by ashoulson - 1

Games & Projects

A demo Unity application using Railgun and MiniUDP.

Unknown VersionOtherUpdated 3 years agoCreated on October 4th, 2016
Go to source

RailgunNet: A Client/Server Network State-Synchronization Layer for Games

Alexander Shoulson, Ph.D. -

Example 1   Example 2   Example 3

Based loosely on the Quake 3 and Valve/Source networking models.

Supported Networking Tasks:

  • Compact bit-packing of serialized entity data
  • Delta-compression for entity data
  • Network clock (frame number) sync
  • Smoothing and interpolation support
  • Clientside prediction support
  • Scoping and packet size/QoS enforcement
  • Reliable global events
  • Unreliable entity/controller events


  • Code generation for new synced object states

Not Supported:

Primary Design Features of Railgun:

  • Transport-Agnostic. Railgun is not tied to the transport layer used for transmitting data over the internet. As long as a simple interface is upheld (essentially just sending/receiving unreliable byte[] arrays), Railgun can work with a number of network libraries.
  • Low-Bandwidth. Railgun uses bit-packing and delta compression to keep bandwidth use at a minimum. Additional compression techniques (like Quake’s Huffman Encoding) are also under consideration.
  • Simplicity. Railgun is designed to be simple to read and debug. This library offers as minimal a feature set as possible to keep the total source small and readable. While Railgun could certainly benefit from features like code generation for custom object serialization, code simplicity takes a higher priority.


  • Railgun is not a networking library. It provides no explicit support for UDP or TCP data transfer. Railgun is designed to sit right above such a library and use it to transmit and receive data that Railgun then interprets. For a simple UDP library that serves as a perfect companion to Railgun, see MiniUDP.
Show all projects by ashoulson