new_netcode_context
method. This event is called when Connect starts to create a new instance of the netcode. Connect will create a new instance for each Connect thread.generic_interest_policy
when it is created. This interest policy allows you to tell the netcode how frequently updates should be submitted for a particular entity to a particular client. The genericinterestpolicy
calculates these frequencies based on the distance between the client entity and all other entities, and compares this to the list of rings
provided during initialisation.include\aether\generic-netcode
folder to find the relevant files.netcode_new_simulation_message
method. This allows the netcode to update its internal representation of the simulation state. When using the generic netcode this event is forwarded directly onto the generic netcode instance.worker_id
lets the netcode know which worker this update is received for, and what tick the worker was simulating when it sent the data. Using this the netcode can ensure a consistent view of the data for clients.aether::netcode::connection_subscribe_writable
method for each connection.netcode_new_connection
method, allowing the netcode to initialise the connection to the client. This is a good moment to send any initial static data that the client will need to know about. When using the generic netcode this event is forwarded directly onto the generic netcode instance.netcode_notify_writable
method. The netcode responds by querying its representation of the simulation state and finding all entities that are near the client entity then sending out updates as appropriate.netcode_drop_connection
method to allow the netcode instance to clean any state being held for this connection. When using the generic netcode, this event is forwarded directly onto the generic netcode instance.per_entity_data
type to allow the netcode to indicate that an entity has moved out of range. When this happens, the entity is described as having been 'dropped'. To do this, we add a couple of methods to our protocol file.is_entity_dropped
to test if a particular entity has moved out of range.