7 ms·
Microsoft Flight Simulator 2024: WebAssembly SDK
- two_handfuls 1y agoThis is great news for WASM, and looks like the Microsoft team really put in a lot of effort! > In order to [move the addons API to WASM] without requiring a full rewrite of existing add-ons, a new platform toolset was designed for Visual Studio (...)
- diego_moita 1y agoThis is one of those ideas that makes so much sense that you'd ask why didn't it catch on before: WASM as a modules for all sorts of platforms It could become a competitor for a lot of existing technologies. Some examples: * embedded script languages (e.g.: Python in Blender and Gimp, Lua in games, VBScript in MS applications). * add-on modules (e.g. COM on Microsoft platforms or COM-like for non-MS) * finally, a run-anywhere platform? (what the JVM and .Net always wanted to be)
- tough 1y agowasm is the perfect abstraction to build a -modular- and pluggable codebase (say grpc/proto as contracts) so you can just swap any part of it as long as the wasm module abides to such contract. I keep going more and more to it when I try to design systems, in my mind at least, hoping I can put some to use
- euroderf 1y agoWasm "web components" should be helpful here.
- rafram 1y ago> finally, a run-anywhere platform? (what the JVM and .Net always wanted to be) WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world, so it isn’t an apples-to-apples comparison. WASI seems like it’s coming along nicely, but it has nowhere near the feature set of the JRE or .NET. Anything that even approaches that level of capability is going to run into the exact same bloat and platform compatibility problems that those runtimes did.
- johannes1234321 1y ago> WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world This can be quite an improvement for running add-ons from some arbitrary source. While, of course, an way to access defined resources is needed.
- rafram 1y agoSure, but your add-ons will need access to some of the world, which right now requires giving them access to all of WASI, as far as I know. There’s no permissions model. That’s worse than the JVM. (It seems like they want to implement one… someday. It’s vague: https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-capabilities.md https://github.com/bytecodealliance/wasmtime/blob/main/docs/...)
- flohofwoe 1y agoA game which uses WASM plugins for modding would define its own 'system interface', basically an extremely restricted API to only access moddable game features but not allow access to any 'operating system services'. It's very similar to how games would use a restricted subset of Lua which can only call into scripting APIs provided by the game, but not use random Lua stdlib features (like reading/writing files).
- euroderf 1y ago> JRE or .NET. Anything that even approaches that level of capability is going to run into the exact same bloat and platform compatibility problems Challenge has been accepted. Let's see.
- 01HNNWZ0MV43FF 1y ago> WebAssembly doesn’t include a system interface, i.e., any way to interact with the outside world I believe that's WASI, which builds on top of the base wasm spec: https://wasi.dev/interfaces#presentation https://wasi.dev/interfaces#presentation e.g. the WASI 0.2 spec here mentions clocks, filesystem access, creating sockets, etc. Lua is architected the same way - As host, you create a Lua VM with no I/O, and then the host decides which I/O interfaces the VM can or cannot see. JRE and .NET are probably built the same way internally. The reason wasm is hyped more than VMs with a decade of momentum behind them is that wasm is lower-level, it isn't tied to any particular GC model, and there's already backends for popular low-level languages like C, C++, Rust, and Go to compile into wasm modules.
- jahewson 1y agoIndeed, CloudFlare Workers does this. Would love to see more.
- esafak 1y agoJava applets say hello! Maybe they were just before their time, hobbled by slow computers, hard disks, and Internet connections.
- 01HNNWZ0MV43FF 1y agoThe tooling doesn't seem to be there to run C++ / Rust / Go / whatever efficiently on a JVM, too
- pjmlp 1y agoIt is there for C++ on the CLR, or IBM i, or TenDRA, or ...
- astlouis44 1y agoYep, pretty sure that is what companies like Dylibso are working towards, making software into modules underpinned by plugins that are powered by WASM: https://dylibso.com/ https://dylibso.com/
- breve 1y agoExtism is a plug-in framework based on WebAssembly: https://extism.org/ https://extism.org/
- pjmlp 1y agoBecause this idea has been done multiple times throughout the years with different kinds of bytecodes and VMs, since UNCOL in 1958, the WebAssembly folks just pretend they are always the first at something.
- naikrovek 1y agoI feel like everyone is trying to do things in the most inefficient way possible and it is starting to make me a little bit batty. WASM is awesome, but if I'm reading this right, they're choosing not to write DLLs so that they can create WASM modules which are recompiled into DLLs prior to runtime. I think our entire industry has taken banned-by-the-Geneva-Conventions, weapons-grade Stupid Pills. The only reason I can think of to do this, is so that you can't have arbitrarily malevolent code running in the DLLs that mod authors write. But we can't run the whole game in a sandbox such as a VM because of Nvidia GPU licensing disallowing virtual GPUs in consumer grade GPUs. If that's why this work is being done, some serious muscle needs to be used to twist Nvidias arm so that they stop being knobheads and start being part of the solution to security issues, instead of part of the problem. If I pay for that GPU, I should be able to issue work to it however I please. I should be able to split it up among VMs all day long without concern for anything Nvidia wants.
- Cieric 1y agoWhen the modding community is so heavily plagued with mods that are malicious in some way, I don't think having a modding api that can be safe by convention yet recompiled to be fast would be a bad idea. So while I'm not sure it was the smartest choice, it's not so inanely stupid as you seem to be putting it.
- diggan 1y ago> When the modding community is so heavily plagued with mods that are malicious in some way Is it? Granted, I'm a heavy mod user myself for various games, but only created mods myself for Cities Skylines and Cities Skylines 2 so I guess I know that ecosystem the best, and yes, there been a few cases of malicious mods, but "heavily plagued"? What ecosystem are you talking about?
- Cieric 1y agoMost recently in my memory it's been minecraft. There was a wave of mods that were stealing things like discord access tokens, I don't have clear memory on all of the cases that I've been through, just that I always try and verify all mods I can now. I think I remember one for Lethal Company and looking online I'm seeing some referenced for Dota 2, Sims 4 and Slay the Spire. Just learned Nexus mods is also pretty good about handling anything that's virus like, most of my modding experience has been external to that though.
- whatever1 1y agoI 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.
- shizcakes 1y agoI have about 1000 hours into MSFS2024 and am a mod for a streamer that has streamed many hours more. The gamer perception of this implementation is NOT positive. It crashes all the time, has massive performance issues, and generally is super negatively received.
- NikolaNovak 1y agoThx - any details as to why, tough?
- daviding 1y agoFor me most of the performance issues with MSFS24 are now being VRAM limited. When they went to MSFS 2024 they rewrote for DX12 and while doing that upgraded a few things to look nicer. The texture management still seems to need some work. This means that my 9800x3D/3080Ti 12GB sort of runs out of VRAM and pages when used in VR or 4K desktop. I'm in the position where the same visuals (scenery/aircraft etc) for MSFS2020 (using DX11) when compared to the newer MSFS2024 is just generally worse and a lower framerate. In VR a bad framerate makes things unplayable. For desktop use you have DLSS which helps a lot, but in VR that blurry movement really impacts clarity.
- thecosmicfrog 1y agoDLSS also blurs the cockpit displays quite badly when there's anything moving on them (airspeed/altitude tape, etc.). It looks like temporal blur, which is interesting because the same blur doesn't happen with their TAA (*temporal* anti-aliasing) implementation.
- daviding 1y agoYeah, DLSS looks great outside the window and for people enjoying GA and VFR it's all good. For airliners with digital displays it is harder to use, as like you said it blurs. They did talk about using some form of stencil/exclusion around cockpit displays but I think that didn't go anywhere as yet. As a team they have a pretty tough job because the audience is all of the place for a title like that, as in people with 'I can see my house!' being made happy vs 'My pressurization gauge cross-bleed reading is below the Boeing B738 manual official figure, unplayable'.
- thescriptkiddie 1y agoah shit, nobody told them that that one blog post about a future in which javascript is a universal ABI was satire edit: i might be thinking of this talk? https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- cpuguy83 1y agoYavascript
- affenape 1y agoFor something having 2024 in its name I expected a more consistent error handling, but guess what: * some functions like fsRenderCreate return 0 or 1 depending on the operation result; * some like fsMapViewCreate say that a value less than 0 is returned on error; * fsIOOpen says you should also consult with the fsIOGetLastError function on failure. Hope somebody considers adding the errno.
- boffinAudio 1y agoI dunno, I think I would've preferred Lua bytecode as a deliverable executable target, rather than WebAssembly. The tooling would be simpler, more efficient, and would allow a far wider ranger of interoperability with other engines.
- thecosmicfrog 1y agoOne of the biggest factors for any flight simulation add-on is performance, and so most of the major add-on developers are building C++ modules (compiled to WASM) to eek out as much performance as possible. My understanding is that it's also possible to write some things in JavaScript (and perhaps TypeScript), but performance takes a hit. I would assume Lua falls into that same performance trap, as I know Lua can be used for X-Plane add-on development, but it's (again) considered the less performance-centric approach as compared to C++. I recall at least one add-on developer for X-Plane (Zibo [1]) migrating some of their Lua code over to C++. [1] https://forums.x-plane.org/forums/topic/138974-b737-800x-zibo-mod-info-installation-download-links/ https://forums.x-plane.org/forums/topic/138974-b737-800x-zib...
- boffinAudio 1y agoLua can be quite performant, so this isn't really a thing, imho. Perhaps its just a matter of using familiar tooling.
- Dylan16807 1y agoLua source is better. Compiling is super fast and bytecode is very hard to prevent exploits in.
- Stevvo 1y agoThis is what it uses behind the scenes: https://github.com/innative-sdk/innative https://github.com/innative-sdk/innative
- CSMastermind 1y agoI was recently thinking about the most influential games of all time. I think there's a good argument for Flight Simulator to be in the top 100.
- avazhi 1y agoGraphics are good but as a flight simulator it’s awful, in particular its (non) simulation of fluid dynamics. X-Plane has the opposite problem. At any rate with their budget Asobo are underperforming with this thing. 2024 in particular is enshittification 101.
- jon-wood 1y agoIs it "awful" though, or is it just not quite as accurate as X-Plane? Because I've seen a far few videos from actual pilots of various aircraft playing Flight Sim 2024, and generally what they say is that while it's not the same as flying the real thing (mostly because of the lack of feedback for things like trim adjustment) it's pretty damn close. Just because that was achieved by writing specific models for each aircraft rather than full fluid dynamics simulation I don't think that makes it awful.
- pkilgore 1y agoPersonally I play a lot of 2020 not because I even care much about perfect flying physics, which I can get over and will never feel like actually flying which happens a lot by feel particularly in vfr. But rather, as extremely cheap avionics and prodecures practice, which 2020 does a mostly good job of if you pretend to be your own controller or use vatsim. I also have a mod that gets my plane's power curve mostly right which is good enough for most IFR practice.
- ingen0s 1y agoWell now, thats progress.
- reactordev 1y agothe career mode kid play is what killed the franchise for me
- leetrout 1y agoIf they had actually taught / allowed actual procedures it would have been better for me. I think they did a great job focusing on the important parts of flying for the missions and such but things like ATC telling you to land on one run way and the visual assists leading to the wrong runway are terrible. My big pet peeve is unrealistic ground ops and rules where it is legal and expected to exit a runway and enter a taxi way you will randomly get dinged for entering a taxiway without permission (at smaller towered and towered fields).
- reactordev 1y agoIf they were serious about it, they would have a “check-ride” mode that lets you skip all that. I know how to fly, but they gate keep that 737 passenger missions behind a god awful amount of hoops. At least with fseconomy you can reach out to loan sharks to get a loan for a beat up 737