Pivot back to WebAssembly-based Udon 2
Not__Shadow
It was announced on yesterday's developer update that Udon 2 had been scrapped for "Soba". Based on the information we have been given, they're making the equivalent to Udon 1.1.
In the words of the VRChat team, specifically Fax:
- Soba will have comparable or worse performance than current UdonSharp at launch with "promised" improvements in the future. But as we know, VRChat is unreliable with promises, so I'm hesitant to believe that.
- Soba will lack generics support at launch (no List<T> or Dictionary<T>, among others)
- Soba will not have everything promised in Udon 2
This is extremely dissapointing for me, and many other VRChat creators. Udon 2 was supposed to be the superfast feature-rich improvement over current Udon To see that they have opted to make a custom VM which, based on the facts we have right now, will not achieve Udon 2's speeds or feature parity is a disappointment to the community and a testament to how easier > better in VRChat's eyes.
The reasons for this change are also abysmal. They said that Udon 2 "would have distracted us from adding feature requests that the community had been asking for". This shows how deaf VRChat is around community feedback, since Udon 2 was one of the most exciting features for me and many other creators, plus, this wasn't an issue when you were waving your dick about making stickers, boops and other features nobody asked for.
Alongside this, based on VRChat's technical reasoning, it appears that WebAssembly was scrapped because the new engineer(s) working on Soba didn't bother to debug Udon 2, it appears some benchmarks were done, issues were found, and they didn't bother to try and debug it, or just made up some excuse, instead opting for yet another sloppy custom VM.
I apologise for my irritated language, but it is growing rather agitating that VRChat cannot competently deliver on a highly anticipated feature without taking years and having a 50/50 chance of scrapping it. Udon 2 was the better choice objectively, so I implore you to rethink this decision and bring back WebAssembly based Udon 2.
Log In
Μerlin
As much as I want Udon 2 to be a thing, at this point I wouldn't really expect VRChat to launch either Soba or Udon 2 if they pivoted back to Udon 2. While I take issue with their messaging and reasoning, it just doesn't seem like there's anyone there who wants to champion it now.
Given enough time, it is technically possible for them to implement all of C#/CLR functionality with Soba. It's a big open question if they'll be able to reach the level of functionality, robustness, and performance that the community needs in any realistic period of time though.
I'm disappointed about this news and how it was handled. I'm still frustrated with myself for how Udon 2 ended up. I don't understand why VRC didn't make this announcement at the same time as the beta for Soba. I don't understand why they obscured info about it. I wish VRC had been more open about the status of Udon 2 instead of indicating it was in progress for half a year.
Not__Shadow
Μerlin I mean, yeah. Given that you were seemingly the only one with the knowledge to pursue Udon 2, I don't imagine VRChat will ever actually finish it, but I'm making this in the hopes that they'll try.
It's extremely obvious the community doesn't want Soba, this canny is only 20 upvotes away from being on-par with the Soba (formally Udon 2) canny and that's with a 232 day difference on the two. If 119 community members are coming out and effectively saying "Give us back Udon 2", I would hope they'll get the damn hint.
ThisMight
Μerlin What about udonsharp 1.2+? Can we expect you to keep delivering on the udonsharp compiler? though.. Are you still allowed to work on it? idk how VRC sees Udonsharp nowadays anyway.
At the end of day, the Udonsharp compiler was amazing from the start, I don't think the community can thank you enough for it lol
Μerlin
ThisMight I will try to get 1.2 to a decently stable place. I probably won't be doing a ton with U# past 1.2's features since Soba having the VM to work with
should
allow it to be objectively be better at some point than what U# can provide. U# is MIT so it's fine.Balphagore
Here is what I do not understand as a C# developer who worked with native Unity behaviors and scripts. You have the option to use Reflection.Emit to vet out malicious code and steer the direction of some logic or replace during the upload phase of a script with the world to have native execution.
At one point me and a group of friends were going to develop a Unity game that was purposed around user created content/mods beyond our base "game mode". We planned to use Reflection.Emit and vet out the user's script during the build phase before packing it up to a mod archive.
Why drop Udon 2? Was it because Merlin was the manager of this project? Surely y'all did get some development work done and had high anticipation and excitement demoing the performance earlier with Udon 2.
Going with Soba sounds like "Udon 1.0" with a façade and by the wording of the developer blog, you still need to expose classes/methods, etc which is the annoying and cumbersome part on top of performance.
I was planning to create scripts and eventually game modes that people could put into their maps as an Arena and also a Role playing framework for RP worlds but I was waiting for Udon 2 first because I won't touch UdonSharp/Udon with a 10 foot pole.
My thought process and OCD makes me want to be optimal as possible and I don't want to invest time in Udon/U# for the outcome to be a clobbered mess and slow because I had to work around the limitations brought forth by Udon and its VM.
If you want to unleash the full potential of our creativity and bring it to the VRChat platform, you should reconsider Udon 2 and or a verified content creator role that can work the behaviors directly but use Reflection.Emit and prevent malicious executions as possible and lock out System.IO, System.Reflection, System.Httpfrom the end user.
It may not be easy and would require a lot of attention/maintenance but then you're already having to re-write wrappers and create hacks to expose more methods. Which one should you start investing in?
GotoFinal
Balphagore Please don't ever try to do sandboxing, it's not that simple...
So many ways for people to try abuse stuff, reflections, unsafe, badly implemented existing libraries, and the more you block the more limited the language becomes until you end up with something that can only run very basic c# code.
And even then you are still not anywhere close to good enough, as unity code must run on the main thread, so anyone can stall this main thread forever with no way for you to stop it without crashing whole unity.
Then you also have the fact that its not just c# you are trying to secure, but also access to some of the unity - like VrChat does not allow you to touch players directly in any way, and many other internal parts of the scene.
Thats why the idea here is to use WASM with c# support, as you get the whole runtime environment of wasm with full c# support but in a much safer way, as that environment just does not see the actual user system and cannot affect the rest of the game - expect for the provided methods ofc. While the provided methods can also ensure they are only exposing whats needed.
FairlySadPanda
GotoFinal Sidenote, for an example of a game that uses C# sandboxing to support arbitrary client code being delivered over the air: Space Station 14!
It can be done but it's a PITA.
GotoFinal
FairlySadPanda Where tho? I'm not familiar with the game, but I can't find anything in repo or documentation/wiki about any code being transferred between clients. It has modding support for sure, but thats very different and just not secure like most modding solutions. Hopefully it does not automatically downloads mods from the servers... but otherwise not related unless I'm missing something
Balphagore
GotoFinal Check out how Empyrion Galactic Survival exposed their modding interface and we modders have the freedom to mod the game with c#. It also runs on the Unity Game engine. The code is executed client side.
GotoFinal
Balphagore Eh, but we are not talking about modding, this is VERY different. It's kinda scary people don't understand it.
Some games have safe modding, when they have some own scripting language to control or something made for that purpose like lua, but I don't think I've ever seen c# used in safe way - other than solutions like U#.
If you mod a game you are putting yourself at risk - usually just trusting the modpack creators and your friends.
But in game like vrchat, with content created by other users that is downloaded automatically to your PC when you join world... I don't want to enter wrong portal by accident and get my C drive wiped.
Many mods in popular games have FULL access to your pc, they can do whatever they want, like client side Minecraft mods - and Empyrion seems to be no different here as far as I see.
RingLo_零落
GotoFinal Actually, without WASM system interface, WASM can't access some of the dangerous stuff, such as the file system
GotoFinal
RingLo_零落 Yes, I know, thats the point, but Balphagore was suggesting just loading c# code directly and trying to sandbox it manually without WASM. And thats just not safe.
ni1chigo2115
There is the problem of sloppy support for web assembly on IOS, but once that is resolved, there should be no problem.
Not__Shadow
ni1chigo2115 They can precompile wasm binaries for iOS with extremely little, to no performance loss.
FairlySadPanda
Given this is getting shared around, maybe someone can give me some clarity on a significant problem with a wasm approach considering VRChat has iOS as a target platform.
iOS has the following rules on downloading and executing code in an app:
"an Application may not download or install executable code. Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS"
So ignoring wasm for a second and considering Udon/Soba: these are clearly interpreters that augment the primary function of the application. We know this is fine for iOS because we've seen Roblox and other apps thrive on iOS; you download the client, and then a bundle is downloaded with interpeted code for scripting some weird horror experience, or FPS game, or whatever the gen alphas are playing these days.
Elsewhere in the iOS rules, we know Apple bans all JIT code being run outside of Webkit. This is a long-standing restriction. Wasm is JIT, so the argument about how to circumvent it for the wasm-based Udon 2 proposal usually links to this exact function as a demonstration of how to AOT the wasm that a Udon 2 world would need so it can be run on an iOS device:
Reading the description of this function, the language reads, quote:
"The output of this method is safe to send to another host machine for later execution. As the output is already a compiled module, translation and code generation will be skipped".
I find the words "execution", "compiled" and "translation and code generation will be skipped" here problematic. This seems to imply that this is, rather than being what Apple considers "interpreted" code, what Apple would consider "executable" code.
This is a complicated topic so if anyone can point me towards an approved application on iOS that downloads pre-compiled wasm off the internet and executes it, I'd like to know so I don't spread misinformation when this gets brought up in my dev circles.
Yewnyx
FairlySadPanda The origin of those rules on iOS is that interpreted languages of any sort used to be banned, so at Facebook we made extensive use of JavaScriptCore embedded in iOS to manage dynamic behaviors that were downloaded out-of-band to the client.
Even this, at first, was met with harsh resistance at Apple, as it meant that previously-reviewed functionality could become something entirely different (point a). A bigger concern was that the leverage of Facebook was such that it could create an app market based on that technology, as in the distant past (early 2010's) Facebook had hosted a hosted app platform embedded within the site (point b).
Also, someone on my team, a former jailbreaker, was very adept at obfuscating Objective-C selectors (method names) in such a way that they could call internal SDK functions in a way that was undetectable except through live analysis of the execution of the app, hence point c.
So that covers the policies that allowed for sanctioned code downloading with JavaScriptCore. The general ideas being, in plainer language, 1. don't make an entirely different app, 2. don't make an app store within an app store, and 3. don't try and hack the system.
The next problem that we faced after JSC was deeply integrated into the system was that the volume of and the deep integration with Javascript meant that the app startup was delayed by the translation and code generation (aka parsing and compiling to bytecode) steps more so than execution. To address this, we created our own Javascript VM called Hermes, such that we could skip several steps to load and execute the bytecode. Since this was an interpreted VM, and not a JITted VM, it was clear, but on a bit of shaky ground until Apple's reviewers got used to it, because they can be capricious and trigger-happy until the policies are clear.
It should be worth noting that wasm is not inherently JITted. Common implementations of wasm do JIT, but wasm interpreting is an option, and that is the approach that VRChat certainly took with Udon 2 as well as Soba. And JIT is less of a policy limitation than a technical limitation imposed by Apple: executable memory is read-only, and read-write memory is disallowed execution at a very low level. It is not _possible_ to write dynamically compiled bytecode at runtime then execute it, as JIT does.
Yewnyx
AOT compiled wasm would also not fall afoul of the policy, as it would essentially be subject to the restrictions from the first rule you posted.
For what it's worth, Hermes also supports asm.js, another target for native code that, rather than specifying another bytecode, instead opts for a restricted low-level subset of JS. As Hermes (internally) predated WebAssembly, and was interpreted anyways, it was easier to support compliant JavaScript rather than add support for a different bytecode altogether, and performance is relatively competitive for non-JITted execution.
> This is a complicated topic so if anyone can point me towards an approved application on iOS that downloads pre-compiled wasm off the internet and executes it, I'd like to know so I don't spread misinformation when this gets brought up in my dev circles.
Facebook. Facebook downloads pre-compiled bytecode (though Hermes bytecode, not wasm bytecode) off the internet and executes it, and has for most of the decade.
FWIW although I operated at arms' length to several of the teams involved, you probably won't find anyone outside of the people who worked on the actual teams with a clearer understanding of the above history and how the technical underpinnings fit into the broader context of iOS App Store approval process. I was, uh, rather curious and nosy about it, and the team I was under worked on the core client infrastructure for all of Facebook's iOS (and later, Android) apps.
(Fionna knows the one person who would know better, as he was the director of that department)
Yewnyx
Ultimately, the approach of Soba and Udon 2 using their own bytecodes are functionally identical from the policy point of view. The problem is that Soba will be far more expensive to develop, and slower to respond to the evolving ecosystem of .NET and Unity.
Udon 2 entailed integrating an open-source wasm interpreter and embedding the .NET runtime compiled to target wasm, creating C# bindings to be executed within this context, and then executing wasm with integration between the Unity host. This offers several advantages such as strong sandboxing, as well as better chance for tooling integration. It may be necessary to work cross-functionally with teams outside the company to achieve the necessary deliverables.
Soba is a bespoke VM. It's not a
problem
per se, in terms of technical choices absent any product, corporate, or financial contexts, but if a team of several engineers with a cumulative salary of several millions of dollars has spent the better part of the decade to achieve rough parity with wasm...I hate to say it so bluntly, but one engineer cannot possibly compete with that.I have no doubt that it takes an immense amount of talent to achieve an end-to-end working result, but I am concerned that the bus factor of the project means that the ability to execute on Soba at all is heavily reliant on the continued employment of a single person, and has less than zero external hire-ability, in contrast to technologies that are a lot more friendly to corporate nerdsniping such as WebAssembly. Although Udon 2 had a bus factor of 1 as well, the surface area of that was significantly,
significantly
smaller.On a technical level, it is not difficult to craft a rationale to stick with Soba, and as someone whose multi-year project was cancelled in the recent past it hurts me to admit that there are valid reasons to walk away from excellent technical work for reasons that have absolutely nothing to do with technical merit. But on a project level, I have deep reservations that Soba is a sustainable technology for VRChat to deploy, and I have many fewer reservations for the WASM approach.
Yewnyx
(Apologies for the four comments, I'm hitting character limits)
Lastly, I would also like to point out that although people are the most valuable resource a company has, at this point the overriding question should be about "how do we retain, engage, and excite the people in the community creating content" over "how do we retain the work on Soba". At this point the choice is between wasting the work on Soba or wasting the work on Udon, PLUS revisiting the long-term impact of deploying either of them to the community as well as VRChat's own ability to meet future expectations of continued execution on clearly understood goals.
To that end, whatever approach best accommodates:
- Tracking the full C# capabilities of mainline .NET
- First-tier support for node graphs or other custom authoring tools such as CyanTrigger or other future trigger implementation
- An ironclad promise of long-term support and updates
Is the one that I think will be successful.
GlitchyDev
WASM has precompiled Modules that work on IOS and are used by other applications, the IOS concern is only if apple decides to enforce its vague policy against VRC/Roblox/Ect which is a possibility. I would argue even Soba would qualify
Yewnyx
GlitchyDev Precompiled modules that produce dylibs should be kosher if the dylibs are themselves properly signed, and I believe that is a more recent amendment to their approval practices, but doesn't really change anything.
GlitchyDev
Given that proper WASM Udon 2 was already close to Closed Beta testing and had all required features, the regression is even more noticeable and has already caused me to rethink several larger commissions which would have benefited from the improvements promised.
C# is C#, anyone who understands Unity development can work on it. Udon and Soba are very limited versions of these that do not reach what is considered usable tools on their own, and require external tools such as U# 1.2 to be considered usable. This is an investment in future creators that should be taken seriously. Why develop something for VRC that is so limited?
I see you've also retroactively changed various feedbacks to try and erase the promised feature set of Udon 2, I recommend reverting these as to not to continue to misrepresent what was promised https://feedback.vrchat.com/udon/p/soba
ᴋᴀᴡᴀ
I also would point out
First
, that C# have a lot of other important features: like full OOP (non-behaivour, polymorphism, interfaces), exceptions, lambdas, method references, etc etc as well as important std features like LINQ. Those features are important and heavily avoidable part of the language. Even if you know C# well, and you begin to work on UdonSharp (SobaSharp) you permanently have 😒😖🥴🧐🤯😑😡-face, because you have to learn how to put yourself into the limits discovering you can't to this and that...UdonSharp feels right now like annoying scripting language like lua. And SobaSharp will be too. Generics is just a tip of the iceberg.Second
, WASM (or any different approach with buildable assemblies native/CIL with their runtime) already have those named above things, fully implemented properly and in performant way
. Just integrate it once and have it forever
, only maintain it. Soba approach requires devs to add small pieces of syntax one-by-one with months-by-months
cycles. Full featured Soba will take years
to make. In the end, inventing own bicycle costs more work, than just adding something ready
like Blazor.Third
, even promised x7 performance boost is not enough
, because Udon is like x100 slower
than native code. Udon uses very primitive interpreter with large self-overhead by, but also with very basic features (instructions), so any heavy code will also have large instruction-overhead. Which makes it incredible slow. Right now, it only properly capable to handle some events to control mirrors and video players. Any other heavy actions, especially in Update() causes a lot of problems. At this point, I guess, even integration of other interpreter, like Python or something, would give much more performance and comfortable syntax
to go, than inventing your own thing.pema99
They never said Soba wouldn't have generics, just that it wouldn't in the first release, to avoid further delay.
Also, I get the sentiment in the post, and I'm not happy with the pivot either, but honestly the emotionally loaded language doesn't help your case, it probably even hurts it.
Not__Shadow
pema99 I'll likely reword it soon. Also, I stated that it won't have generics _at launch_
2Doc
pema99 Emotionally charged language hurting a case only makes sense in a lobotomized and sanitized corporate environment where the higher-ups want obedient little piggies to shut the fuck up and do their work.
This is a social platform, and us as advanced creators - getting constantly shafted and strung along with a carrot on a string for years that turns out to be nothing - DESERVE to be able to freely and fully communicate how pissed we are at how dogshit communication and decisions have been from this pathetic company. It's part of the argument.
But ultimately it doesn't matter. VRChat does not, and has never, cared about its creators or their insights. We have no power. Not even their own staff members have the power to speak their mind against the true key holders. Thank fuck you don't get banned on the canny for speaking your mind or being "too combative", lmao.
Not__Shadow
2Doc Yup. VRChat is a public company, the shareholders want money, they couldn't give a flying fuck about the creators. They never have. That's why they've gotten away with waving their dicks about for so long.
The only time the shareholders would "care" is if they're losing money, which would only happen if VRChat had a massive scale exodus to other platforms were to occur, which is unlikely to happen nor succeed, as it didn't with EAC.
Smash-ter
Not__Shadow I do not disagree with the notion that vrc needs to be better, however you're wrong that they're a public company. Public implies that they have shares publicly available on the stock market. From what I can gather they are still private. What you are implying is that they have investors, which private firms can still receive.
StackOverflow
Whatever the choice is in the end, I hope it is being taken seriously and objectively, seeing how important Udon is for the game.
Not__Shadow
StackOverflow Yep. Especially when it's so CPU constrained right now, WebAssembly would improve frametimes across the board and make VRChat run much better.