Jump to content
Sign in to follow this  
mSparks

Another XP12 preview drops

Recommended Posts

29 minutes ago, BiologicalNanobot said:

In short WASM is an instruction set, just like x86-64, ARM or any other instruction set.

Err, no?

WASM is an assembly language that compiles to javascript bytecode, but it is not the native instruction set, so, in exactly the same way lua or java bytecode it is run into a virtual machine which converts those bytecodes into native bytecode.

31 minutes ago, BiologicalNanobot said:

Other than that compiling for WASM is no different than compiling for x86-64 or ARM

exactly, none of the advantages of actually using a VM (live code code updates, no compilation requirement, detailed stack traces that match exactly the code you feed into the VM, code that runs "as is" on every piece of hardware from texas calculators to Top500 supercomputers)

All the disadvantages (slower than native, limited by the capabilities of the virtual machine rather than the hardware it runs on, time loss from compilation requirements, first to WASM then to bytecode, mandatory unit tests (fbw github) for every little detail because that is the only way to track down the source of any issue.

44 minutes ago, BiologicalNanobot said:

into x86-64 code using inNative and caches the results

WASM compiles to javascript bytecode, that goes into javascript VM which does all the magic turning that into native code, some of which will be GPU related, not just x86_64.

webassembly-101-bringing-bytecode-to-the-web-1373.png

Only instead of a "web browser" its MSFS or XP12.

Source:

https://www.fortinet.com/blog/threat-research/webassembly-101-bringing-bytecode-to-the-web

49 minutes ago, BiologicalNanobot said:

This is an X-Plane 12 thread not MSFS

Actually, its more an "A320 XP12 tubeliner thread".

Which more than covers "making an A320 tubeliner", of which there is a lot of existing, reusable code out there already, in the FBW github.

Definitely wouldn't recommend doing it the C/C++/Javascript way when starting a project, also wouldn't recommend reinventing the wheel when you can pick up over engineered wheels for free from your friendly neighbourhood URL.


AutoATC Developer

Share this post


Link to post
Share on other sites
2 hours ago, mSparks said:

You, Totoritko plus 1 or two people with the actual CL650 to get 3 or 4.

Pilots are not developers.

2 hours ago, mSparks said:

I forgot Cameron, but he mostly seems to count against you, so yes, back to 2

You can't help it, can you?

Share this post


Link to post
Share on other sites
12 minutes ago, mSparks said:

Only instead of a "web browser" its MSFS or XP12.

Only in their case, they transpile it back to x86 and store the transpiled result into a DLL cached on the drive here:

%LOCALAPPDATA%\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages

The resulting native code is not dissimilar to what you'd get when recompiling the "WASM to C" output.

But you are right the code not taking advantage of any available hardware specific features (no SSE, no AVX, no GPU etc...) just bare bone x86 opcodes and convoluted indirect access to any memory locations and to any function invocation.

Edited by RXP
  • Like 1
  • Upvote 1

Jean-Luc | reality-xp.com
This message from Reality XP is protected by a disclaimer: reality-xp.com/aboutrealityxp/email.html

Let your voice be heard and help us make a difference for you: Vote !
Open up communications with Reality-XP (Microsoft Flight Simulator Forums)

Share this post


Link to post
Share on other sites
24 minutes ago, mSparks said:

Err, no?

https://webassembly.github.io/spec/core/intro/introduction.html?highlight=isa#scope

From WebAssembly specification.

24 minutes ago, mSparks said:

WASM compiles to javascript bytecode, that goes into javascript VM which does all the magic turning that into native code, some of which will be GPU related, not just x86_64.

webassembly-101-bringing-bytecode-to-the-web-1373.png

This is how WASM is usually implemented, so you are right in that regard, but it is implemented completely differently in MSFS. MSFS uses inNative to directly convert WASM binaries into x86-64 binaries ahead-of-time using inNative: https://github.com/innative-sdk/innative

Also mentioned in MSFS SDK documentation:

spacer.png

This means some of the disadvantages you mentioned ("slower than native, limited by the capabilities of the virtual machine rather than the hardware it runs on") do not apply while the rest, especially "time loss from compilation requirements" do apply. In fact this is why some MSFS aircraft take several minutes to load for the first time, the ahead-of-time conversion from WASM to x86-64 is rather slow. It also makes debugging a nightmare.

There are a few other reasons that if I had to choose between developing for MSFS or X-Plane for rest of my life, I would choose X-Plane without thinking for a second. But your understanding of how MSFS works is not correct.

Edited by BiologicalNanobot
  • Like 2
  • Upvote 1

PC specs: i5-12400F, RTX 3070 Ti and 32 GB of RAM.

Simulators I'm using: X-Plane 12, Microsoft Flight Simulator (2020) and FlightGear.

Share this post


Link to post
Share on other sites
8 minutes ago, RXP said:

But you are right the code not taking advantage of any available hardware specific features (no SSE, no AVX, no GPU etc...) just bare bone x86 opcodes and convoluted indirect access to any memory locations and to any function invocation.

This is true, it is completely left to inNative to decide on using hardware specific features during transpilation, us developers have no control over it. As far as I know inNative tries to take advantage of SSE and AVX, but it is still not as good as having direct control over these features, which allows for really fast libraries such as https://github.com/xtensor-stack/xsimd

Edited by BiologicalNanobot
  • Like 1

PC specs: i5-12400F, RTX 3070 Ti and 32 GB of RAM.

Simulators I'm using: X-Plane 12, Microsoft Flight Simulator (2020) and FlightGear.

Share this post


Link to post
Share on other sites
7 minutes ago, RXP said:

Only in their case, they transpile it back to x86 and store the transpiled result into a DLL cached on the drive here:

%LOCALAPPDATA%\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages

The resulting native code is not dissimilar to what you'd get when recompiling the "WASM to C" output.

But you are right the code not taking advantage of any available hardware specific features (no SSE, no AVX, no GPU etc...) just bare bone x86 opcodes and convoluted indirect access to any memory locations and to any function invocation.

Lua has something very similar, you can just use it "when ready".

https://www.lua.org/manual/3.2/luac.html

Chrome does exactly the same with V8

https://v8.dev/blog/wasm-code-caching

The core/these plugins still run against the Javascript VM though, with any hardware related access through the VM rather than by native calls, which is why WASM has no parallel to FFI.


AutoATC Developer

Share this post


Link to post
Share on other sites
3 hours ago, GoranM said:

Pilots are not developers.

Way to insult me and Janov, and probably at least half the other XP developers 🤣

The point is, they worked with you, providing their expertise to develop the aircraft, and you couldn't have done it without them. Just because they were paid in kind doesn't mean they deserve any less credit for the time they put in to developing the aircraft.

3 hours ago, GoranM said:

You can't help it, can you?

Nope.

Edited by mSparks

AutoATC Developer

Share this post


Link to post
Share on other sites

Stay on topic and leave out the baiting. There are many people who wish to discuss this in a mature way.

  • Like 3

Ray (Cheshire, England).
System: P3D v5.3HF2, Intel i9-13900K, MSI 4090 GAMING X TRIO 24G, Crucial T700 4Tb M.2 SSD, Asus ROG Maximus Z790 Hero, 32Gb Corsair Vengeance DDR5 6000Mhz RAM, Win 11 Pro 64-bit, BenQ PD3200U 32” UHD monitor, Fulcrum One yoke.
Cheadle Hulme Weather

Share this post


Link to post
Share on other sites

Looks like several on here are masters at baiting! 🤔

  • Like 4

Charlie Aron

Awaiting the new Microsoft Flight Sim and the purchase of a new system.  Running a Chromebook for now! :cool:

                                     

 

Share this post


Link to post
Share on other sites
On 2/1/2022 at 3:18 AM, Zangoose said:

One of the areas I hope we see some improvement is the ground textures - They just aren't good compared to the other sims. I guess with P3D there is the Orbx global range which is missing from X-Plane apart from certain areas such as the UK. I suppose there is Ortho but that takes time a lot of storage space to get setup. Or at least a product that can deal with it with ease.

Fly study level aircraft and you won't have time to look at the ground if you are using RW practices in your sim flying. I found that out when I started flying A2A planes. They are not on rails. You actually have to fly them. You can also break the engine to if you don't do it real.

Share this post


Link to post
Share on other sites

And when you do have the time to glance outside, you will hopefully see vegetation with accurate seasonal colors, water with accurate color and waves, cities, ports and industrial areas placed as per real location, etc.

Share this post


Link to post
Share on other sites
7 hours ago, Gary1124 said:

Fly study level aircraft and you won't have time to look at the ground if you are using RW practices in your sim flying. I found that out when I started flying A2A planes. They are not on rails. You actually have to fly them. You can also break the engine to if you don't do it real.

I don't really think thats a reason why a simulator in these day and age should have bad ground textures.

Edited by Zangoose
  • Upvote 1

Matt

Vote for better camera support in MSFS: https://devsupport.flightsimulator.com/t/camera-api/3077/29

Share this post


Link to post
Share on other sites
1 hour ago, Zangoose said:

I don't really think thats a reason why a simulator in these day and age should have bad ground textures.

Of course no one is advocating that a simulator should strive to have bad ground textures 😅. We have discussed this very subject roughly 100 times since MSFS came out.

We all mostly agreed that having great scenery that looks like the real world as much possible is desirable for every simulator, but different simulator companies have different resources and also different priorities - thats why some simulators have nicer scenery than others.

What Gary was saying (I think) is that different types of flying have different demand for great scenery. If you fly for sightseeing, flying over a uniformly green flat pane would not be satisfactory - if you train IFR procedures, you would actually not need any scenery at all. Not even taxiways.

Before I get misunderstood (on purpose 🙄) by the usual suspect, I want to add and emphasize that having superb scenery does not preclude training IFR procedures at all.

  • Like 2
  • Upvote 2

Share this post


Link to post
Share on other sites
7 minutes ago, Janov said:

Of course no one is advocating that a simulator should strive to have bad ground textures 😅. We have discussed this very subject roughly 100 times since MSFS came out.

We all mostly agreed that having great scenery that looks like the real world as much possible is desirable for every simulator, but different simulator companies have different resources and also different priorities - thats why some simulators have nicer scenery than others.

What Gary was saying (I think) is that different types of flying have different demand for great scenery. If you fly for sightseeing, flying over a uniformly green flat pane would not be satisfactory - if you train IFR procedures, you would actually not need any scenery at all. Not even taxiways.

Before I get misunderstood (on purpose 🙄) by the usual suspect, I want to add and emphasize that having superb scenery does not preclude training IFR procedures at all.

I never really mentioned that they should go down the same route as MSFS and use Bing/Google data - That is not what I'm implying, You can actually get better looking ground textures in P3D compared to X-Plane by installing addons such as Orbx Global and Landclass - Something that is missing/lacking in the X-Plane world unless you go down the route of Ortho but that does have it's limitations for "Global" coverage. A nice upgrade to the default textures would be ideal for the next version of X-Plane regardless of what you are flying. I'm not expecting MSFS quality but anything is better than no upgrades at all.

Simply saying to fly specific aircraft so you don't have to look outside the window and look at the textures is a ridiclous statement.

Edited by Zangoose
  • Like 1
  • Upvote 1

Matt

Vote for better camera support in MSFS: https://devsupport.flightsimulator.com/t/camera-api/3077/29

Share this post


Link to post
Share on other sites
27 minutes ago, Zangoose said:

Simply saying to fly specific aircraft so you don't have to look outside the window and look at the textures is a ridiclous statement.

You are right of course, it's completely ridiculous. Always makes me wonder why real aircraft have windows in the first place when it's actually not possible, not necessary™ to look out of those...

 

Edited by rka

Laminar Research customer -- Asobo/MS customer -- not an X-Aviation customer - or am I? 😉

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...