Live data from Hacker News

Mozilla and Unity Bring Unity Game Engine to WebGL

blog.mozilla.org

91–100 of 122 posts

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#92
I find it annoyingly disingenuous for Mozilla to pride itself on a "plugin-free web" when they are the ones making decisions that ensure languages other than Javascript will NEVER run without plugins.

Please stop hurting all of us with this artificially imposed Javascript monopoly

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#93

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…

That's why webapps are built in a modular way: it's similar to 3D games in the sense that you don't need to have everything immediately to start using it: load what you need to display first, and get the rest when needed: e.g. you don't need the last level of a game when you're just starting it.

Actually, I was toying lately with the idea of making my own modules loader * insert mandatory xkcd strip about competing standards * because I wanted an hybrid loader that can pack multiple modules per file, but that doesn't have to have all modules in a single file either (e.g. 3d models could be packed with their textures, or levels packed with the models they need) as I haven't come up with a satisfactory setup to do so in r.js or browserify yet, however Unity already solved that issue in its Web Player, so making a JS version of it should be trivial.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#94
post #7
post #6

Earlier quoted context omitted.

They have already proved (Lego Starwars demo IIRC) that they can target the NaCL runtime for Chrome (and ARM Chromebooks). But I'm not sure when/if they plan to release that publicly.

I think it makes more sense for them to aim towards some sort of unified platform. NaCL is cool and all, but it's very Google specific. WebGL is now even supported in the latest versions of IE.

Wait a sec, are they saying the Unity5 webgl exporter will only work in firefox?

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#95

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…

The exported user scripts are actually .Net assemblies. They are run via the mono VM using it's JIT (just in time) compiler on platforms that support it, and are AOT (ahead of time) compiled on platforms that don't like iOS.

In the case of WebGL the .Net assemblies are processed by a tool to convert them to C++ and then compiled into javascript using emscripten.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#96
post #85
post #38

Earlier quoted context omitted.

I am a FOSS advocate as well, but I disagree that this announcement is a bad thing. First, Mozilla has and does assist in the creation of FOSS game engines and tools (Gladius, CubicVR, help to various web ports like JSMESS and various open source game engines, etc.). Second, even the LGPL shows that absolute avoidance is not always the best thing to do regarding closed-source code. Reality is more complex. Sometimes…

>First, Mozilla has and does assist in the creation of FOSS game engines and tools Parent comment didn't imply the contrary. "stop promoting nonfree software" doesn't mean "stop only promoting nonfree software". >even the LGPL shows that absolute avoidance is not always the best thing to do regarding closed-source code If you ask the FSF, the LGPL should really be used as a last resort. Unity is not too common yet (a…

> Unity is not too common yet (and hopefully will never be as long as it remains proprietary)

7 of the top 10 iOS games were developed with Unity, so it is already a really big deal for game developers.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#97

I do like Unity (especially the component/entity system) but recently I've been enjoying making games in plain ol' JavaScript (2, and 2.5D - granted). Everything is just so open: I don't obfuscate or hide anything, and it's all available via "view source". With an inspector/console you can quickly see how stuff works and start messing around with it. Of course, 99.99% of people just want to play games - but the way I…

Unity is not a "file format". It's a tool and development environment that reads and writes and edits lots of different "file formats", for which programmers can make runtime and editor components, that artist and level designers who don't know how to program can plug together and configure. And it can create applications for a wide range of different platforms, not just asm.js/WebGL.

It's nice that you're happy coding things up in JavaScript and WebGL just for the web browser, but Unity has a much wider scope than that.

Eventually somebody will write something like Unity that runs entirely in the web browser, and figure out how to make it target all the different platforms that Unity does (once Apple has their brain tumor removed and supports WebGL in their iOS browser for use in anything other than advertisements). But right now there is nothing like it for web development, and it brings a lot to the table that many people really need.

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#98
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

Why does asm.js run so crappily on Safari/Mac?

Re: Mozilla and Unity Bring Unity Game Engine to WebGL

#99

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…

You could display a much smaller web game while the main game loads. The trick is finding that proper balance where people are entertained long enough for the real game to load, but not so much that they'll want to keep playing the loading game afterwards. I, for one, can't wait to be waiting for a loading bar for a loading game to play while the main game loads.

Or how about this: Game Loading Lobby MMO, where you can hang out and chat with everyone waiting for their real game to load - IN 3D!. Maybe you can break out the character builder and have people do that, then get dumped into the MMO lobby while they wait for game assets to load.

Or you can just put a reddit iframe above the loading bar and call it a wrap.

Post reply on HN