Command-based navigation is working again, #uxn emulation is becoming ever more configurable!
See the demo below, in which the client feeds the command "go 100 200 400" to a ship, which will set the target coordinates for a PD controller.
(Also, the memory layout of a ship is defined completely in Lua, the engine core needs to have no knowledge of it.)
See the demo below, in which the client feeds the command "go 100 200 400" to a ship, which will set the target coordinates for a PD controller.
(Also, the memory layout of a ship is defined completely in Lua, the engine core needs to have no knowledge of it.)
Devine Lu Linvega
in reply to manifoldslug • • •manifoldslug
in reply to Devine Lu Linvega • • •It's integers all the way down! In the approach I'm scripting, the ships just refer to points in the world using three shorts. However, the engine stores their coordinates on a uint32_t, so the simulation has access to an extra 16 bits of precision, while the ships will just use the high 16 bits.
This way, the ships can move about with okay precision, and there's no need for fancy math just to handle coordinates.
Devine Lu Linvega
in reply to manifoldslug • • •manifoldslug
in reply to Devine Lu Linvega • • •The engine stores coordinates on 32 bits, but in the default world, when you are writing uxntal, you'll only have to deal with the higher 16 bits.
The default world will avoid exposing the lower 16 bits to decrease the complexity players need to deal with.
However, there's nothing stopping someone from using a different representation if they decide to script their own world.
Devine Lu Linvega
in reply to manifoldslug • • •