Skip to content
Angus Hollands edited this page Oct 17, 2015 · 5 revisions

Introduction

There are two methods of sending data in the network library:

  • Attribute replication
  • Function call (RPC) replication.

Attribute Replication

Attribute Replication is designed to accommodate the unforgiving network conditions that may arise during a game. Attributes are broadcast with a **one-to-many mapping **to all connected clients from the server, according to their container class's conditions generator, which yields the names of attributes which are permitted to be replicated to certain clients. They are sent reliably, meaning that they are guaranteed to be received by the client eventually.

Function Replication

Function Replication is designed for events which occur during the game. They are not state, unlike attributes, meaning that previous function calls will not be sent to new peers. They are sent (typically) unreliably, meaning that there is no guarantee the peer will receive it. We can use the @reliable decorator to enforce reliability on the function call. Replicated functions can be sent from server or client, but they only follow a one-to-one mapping.

Details

  1. Every network tick, the RPC calls and Attributes are replicated.
  2. Between network ticks, only RPC calls are replicated
  3. RPC calls are replicated first and will not influence the predicted bandwidth available for attribute replication. This means that a packet collection may be over-sized, and the next time the system compensates for dropped packets this margin will be taken into consideration.
  4. Attribute replication is governed by replication_priority to determine the packet fill order (which determines if the update is included when we run out of bandwidth).
  5. Attribute replication will increment the replication_priority when an object hasn't replicated for a while, proportionally to its replication_update_period
  6. Replicables will be omitted from replication if they've not exceeded the interval defined by replication_update_period

Getting Started

#Network

Worlds & Scenes

##Replication Overview

Attributes

Functions

Gotchas

##Serialisation Data handlers

##Communication Messaging

#Game Framework ##Bindings Creating bindings

Clone this wiki locally