Noverwyn Documentation

Client library

noverwyn_client.dll has a C interface: any engine can load it, including Unreal. Its functions are in the native reference, "client" API.

Units: metres, seconds, degrees, Z up. Call it from a single thread.

A typical frame#

#include "nov_client.h"

if (nov_api_version() != NOV_CLIENT_API_VERSION) return 1;
NovClient* c = nov_create();
nov_set_ticket(c, ticket);                          // empty on a development server
nov_set_master(c, serverId, keysJson, catalogJson); // for VIP items
nov_connect(c, "203.0.113.10:27100", "Ana", serverKey, NULL);

while (running) {
	nov_tick(c);

	NovEvent ev;
	while (nov_next_event(c, &ev)) {
		switch (ev.type) {
			case NOV_WELCOME:    teleportMe(ev.pos); break;
			case NOV_CORRECTION: teleportMe(ev.pos); break;
			case NOV_SPAWN:      create(ev.id, ev.name, ev.kind, ev.pos); break;
			case NOV_DESPAWN:    destroy(ev.id); break;
			case NOV_EVENT:      script(ev.name, ev.text); break;
			case NOV_CLOSED:     running = 0; break;
		}
	}

	NovDisplay shown[256];
	int n = nov_displays(c, shown, 256);
	for (int i = 0; i < n; ++i) place(shown[i].id, shown[i].pos, shown[i].yaw);

	nov_move(c, myPos, myVel, myYaw, myState);
}
nov_destroy(c);

Structures#

NovEvent#

Field Type Content
type int32_t NOV_WELCOME…
id int32_t entity concerned
isPlayer int32_t 1 for a player
reason int32_t reason for disappearing
bucket uint32_t new bucket
pos, yaw double[3], double position and orientation
name, kind char[64] name, kind
text char[512] text

NovDisplay#

Field Type Content
id, isPlayer int32_t who
pos, vel, yaw double[3], double[3], double where to display it now
state int32_t gait, jump…
extrapolated int32_t 1: guessed position, for lack of news
delayMs double display delay

NovStats#

Field Content
rttMs, jitterMs ping and jitter
kbitIn, kbitOut bandwidth over the last second
known, players known entities and players
corrections positions imposed since the start
bucket the player's bucket

Security#

  • Always give the server's public key to nov_connect: a fake server is refused.
  • The keys and catalogue given to nov_set_master come from the master, never from the game server.
  • Only display the VIP items returned by nov_vip.