Live data from Hacker News

Mozilla and Unity Bring Unity Game Engine to WebGL

blog.mozilla.org

71–80 of 122 posts

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#71

Earlier quoted context omitted.

The choice wasn't so simple when asm.js was only supported by Firefox, and Microsoft had no plans to support WebGL in IE. :)

asm.js is supported, inherently, by all modern browsers. It is just JavaScript, after all. However, only Firefox has a second compiler path especially for it. Chrome has some optimisations for asm.js-like code in V8.

a subset of a language is not the language itself. asm.js is not javascript.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#72
post #33

This is HUGE news if it performs as well as advertised. We have been creating games in Unity for a couple years and eyeing HTML5 as a possibility that just was never capable enough to trust with a major project. Unity as a development platform is a joy to use, and now we won't have to have the same "Unity plugin or messy HTML5 game?" conversation for every new project.

Yeah, I stalled with my plain 'ol Javascript games after the Unreal Engine demos, since I assumed it'd just be a matter of time before Unity got a plugin-less web export.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#73

Mozilla, please stop promoting nonfree software. It would be better to assist in the creation of a free game engine for the web instead of Unity.

https://github.com/libgdx/libgdx games run on Android, iOS (RoboVM), Desktop (Java), and HTML/WebGL (GWT)

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#75

Is there an straightforward way to solve the issue with crazy load times on big WebGL games? If I remember correctly, I played one a while ago and it had to download assets for ten minutes before I could play it and it was a huge downer. If this becomes the norm I'm sure it wouldn't be too hard to get used to, but I was coming at this game from the mindset of playing instant gratification flash games. It would be coo…

Html5 appcache will download and cache resources indefinitely, and supports differential updates, but it's somewhat of a pain to work with and there are some browser-specific constraints on how big it can get. Using gz compression the size of the assets shouldn't be that much bigger than downloading a desktop game (which also takes a while).

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#76

Mozilla, please stop promoting nonfree software. It would be better to assist in the creation of a free game engine for the web instead of Unity.

It would be better to assist in the creation of a free game engine for the web

Bananabread? https://developer.mozilla.org/en/demos/detail/bananabread

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#77
post #50

What is the performance like for asm.js and WebGL compared to a native app for PC or Mac? What do you lose?

WebGL is basically at native speed. The only issue might be if a GL extension you need is not in WebGL yet, but that is moving along quickly. asm.js can run close to native speed, depends on the JS engine of course, but it's not far off. See for example https://github.com/joelgwebber/bench2d

To qualify, close to native speed means about two thirds of native speed in a best case scenario. Fine for games that don't stress the hardware to its limits, but not for top tier.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#78

I wonder if and how C# scripts (a big part of the Unity framework) are supported for the WebGL target.

C# scripts aren't used in the final output.

Unity is an engine where the scripting portion is Mono based, upon export it is converted into C/C++/Obj-C/Java for Desktop/mobile/web platform of choice. It will be similar for javascript, the exported asm.js supported javascript will emit from the export to WebGL.

Unity runs in the native platform it is in but Mono is their 'scripting engine' and part of their core engine much like UScript/UnrealScript is UDK's scripting engine. Unity uses Mono a little deeper than that but the resulting export is optimized for the platform it exports to. Since it is built on .NET it is alot like LLVM/JVM languages in that the IL/CLR/DLR are used to export all common languages used in scripting to a common output and this is also the reason you can use C#/Javascript/Boo (Mono versions) as they export to the same thing in the end native to the platform they are on.

I am sure there will be pluggable areas of the outputted javascript but for the most part you'll develop it as usual in Unity and won't mess with the output as much except to plugin third party toolkits etc.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#79
post #66

Earlier quoted context omitted.

If you read thought my comment history you'll see I'm not a web developer.

dont worry CORS or same origin policity have nothing to do with the way the server should load assets.Not sure why the other guy talked about that. The issue you raised still stands.

What? Loading of WebGL textures is subject to the same origin policy.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#80

I wonder if and how C# scripts (a big part of the Unity framework) are supported for the WebGL target.

C# scripts aren't used in the final output. Unity is an engine where the scripting portion is Mono based, upon export it is converted into C/C++/Obj-C/Java for Desktop/mobile/web platform of choice. It will be similar for javascript, the exported asm.js supported javascript will emit from the export to WebGL. Unity runs in the native platform it is in but Mono is their 'scripting engine' and part of their core engine…

To clarify a bit here...

Unity didn't say that 100% of Unity features will be supported in WebGL. Some scripts will, most likely, not be able to run in the WebGL builds initially. Also... Things like GI, or the new PhysX... I wouldn't count on if you are wondering how to prepare a game to be WebGL ready.

That said, I'm certain they will improve the WebGL build tech as time goes on, and eventually MOST of what anyone would need will be available. It just won't be available on day 1 of Unity 5.

Post reply on HN