Table of Contents

Interface IGameEngine

Namespace
Netick
Assembly
Netick.dll
public interface IGameEngine

Methods

GetConnectionMetaSizeWords()

Implements this to inform Netick about the size (in 32 bit words) of your connection meta data.

int GetConnectionMetaSizeWords()

Returns

int

GetEntityMetaSizeWords()

Implements this to inform Netick about the size (in 32 bit words) of your entity meta data.

int GetEntityMetaSizeWords()

Returns

int

OnBeforeSend(NetworkConnection)

This is called before sending packets to the target connection.

void OnBeforeSend(NetworkConnection target)

Parameters

target NetworkConnection

OnConnectFailed(ConnectionFailedReason)

void OnConnectFailed(ConnectionFailedReason reason)

Parameters

reason ConnectionFailedReason

OnConnectRequest(NetworkConnectionRequest)

void OnConnectRequest(NetworkConnectionRequest request)

Parameters

request NetworkConnectionRequest

OnConnectedToServer()

void OnConnectedToServer()

OnDisconnectedFromServer(TransportDisconnectReason)

void OnDisconnectedFromServer(TransportDisconnectReason transportDisconnectReason)

Parameters

transportDisconnectReason TransportDisconnectReason

OnEntityDespawned(Entity)

This is called when an entity has been removed from the simulation.

void OnEntityDespawned(Entity entity)

Parameters

entity Entity

OnEntityInterestChanged(Entity, bool)

void OnEntityInterestChanged(Entity entity, bool isInterested)

Parameters

entity Entity
isInterested bool

OnEntityMetaChanged(NetickEntityMeta, byte*, int)

This method is called on the client when it receives new entity meta data. This must be used to create/setup network entities on the client. It can be called many times not only when the data has changed.

Note: user entity meta data can be used for custom user data that might be used in creating entities.

void OnEntityMetaChanged(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)

Parameters

netickMeta NetickEntityMeta
userMetaData byte*
worldIndex int

OnEntityMetaChangedPhaseThree(NetickEntityMeta, byte*, int)

void OnEntityMetaChangedPhaseThree(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)

Parameters

netickMeta NetickEntityMeta
userMetaData byte*
worldIndex int

OnEntityMetaChangedPhaseTwo(NetickEntityMeta, byte*, int)

void OnEntityMetaChangedPhaseTwo(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)

Parameters

netickMeta NetickEntityMeta
userMetaData byte*
worldIndex int

OnEntitySpawned(Entity)

This is called when a new entity has been added to the simulation.

void OnEntitySpawned(Entity entity)

Parameters

entity Entity

OnInputRead()

void OnInputRead()

OnMatchListUpdate(List<Session>)

void OnMatchListUpdate(List<Session> sessions)

Parameters

sessions List<Session>

OnPacketReceived(NetworkConnection)

This is called when a full packet has been received.

void OnPacketReceived(NetworkConnection source)

Parameters

source NetworkConnection

OnPeerConnected(NetworkConnection)

void OnPeerConnected(NetworkConnection connection)

Parameters

connection NetworkConnection

OnPeerDisconnected(NetworkConnection, TransportDisconnectReason)

void OnPeerDisconnected(NetworkConnection connection, TransportDisconnectReason transportDisconnectReason)

Parameters

connection NetworkConnection
transportDisconnectReason TransportDisconnectReason

OnPlayerConnected(NetworkPlayer)

void OnPlayerConnected(NetworkPlayer player)

Parameters

player NetworkPlayer

OnPlayerDisconnected(NetworkPlayer, TransportDisconnectReason)

void OnPlayerDisconnected(NetworkPlayer player, TransportDisconnectReason transportDisconnectReason)

Parameters

player NetworkPlayer
transportDisconnectReason TransportDisconnectReason

OnReceiveData(NetworkConnection, byte, byte*, int, TransportDeliveryMethod)

void OnReceiveData(NetworkConnection sender, byte id, byte* data, int len, TransportDeliveryMethod transportDeliveryMethod)

Parameters

sender NetworkConnection
id byte
data byte*
len int
transportDeliveryMethod TransportDeliveryMethod

OnUnlinkedEntityDespawned(Entity)

This is called when an unliked entity has been removed from the simulation.

void OnUnlinkedEntityDespawned(Entity entity)

Parameters

entity Entity

PopulateEntityMeta(Entity)

This is used to populate the user meta data for an entity.

void PopulateEntityMeta(Entity entity)

Parameters

entity Entity

SyncTransformsToPhysics()

void SyncTransformsToPhysics()