_NetworkSimulator

Inherits: Node

Network Simulator

Description

Auto connects launched instances and simulates network conditions like latency and packet loss. Can be toggled via Project Settings.

Properties

Type Name Default
bool enabled false
String hostname "127.0.0.1"
int server_port 9999
bool use_compression true
int latency_ms 0
float packet_loss_percent 0.0

Signals

server_created ( )

Signal emitted on the instance that successfully started a server. Can be used for custom initialization logic, e.g. automatic login during testing.


client_connected ( )

Signal emitted on instances that successfully connected as a client. Can be used for custom initialization logic, e.g. automatic login during testing.


Property Descriptions

bool enabled = false

Enable to automatically host and connect on start


String hostname = "127.0.0.1"

No description provided.


int server_port = 9999

Server port to listen on, UDP proxy will use port + 1 if simulating latency or packet loss


bool use_compression = true

Use ENet's built-in range encoding for compression


int latency_ms = 0

Simulated latency in milliseconds. Total ping time will be double this value (to and from)


float packet_loss_percent = 0.0

Simulated packet loss percentage