Godot InSim
This project aims to provide an API to build apps with the Godot game engine that can communicate with Live For Speed through its InSim protocol, as well as OutSim, OutGauge and InSimRelay. It also contains tools to read and write various LFS file formats, and provides access to the REST API.
Installation and usage
Refer to the guides to get started.
Implementation and compatibility
Godot InSim currently supports InSim version 9 as of LFS 0.7F5.
InSim packets are implemented while keeping naming conventions as close as reasonably possible to LFS's InSim documentation, although some variable names are made more readable to adhere more closely to Godot's GDScript style guide.
Enums and bitflags are implemented as enums in InSim, OutSim, and OutGauge as appropriate, some enums specific to a single type of packet can be included in the corresponding packet directly. InSimRelay is handled directly by InSim.
Utility classes GISCamera, GISTime, and GISUnit provide functions to convert data and manipulate Godot cameras.
All packets containing physical values have additional, corresponding variables starting with
the gis_
prefix (e.g. gis_heading
or gis_position
as a Vector3(x, y, z)
). All gis_*
variables use standard units: m, s, kg, N, W. Speeds use m/s, angles use radians. When sending
such packets, you should prefer filling in the gis_*
variables, as they use consistent units.
They will be rounded to the packet's encoding precision. When creating a sendable packet, you can
choose to fill the packet's buffer from gis_*
values or from standard InSim values.
Demos
Demos showcasing some of GodotInSim's features are available here. The following images are from some of those demos.