Replication Client DotNet
-
Being able to connect, send and receive entities to/from a replication server on the .NET platform.
-
It is completely stand alone, with no dependencies towards any game engine (e.g. Unity3d, Unreal).
Usage
Connection(string hostAndPort, IProtocolDefinition protocolDefinition, IEntityNotify notify, ILog log, bool isTrustedWorker)
-
hostAndPort
is the hostname and port you want to connect to. (e.g. "example.com:1234") -
You get the
protocolDefinition
by using protocol-definition-dotnet. -
IEntityNotify
notifies you of changes made to the entity database, and if you are required to reset your gameworld. The reset usually only happens during replay. -
The
isTrustedWorker
is a hack for now, it will be replaced with a proper authentication login in the future. -
Each frame you call the connection
Update()
method. -
You use the
Entities
property on the Connection object to get a collection of entities currently replicated.
IEntityNotify
public interface IEntityNotify
{
void SpawnEntity(Entity e);
void EntityUpdated(Entity e);
void Reset();
}
The game specific instance of the Entity is stored in ProtocolSpecificEntity
member. Read more about it in [entity-repository-dotnet]I(https://github.com/coherence/entity-repository-dotnet).