4 ms·
I am not sure I am following. The game runs on windows, why not compile the add-in code directly for the single target? Is it for future proofing it in case MS
by whatever1 1y ago
I am not sure I am following. The game runs on windows, why not compile the add-in code directly for the single target?
Is it for future proofing it in case MS wants to release the game in a different platform that is not windows ?
- selectodude 1y agoIt runs on Xbox as well so I imagine they want the flexibility there.
- connicpu 1y agoWASM brings a memory sandbox that prevents out of bounds access to arbitrary pointers.
- pjmlp 1y agoThe only bounds that are checked is the overall size of the linear memory block, there is no bounds checking inside the same segment.
- hamburglar 1y agoIsn’t there ARM windows too? Not sure if flight sim targets that platform or not, but if so, making the extensions more portable is a win.
- JonathonW 1y agoBecause the game already also runs on Xbox and, given MS's recent gaming strategy (which is putting less emphasis on Xbox exclusives), could conceivably come to Playstation or maybe even Switch 2 in the future. On the Windows side of things, there's also a push towards ARM hardware (with current Snapdragon-based hardware actually performing pretty well). Not sure if Flight Simulator is currently ARM-native, but having the ability to go ARM-native is probably desirable at least as a long-term goal.
- potatolicious 1y agoSecurity is the big one. C++ DLLs have relatively free reign and are difficult to sandbox. With WASM you have a much stricter security model where the host program has full control over what APIs it has access to. The addons are developed by third parties that aren't Microsoft, so there's a serious risk of malware and other ways of getting the user pwned. The added future-proofing/portability is a nice bonus, but I suspect maybe not the main motivator.
- pjmlp 1y agoThe real security for add ons would be to use external processes with OS IPC, even if it is more resource intensive.
- pjc50 1y agoBut you'd also have to have an entire VM to run the separate process in, otherwise it still has access to the user's whole account and desktop. (unless UWP I suppose, which even Microsoft have kind of forgotten about)
- jon-wood 1y agoParticularly for something designed to run on consoles sandboxing of addons is basically a requirement. Microsoft are never going to allow random people on the internet to run unsandboxed code on the Xbox because that's a fast route to people jailbreaking the DRM on them. I suspect the fact this also limits the use of Flight Sim mods as a vector for malware on Windows is just a happy side effect.
- 01HNNWZ0MV43FF 1y agoIn addition to the sibling comments, you can sandbox WASM's CPU time. You can say after a certain amount of time that it has to yield back to the host. With native plugins, you might never get your OS thread back, and there isn't a good way to safely abort it and free memory and everything
- p_l 1y agoThere were already parts in MSFS 2020, namely gauges aka everything in cockpit that had more dynamic display, that used JS based SDK in order to provide sandboxing and safe level of control over performance (because with sandboxes VM it's easier to preempt execution)
- anonymars 1y agoPotentially related: a detailed write-up on creating a JavaScript autopilot/interactive webpage https://news.ycombinator.com/item?id=40267164 https://news.ycombinator.com/item?id=40267164
- dividuum 1y agoAlso it allows playing Flight Simulator inside Flight Simulator :-) https://github.com/s-macke/FSHistory/tree/master?tab=readme-ov-file#easter-egg-in-microsoft-flight-simulator https://github.com/s-macke/FSHistory/tree/master?tab=readme-...
- anonymars 1y agoDoes this still work?
- anonymars 1y agoDoes this still work?
- tapoxi 1y ago> Is it for future proofing it in case MS wants to release the game in a different platform that is not windows ? Strongly rumored to be releasing on PS5, like most recent Microsoft games.
- ethan_smith 1y agoWASM provides a secure sandbox with predictable performance across platforms while giving Microsoft the ability to maintain compatibility if they port to Xbox, cloud, or other platforms without requiring developers to recompile their add-ons.