Navigation range & synchronization


The v0.7.3 version adds navigation range and modifies entity synchronization to be defined by it.

This release is intended to change the perspective of non-root clients so that they perceive the world through the collective perception of their piloted entities. Currently, this is implemented by expanding upon the structure clients send back to the server in response to entity synchronization packets, by adding an entity identifier they may change to specify which entity they would like to receive information about. The server checks their access to that entity, then sends component data about only those entities that are within the navigation range of the specified entity. The navigation module of ships is now also growable, which allows ships to increase their navigation range.

In tandem, a communication mechanism was added through which ships can share their observed entities with each other. This communication happens through the already existing signaling mechanism that is part of the navigation module, but as part of a protected protocol. This necessitated tracking the clean or dirty state of the host argument space in device memory. The driving intent behind this mechanism was to allow players to share this specific type of infrastructure with each other. Currently, this means that ships can both generate and relay entity observations, and if they store those with a host command, they can be synchronized too. The length of a signal was also expanded from 8 to 16 bytes to grant a bit more bandwidth to this protocol, and ships may also make use of this added space for their usual signaling. The signaling range was also changed to be the sum of the transmitting and receiving entities’ navigation ranges.

HOST_WRITE_NAV_SYN_ENT : &radius $2 -> &entity-exists $1 : &signal $16

Generates a signal containing entities to be synchronized, up to the navigation range.

HOST_WRITE_NAV_SYN_SET : &signal $16 -> &signal-valid $1 :

Stores a signal containing entities to be synchronized into a buffer.

HOST_WRITE_NAV_SYN_GET : -> : &signal $16

Retrieves a signal containing entities to be synchronized from a buffer.

Since it may be situational for clients which entities they are most interested in being synchronized, the default client already implements two different ways of selecting the synchronization target. It calls these synchronization modes. One of these modes is a weighted selection between piloted entities based on their distance from the camera’s origin, and the other mode also filters those entities, to choose only between those that are inside the camera’s bounding box. See mod/FORNAX.md to find the keyboard and gamepad bindings to cycle between these modes.

These developments also prompted me to finally add a way of generating and executing worlds to see if they produce the behaviors expected of them. The test <name> command generates a specific world from a predefined collection, and the --cmds <path> command-line option feeds each line of a file as input to the client upon initialization. See mod/srv/testgen.c for the currently defined test worlds and cmd/test/ for the command files that script their generation and execution.

Other notes:

  • world age should now be deserialized properly
  • piloted entities now have an underline below their icons

Files

doldrusidus-aarch64-linux-gnu-debug.zip 4.6 MB
9 days ago
doldrusidus-arm-linux-gnueabihf-debug.zip 4.3 MB
9 days ago
doldrusidus-i686-linux-gnu-debug.zip 4.7 MB
9 days ago
doldrusidus-x86_64-linux-gnu-debug.zip 4.9 MB
9 days ago

Get doldrusidus

Leave a comment

Log in with itch.io to leave a comment.