The original X-Plane Multiplay Library is the work of many fantastic people, with Ben Supnik, Chris Serio, and Chris Collins appearing in recent files and documentation. But the origins date back to 2004, and very likely many more were involved. Thanks to all of them!
This complete re-implementation honours all the basic concepts (so I hope) but makes use of now 3 modern X-Plane 11 concepts:
Thus, it ports the idea of the library also into the times of Vulkan and Metal when the drawing mechanisms used by the original library no longer work.
At the same time, using instancing marks basically all parts of the original rendering code
of the library outdated...it is basically replaced by one line of code calling
XPLMInstanceSetPosition
.
Concepts like the syntax of the xsb_aircraft.txt
file or certainly the idea of an
multi-pass matching to find a good model are retained, though re-implemented.
XPMP2 does no longer call any OpenGL function and hence does not require to be linked to an OpenGL library. The included XPMP2 Remote Client and XPMP2-Sample applications do not link to OpenGL.
Despite its new approach, XPMP2 shall be your drop-in replacement for libxplanemp: The original header files are still provided with the same name. All original public functions are still there. The original XPCAircraft class is still there, now derived from XPMP2::Aircraft. See here for more details.
If you don't want to build the library yourself you can find archives with headers and release/debug builds in the Release section here on GitHub.
Available, and should be rather reliable now. No (major) bugs are known. Future development can certainly extend functionality while trying hard to stay backward compatible.
The XPMP2 library has been successfully tested with
XPMP2-Sample
plugin,...on requirements, API, building, deployment, TCAS target, CSL mode dataRefs and more is available in the GitHub pages.
The separate Public Template repository XPMP2-Sample
provides a complete
plugin including build projects and CMake setup and can be the basis for your plugin project.
It displays 3 aircraft flying circles in front of the user's plane.
Each of the 3 aircraft is using a different technology:
the now recommended way of subclassing XPMP2::Aircraft
, the legacy way
of subclassing XPCAircraft
(as used by LiveTraffic v1.x), and by calling
standard C functions.
The HowTo documentation includes how to install the sample plugin, especially also CSL models.
The way how XPMP2 picks any of the available CSL models for display is documented here.
CSL packages come in different flavours. Popular ones for general use are
the Bluebell and the X-CSL packages. Both come with different history.
For XPMP2 to use all their features (all liveries, turning rotors, props, wheels...)
it needs to adapt their .obj
files. Performing these changes is built into XPMP2,
details here.
XPMP2 offers a wide range of animaton dataRefs that can be used in CSL models, details here.
XPMP2 provides TCAS blibs and AI/multiplayer data using TCAS Override introduced with X-Plane 11.50 Beta 8. Find details here including a reference lists of provided dataRef values and their sources.
When TCS Override is not available (like up to X-Plane 11.41), then TCAS is provided by writing the classic multiplayer dataRefs directly.
Beyond the standard set of information by X-Plane's family of dataRefs, XPMP2 also supports a set of shared dataRefs for providing textual aircraft and flight information, details here.
X-Plane 12 started to
support wake turbulence
also for TCAS targets. As a trade-off between complexity (knowing exact
wing dimensions and weight/lift of any plane) and results (strength of the wake)
XPMP2 applies defaults to the aircraft dimensions based on the
Wake Turbulence Category (WTC) listed in the Doc8643
data.
A plugin using XPMP2 can opt to provide its own values for even more precice results.
Find more details here.
All displayed aircraft can produce sound in the 3D world for engine, reversers, taxiing, gear and flap movement.
There are 2 options:
.WAV
sound file formats.Because of the FMOD licensing requirements, XPMP2 by default is built without FMOD library support, but always supports X-Plane 12's internal Sound API out of the box.
See the Sound Support documentation for details how to enable sound support and how to include it into your plugin.
XPMP2 creates an additional layer in X-Plane's internal map, named after the
plugin's name. This layer displays all planes as currently controled by XPMP2
with an icon roughly matching the plane type, taken from Resources/MapIcons.png
.
Planes displayed using XPMP2 can by synchronized across the network. The included XPMP2 Remote Client needs to run on all remote computers, receives aircraft data from any number of XPMP2-based plugins anywhere in the network, and displays the aircraft using the same CSL model, at the same world location with the same animation dataRefs.
This supports usage in setups like
For end user documentation refer to LiveTraffic/XPMP2 Remote Client documentation.
For more background information refer to GitHub XPMP2 documentation.
One of many possible setups: