Join us on Discord for support and discussion. Please keep all Zapnet related chat to the
Zapnet is a multiplayer games framework for Unity developed specifically for programmers. Many other assets try to make their frameworks more accessible to less experienced developers by integrating visual editing into the Unity Editor by sacrificing performance and speed.
Zapnet trusts that the programmer knows what they're doing.
Zapnet/Docs/index.html file for a short getting started guide and access to the Zapnet API scripting reference.
See the Getting Started page to start using Zapnet but be sure to read about the concepts and features below.
Zapnet has an array of concepts and features that make it easy for a programmer to make any game multiplayer, whether its a turn based game, a fast-paced multiplayer action game or shooter, or even a large open world survival game.
Instantiate any prefab with the NetworkPrefab component easily by transmitting its unique 2 byte identifier and instantiating it with one simple method call on the other side.
Makes use of all delivery modes that Lidgren supports such as Reliable, Unreliable Sequenced, Reliable Unordered, Reliable Sequenced and Reliable Ordered.
Network entities are the main concept behind Zapnet, all objects you want to be replicated across the network will inherit the entity class. By default, the position and rotation of entities are automatically synchronized and interpolated smoothly.
Every entity has its own state class that inherits a basic state class. The state will contain variables relating to the entity that need to be sent very frequently with entity state updates. It's very simple to use.
With the event system you can create an event data type that can be serialized and sent over the network, deserialized, and then invoked on all subscribers for that event. Events can be transmitted globally or for a specific entity.
Entities can have synchronized variables that are separate to state variables and are only synchronized when they have changed.
While it is recommended to use Events because they are faster and more performant, you can use remote calls which are Zapnet's version of the RPC. They do not use reflection like some other networking alternatives.
A build in network hitbox rewinding system. Simply attach the NetworkHitbox component to an entity (or any prefab) with a trigger collider. When a raycast is performed using Zapnet's raycast methods, hitboxes will be automatically rewound to the position they were at on a particular server tick before the raycast is made.
The base controllable entity can be inherited by your player class to handle the transmitting of input data, client-side prediction, and server reconciliation with very minimal effort on your part except from defining which inputs are being pressed and how to handle the application of those inputs with regards to your character controller.
Entity subystems are additional components that can be added to entities. Each subsystem can contain its own Synchronized Variables, State, and can make Remote Calls. Subsystems have an
Entity accessor to get the entity they belong to. Infact, an Entity is just a Subsystem, so everything a subsystem can do an entity can do too.