Thanks to Marcin to have provided us with such valuable tool ! It opens a new era for FSX/P3D add-on developer.
- CEO of SIM SKUNK WORKS
Microsoft Flight Simulator X and its successor Prepar3d provides open architecture and there are many third parties adds-on. However most of the sophisticated add-ons are built with demanding C++ code which requires high level time consuming development skills. Nowadays, HTML5 standard provides a nice way to build rich UI environment without employing a lot of coding, however it is not open for FSX adds-on development. WebSimConnect framework fills the gap by proving an interface that enables the developers to build their FSX/P3D add-ons powered by HTML5 features. When using WebGL as part of HTML5 standard, the content rendering is GPU hardware accelerated whenever possible.
In order to employ HTML5 for FSX
content you need 2 components:
The Rendering component is the one that allows to define the content in HTML5 mark-up language and display that content in the simulator. The Controlling component is the one that allows you to link the HTML code with the simulator by providing simulation data from the Sim into the webpage.
There are 3 Rendering components
There are 3 Controlling Components:
WebSimConnect framework provides
one additional component:
HTML5 content can be stored in
many ways. It can be stored as a strings in the C++ code, text resources in the
add-on DLL or can be stored in the files. Single HTML5 content is often divided
in many files (images, scripts, css files, etc). In such cases it is convenient
to host the files on http server. WebSimConnect framework comes with very light
http sever implementation that allows to host files via http:
Please note, WebSimConnect.exe http server can be automatically launched and automatically shut down when the aircraft is loaded/unloaded. It is done using WebSimData gauge by providing simple configuration. It is convenient way for the user who does not have to lunch and close the server manually.
X-plane 10, 11 architecture
The architecture of X-Plane 10, 11 components is much simpler as X-Plane SDK has different plugin system for integration. It has no XML gauges concept and WebSimTexture is not needed as the rendering is done through Open GL library. Basically the rendering component and controlling component is merged into single X-Plane plugin called WebSimGaugeX. It can be used as global plugin (residing in resources/plugins folder) or specific to an aircraft and copied into plugins subfolder of the aircraft. The controlling sub-module of the WebSimGaugeX plugin can be used either with the C++ API encapsulated in IWebSimClient class or through custom DataRef which are mapped to the same C++ functions. WebSimBrowser and WebSimSocket are the same binaries as for FSX/P3D. Windows and Mac versions (64 bit only) are supported.
You will find the details of API integration in the documentation provided in the SDK.