You’re cherry-picking sentences, please don’t do that…
Use Simconnect and an external executable. You can do what the API/protocol allows you to do. The CPP/WASM gauge is currently only for display in the game. WASM is perfect for that. Apparently Asobo/MS wants to keep the low level access for themselves in this stage. Can’t blame them for that. Suppose they want to update some part… incompatible WASM will raise an exception (a single exception) and the simulator will just show a back gauge in your cockpit. Unmanaged code in a DLL could cause CTD’s or seriously impact your installation or harddisk content, when something goes wrong. Especially when you give it file access.
Ok so you expect me to rar the archive, use flat files list and sort it on file extension to check for DLL’s and executables ? For me that may work fine (and I do that !) but I think 90% of the MSFS customers don’t have any idea what rar files and flat files lists are. Let alone they are aware of the difference between sandboxing and unmanaged code.
Sure. There will neverever be something wrong with unmanaged external machine level 64-bit code, because some vendors have allowed it for 20 years… I don’t buy your argument, Cristineagu…
I’m not cherry picking sentences. I am telling you exactly what i’m replying to. A blob of a response aimed at another blob of text is hard to keep track of.
What if i’m making a GPS unit? People working on the widely used GPS units have already said that they have flaky access to the internal FS navdata, and that they cannot use the Navigraph database cause they cannot access files outside of the sandbox. They have also expressed difficulty with flight plans, since you cannot simply save a flight plan to a folder and load it up. Then you have the GPS units based on Garmin trainers which aren’t technically possible because of these limitations.
There are a lot of gauges that need to both display data and access the file system.
True. We can’t blame them for that. It is their platform and we made a choice to buy into it. Fair enough. But we do get to suggest better alternatives. They are not contractually obligated in any way to take advice from us, so i do appreciate it when they do.
This is wildly exaggerated. You are assuming every single dll addon is malicious or incredibly badly written. This has never been a problem historically.
No. I would expect you to install addons from the marketplace. And if you’re currently installing addons from shady sources that don’t verify the validity of files or don’t have a place for users to report problems so you can see if the addon is going to work, i’d be more worried about malicious software in the archives themselves than for badly written code.
So they should do the same thing they’re doing with everything else on the internet: use trusted sources.
Like i said, this has not been an issue in the past two decades.
A proven track record is much more valid than bringing up issues that have never existed. The internet is filled with all sorts of malicious software. Yet somehow people manage to steer clear of it just fine, by using trusted sources and antivirus software. This isn’t something particular to flight simulation. In fact, flight simulation makes this harder. Having malicious code run inside FSX or P3D that does bad things is a much harder thing to do than simply packing malicious code straight into the archive.
I could proceed this debate, Cristi… but I’m gonna take a flight, this is my free day. Meanwhile I suggest to Google on FSX and P3D issues with DLL’s, before you state there is a “proven track record” and issues cannot happen. FSX opened up indeed, P3D is a modular system that needs DLL’s, but it has professional customers prepared to pay tenfold the amount we pay now. MSFS is not Windows, or .NET general and documented platform. It is an application program. You will (probably never) be allowed to run threads, that is code running in parallel. The risk of crashes in-flight is simply too big. It may one day become appropriate to open files via WASM, they can switch that on. As well as requiring signed DLL’s… which would exclude many hobby developers to mess up things.
The Aerosoft CRJ comes with its own standalone NAV database (the same one used with the P3D version), which exists as a series of text files. Accessing the data on disk is not a problem - the only proviso is that the database must be contained in a sub folder of the main aircraft installation folder. It can also read externally generated simbrief flight plans as long as they are placed into a folder that the aircraft has access to.
Hey all, these fruitless discussions will never end unless we find a common voice or the basic requirements we as third party devs need to be fullfilled for a sucessful implementation of our ideas. Pls sit back, relax and bring up pretty clear and reliable requirements like i.e.
Opening the WEATHER up to 3rd party developers.
Opening up ATC to 3rd party developers.
Create a more robust flight model or limited number of flight models
Create a more reliable airport, scenery, helipad and material development toolset
This is not the time for endless discussions, this is a time of basic positioning, defining borders.
So pls write less with more content and be as exact as possible. Nobody is able to read this all. Contribute with quality not quantity!!!
you are right! well, I stick one more line in this thread, I just wrote my point of view without specifics SDK Q&A Stream Feedback - #21 by ImDrako2132, I’m not a developer, just expressed my feeling hoping that others share it to change conduct, but I think it is lost for now.
Indeed it is not a problem in itself, and the reason they include their database IIRC is because they can’t access the FS2020 database using the SDK. In other words, when you’ll have a dozen aircraft each one having its own local database, this will be a dozen set of files to keep in sync and update too.
There remain a problem though: because the WASM sandboxed code is only given the permission to accessing a local sandboxed folder with write access just for this WASM sandboxed code, this further limits one of the strength of any other simulator: mixing add-ons.
This is one of the most fundamental architectural principle impairing creativity in my opinion and this is what I’m alluding about with this statement. And there is a reason for this: the SDK inherits the mindset of the past, which is the mindset ACE developers had when they initially build the SDK for internal use which they later opened partially to the public as the official SDK. Here is what I mean by this:
In the Q&A they are saying FS2020 is a platform like Windows, and the add-ons are the applications like Word. This is not true nor representative to me. If I’d keep the same analogy, here is what it would be instead:
FS2020 is Excel
add-ons are Excel documents.
add-ons can only use the limited set of programing functions included in Excel.
the set of programing functions available are those selected for an Excel purpose only.
you can only mix documents if you copy/paste the content of one document into the other, creating a new tab for example.
when you do, you risk formula conflicts and non-working references to the other document.
an Excel document is no more than what the Excel developer thought it could ever be.
as a 3rd party Excel document author, you can never make an Excel document be something else than what it is, a document.
if the Excel programmers are only working with 3rd party document authors doing financial amortization documents, they won’t include statistical functions.
those wanting statistical functions are not listened to nor engaged with because Excel is only sold to financial people.
X-Plane/Prepar3D are Python runtime
add-ons are Python program.
add-ons can only use the limited set of language functions included in Python.
add-ons can extend the set of functions with the use of 3rd party libraries. They can even develop their own libraries to extend the language and use the resources available in the underlying operating system.
a Python program can be many different things the Python language inventor(s) couldn’t ever have imagined their language could or would do.
as a 3rd party Python program author, you can make your program anything you’d like it to be.
P3D Python is offering more functions but at a higher abstraction level (Say DrawCircle() )
XP Python is offering less functions but at a lower level (Say MakeVertexBuffer(), DrawVertexBuffer() ).
the runtime doesn’t need to provide a function for everything, just the minimum necessary for the language to be Turing complete. If it is, they don’t need to custom implement a new function because 3rd party Python program authors can do their own.
This specific Flight Simulator SDK vision consisting in “an aircraft is the container” (the document analogy above) is very strong. In practice I find this is reducing the scope of the gauge and system SDK in my opinion, and I can clearly see this impact already in current FS2020 add-on developments. For example:
It is hard to add a 3rd party gauge in any aircraft, like the G1000 WT gauge. You can’t add the gauge in any of you aircraft easily because this requires changing the aircraft container because the SDK vision is a self-contained entity, the aircraft, rather than a composable set of modules.
If you do find a way to add the G1000 WT gauge, you risk conflicts with the aircraft autopilot system, because both can only assume, in their own right because of how the SDK is imposing this on them, they are the sole entity in the aircraft controlling the autopilot.
yourcontrols add-on requires the other add-on to publish its own list of L:vars so that it can use them for interactions. It would be much easier with introspection APIs and a modern (i.e. non inherited from FSX) event system* (1)
These are just a few examples which are equality applicable to other simulators:
to P3D for similar FSX inherited vision in the SDK (L:vars for events, aircraft container vision), but at least P3D is offering much lower level features and is not sandboxing add-ons so that 3rd party developers can make solutions to addressing this.
X-Plane on the other hand is not suffering any of these, because the SDK is supporting in its very structure and feature set the composable modular concept vision. It is a much richer environment for developing add-ons even if the set of functions is much smaller in number, because they are lower level and therefore they are enabling more.
In my opinion I find the idea to lower the entry barrier to developing add-ons for FS2020 with JS/HTML and the in-sim SDK tools commendable and good for the franchise. I really think this is good this time with the choice of technologies they are using in FS2020, whereas I never thought this was good before with the “XML Scripting Language” which was at the time meant for this.
However, delivering this idea of a lower entry barrier in using higher abstraction constructs, shouldn’t be an excuse to not delivering lower and less abstracted constructs to more experienced developers wanting to do more than what the higher abstraction constructs is provisioning for.
A good example of this to me is the drawing API. At last, Flight Simulator SDK is offering a low level basic but sufficient vector drawing API and a bliter. This is the Asobo Drawing API, very simple, to the point of building vertices and drawing the path and no need for more (2). They also include in the SDK a nanoVG implementation using this low level drawing API. On top of which they are also including in the SDK a GDI+ implementation wrapping the nanoVG implementation in a thin layer. (3)
So if the GDI+ abstraction thin wrapper ontop of NanoVG ontop of Asobo low level graphics API was good enough for the CRJ and for Microsoft/Asobo to allocating development resources just for this, why shouldn’t the same approach be more widespread for the rest and the other type of add-ons or for other add-on vendors? In other words, there is a need for high level abstraction in order to lower the barrier of entry for sure, but there is also a need for lower level API to directly interact with some deeper entry points into the simulator itself, like in other simulators. In my opinion these are really essential to making FS2020 something greater as a platform than a spreadsheet for financial analysts.
But even before going all the way to this route, there are some very basic fundamental constructs which could rapidly and not disruptively be greatly enhanced. We’re detouring the code from FS9 to P3D5 in order to support these few core concepts and to augment the core simulation capabilities (we don’t need to in X-Plane), and I’m not talking millions lines of codes either. These are very light weight very specific augmented capabilities extending their usefulness to any add-on and could help solving some of the inter-gauge and inter-aircraft mixing and communication problems existing in the FS2020 SDK carried over from the FSX area SDK.
(1) In the X-Plane world, an event is a first class citizen, with a name, any other add-on can discover and trigger, and even intercept and transform. This applies both to stock events and runtime created events by add-ons. Furthermore, X-Plane is encouraging the practice to use path delimited names so that it makes it easier to categorize and lookup events. Add-on created events and stock are therefore displaying side-by-side in a coherent tree view in the GUI for example. Any hardware device can also bind to any stock or add-on event created at runtime because they are at the same conceptual level.
In the FS world however, an event is either a number or a stock name. The number type of event is one feature inherited from the past which is perfectly illustrating that the SDK is not designed with multiple add-ons from multiple sources mixed together from the get go. In effect when you mix another 3rd party add-on, you can’t know whether the other add-on is using the same numbers as you. The named type however is limited to the stock SDK event list. The naming convention is also confusing with a some events adopting a noun+verb and others a verb+noun approach. Even in the same category, events can have disparate names and this is due to successive teams adding events with each new FS version. There is no provision for 3rd parties to create their own named events and therefore, there is no way to publish events other add-ons could consume.
This last point is illustrating the founding concept of an aircraft is a sole container, because there is no provision in the SDK to accommodate mixing add-ons. And this has some serious consequences in practice: because there is no event system, gauges are forced to use L:vars as a substitute. The problem is L:vars are meant to store data add-ons can read and write only, and they can read and write the data when it is their turn to do so. In other words, say you have an add-on publishing an L:var to let other add-ons writing 1 or 0 to “trigger” an event. If the other add-on is triggering the event twice during its turn, the publishing add-on will only see 1 event, the last one written in the L:var. A proper event system requires a FIFO queue and an L:var is only a 1 item FIFO.
(2) They are not documenting whether this is CPU rendering (Asobo, SKIA, Blend2D?) or GPU rendering (Asobo, CoherentGT, SKIA?) though.
(3) I understand they spent the time and allocated resources to implementing the GDI+ layer so that it makes it easier for their 1st party partner to release the CRJ quicker with less effort porting the existing FSX drawing code, but I can’t help thinking 3rd party developer doing WASM gauges should have had only 1 choice, which is implementing their own abstracted drawing API on top of the Asobo low level drawing API. We still can hopefuly, but I feel the SDK GDI+/nanoVG now standard has a catch: not only this is creating technical debt with an old graphics API now in the SDK, but because it is now included as standard, many 3rd party developers with legacy GDI+ code might choose to just use this instead of redoing the drawing code. My experience with add-ons is 80% of the CPU resources most gauges are consuming in airliner add-ons are graphics related, and I can’t help thinking both the nature of the GDI+ abstraction in itself (there might be more efficient abstractions than those of GDI+) and their implementation in the SDK (it is WASM code on the CPU running the thin wrapper around NanoVG on the CPU, which is a heavy wrapper around the Asobo drawing API) is not the fastest way, and therefore, add-ons using the “easy porting way” will continue using more resources than necessary and will continue affecting the simulator performance.
Ideally all databases should be the same no matter what the source. As long as the database is based on the current AIRAC cycle, it should not matter whether the database comes from LIDO, Jeppesen or NavBlue. The database is supposed to reflect the real world, based on the latest data from government AIP sources. This would be no problem if the sim’s default NavBlue database was current and accurate, but at the moment it is not. Missing procedures are aggravating, but that can happen even with real-world AIRACs - sometimes due mainly to FMS memory constraints - especially with older hardware.
But the cardinal sin for a real-world navigation database provider is having obsolete information, and NavBlue’s MSFS database has many RNAV named waypoints that were removed from the US National airspace system years ago.
For myself, I use Navigraph both for the core sim nav data (overriding NavBlue), and for the CRJ. It would be great if all aircraft in MSFS could simply use the provided free NavBlue database for all navigation, but unless NavBlue gets its act together, I don’t see that as a viable option.
If only @CptLucky8 could spend more of his time discussing these subject DIRECTLY with ASOBO, rather than having to post them in the Forum, hoping that Asobo may read them – but never receiving any reply of acknowledgement - as it is a “one way” communication.
**What a wasted resource of FS Knowledge
MSFS could be so much better if ASOBO were to communicate directly with @CptLucky8
I would very much like to see a technical Q&A were @CptLucky8 was the Technical Host, talking to the ASOBO SDK team
Very true. One of the most knowledgeable people on this forum. One really has to wonder why Asobo would not reach out to someone that has so much to offer?
@Jummivana Has Asobo taken notice of @CptLucky8 yet? Are there any plans to reach out to him, considering the vast amount of technical information he has already shared on these forums? Why is someone this knowledgeable and willing to help being so consistently ignored by Asobo, especially considering he has reached out via the official channels?
Meanwhile, all we can do is upvote this: Reality-XP
There is a absolutely large amount of information, but much of it makes a number of assumptions that don’t necessarily track.
The reality here is that named events already exist, they’re H events. Could they be more discoverable? Yes, that is known. Could a control system on top of all this be more abstracted? Yes, that is also known and is being worked on as we speak. We are also talking daily about how to evolve the API away from only being heavily var based. So, we have a pretty good awareness of those kinds of limitations, although it should be known that most of the third parties that exist in the simulator sphere at the moment are more heavily weighed towards wanting things to be as they are. For example, the reason the GDI+ API was brought forward was because third parties demanded it intently.
I share Jean-Luc’s personal opinion that some of these things should be effectively deprecated but that isn’t the majority third party view and they need to be supported. So we have to balance everyone’s interests. My goal is to democratize development, especially on the JS side, but it’s going to happen over the course of the year, and not instantly.
The general thrust of many of the comments is about building DLLs and getting direct GPU access. Those things are not on the roadmap. The sim API is not designed to use the sim as basically a glorified graphics engine or hook in arbitrary native code. Those things are just not in scope, due to sandboxing and security, and the team’s position on that is unlikely to change.
If folks have specific graphics API requests and examples of things that are impossible to draw at the moment, then those would be good to bring forward. But presently, and I know it’s disappointing to some, direct hardware access in the form of arbitrary native code loading and/or GPU access is not coming.