15 ms·
Angry Bots Demo
- k__ 10y agoNow they need to add on-demand loading for parts of these applications and things could really get nice.
- mobiuscog 10y agoSeems to work nicely in Firefox 50 release (no nightly required) once the config is set. Really happy about the way this is progressing.
- Retr0spectrum 10y agoFor me, the WASM version was noticeably slower, with an especially noticeable JIT warmup. It might have been because the asm.js version was running at a lower resolution, so it's not a very fair comparison.
- sp332 10y agoIf your browser natively supports WASM, there is no JIT and no warmup time.
- Retr0spectrum 10y agoAh, I didn't realise there was no JIT. In that case, I'm not sure what caused it, but there was definitely a lower framerate at the start.
- Elhana 10y agoSame for me, asm.js version runs smooth and wasm had lags in few spots and strange glitches with bots getting stuck.
- Thaxll 10y agoHTML5 is not progressing that fast for games, it's really really slow.
- egeozcan 10y agoChrome (Version 57.0.2935.3 canary (64-bit)) on Windows 10 crashed the tab when I tried to reload the page to play again.
- curiousgal 10y agoWorks well on regular Chrome Version 54.0.2840.100 (64-bit) on Elemenetary OS Freya.
- s3th 10y agoWould appreciate a bug report if you have a repo: https://bugs.chromium.org/p/v8/issues/entry?template=WASM%20issue https://bugs.chromium.org/p/v8/issues/entry?template=WASM%20...
- bhouston 10y agoWhat is the total download size? For program? For data? How does this compare to the previous emscripten output?
- curiousgal 10y agoI'd say it's around 50Mb.
- runejuhl 10y agoFrom the network tab of Chrome developer tools: AngryBots11.wasm GET 200 webassembly.org xhr UnityLoader.js:187 11.9 MB 54.38 s GitHub.com AngryBots.mem GET 404 webassembly.org xhr UnityLoader.js:72 5.6 KB 172 ms GitHub.com AngryBots.memgz GET 200 webassembly.org xhr UnityLoader.js:47 314 KB 1.30 s GitHub.com AngryBots.wasm.mappedGlobals GET 200 webassembly.org xhr AngryBots.js:279 3.1 KB 250 ms GitHub.com AngryBots.datagz GET 200 webassembly.org xhr UnityLoader.js:47 36.3 MB 2.9 min GitHub.com HWStats.cgi POST 200 stats.unity3d.com xhr AngryBots.js:6595 149 B 3.80 s Apache/2 Just shy of 50 MB all in all.
- corysama 10y agoKeep in mind this is built in Unity. It's difficult to make even trivial native apps in Unity in less than 25 megs.
- onion2k 10y agoThe Unity WebGL engine is about 5MB gzipped. You won't get a web export smaller than that, but you shouldn't need 20MB of assets on top of it for a small game either.
- bhouston 10y agoFor a point of reference, Three.JS's source code hovers around 100KB gzipped, sometimes more, sometimes less. That is a factor of 50x difference.
- deleted 10y ago[deleted]
- reitzensteinm 10y agoThe Web Assembly version seems to be faster (not just warmup), but it would be nice to get a 1:1 comparison there.
- thedaemon 10y agoThe Web Assembly version also looks to be using much lower texture resolutions as well. It's cheating to get better speed it seems.
- zimpenfish 10y agoWhy Oh Why Oh Why would you use isometric WASD for this instead of Forward/Backward/Strafing?
- skocznymroczny 10y agoBecause the camera doesn't rotate, so when you are facing south, forward would move you backwards on the screen, and strafe-left would move you right on the screen.
- k_ 10y agoKill flash, they said.. Flash version, [at least] 5 years ago: http://tsuyobi.heteml.jp/unity/flash/AngryBots/ http://tsuyobi.heteml.jp/unity/flash/AngryBots/ It's great to see WASM coming at last, but I must admit I'm a little disappointed (for now, anyway). Huge download, and though it runs smoothly (firefox 50) I'm not really impressed given what was possible with the flash version.
- AstroJetson 10y agoWASM won't work on my browser, but the flash version does. ... and there goes Tuesdays work plan...
- sp332 10y agoFor me it's the opposite. And my browser shortcuts like closing tabs still work in the WASM version.
- wingless 10y agoI have always found the "Flash is horrible, kill Flash" circlejerk very unproductive. Flash was the best solution we had to media in the web ecosystem, and if we still had it, it would still be the best solution by far!
- bartread 10y agoHaha - I've run into exactly this problem writing games in HTML5 and JavaScript. I was all smug thinking, "Hah - screw these Flash guys and their stupid loading progress bars because of all that dreadful Flash bloat. I'll show them!" Except, of course, I didn't, did I? Because most of that bloat is actually game assets (graphics, textures, sound effects, music, oh, and time spent churning out procedurally generated content), and not just the useless crap I thought it probably was(1), so it makes no difference what you're using as a platform, and you still end up with a progress bar (basically). The code on its own comes down in a flash, but that's only a part of the equation, and in terms of load/initialisation time, not a big part. Still, what I never do is display a pop-up prompting the user to install Flash, or Unity, or Java, or whatever, which is a definite improvement. (1) In fairness I do download all sfx and music in the background, so you don't have to wait for them all to load before you can start playing.
- kawsper 10y agoIt reminds of Alien Swarm[0], a free game by Valve, it is well worth it if you can find 3 friends to play with. [0] http://store.steampowered.com/app/630/ http://store.steampowered.com/app/630/
- ivrrimum 10y agoThis is old news and you can play the game without enablidng stuff. I literary played this in browser few days ago.
- amelius 10y agoWhat I'd prefer to see in a demo is running compiled code of other languages (e.g. Haskell, C++, Python, Rust, Go) in WASM, and comparing performance. Also interesting would be to run other virtual machines (JVM) inside WASM, and see what the performance is. Also interesting: compiling Firefox into WASM, and running it on Chrome (or the other way around) :) Further, I'd like to see a good test of multithreaded/shared memory performance.
- golergka 10y agoYou can transpile this demo to C++ with IL2CPP. It's built into Unity for iOS/Android platforms, never tried to do it on desktop, but I think it must be possible.
- amelius 10y agoI forgot two: Compiling Linux to WASM (yes I know it has been done for single-threaded Javascript, but it would be interesting to know how this would perform on WASM, with threads). And compiling VirtualBox to WASM would also be cool. If only as a performance indicator.
- alexellisuk 10y agoI tried this with ASM.js - looked impressive to think this was all built with WebAssembly. Haven't seen the flash version, but still this looks awesome for 50mb.
- imaginenore 10y agoYour stuff is broken UnityLoader.js:72 GET http://webassembly.org/demo/AngryBots/Release/AngryBots.mem http://webassembly.org/demo/AngryBots/Release/AngryBots.mem 404 (Not Found)
- exabrial 10y agoI'm curious, why not use JVM bytecodes for web assembly... or actually any of the legitimate, mature, optimized, hardened runtimes out there? I feel like we're reinventing the wheel, again.
- ndesaulniers 10y agoThis has been answered 900 times already. See the design docs on GH.
- Shoop 10y agoThe design docs have a rationale for why not llvm bitcode [1], but I can't find anything comparing wasm to other bytecodes or interpreters. Could you point me to the right place? [1] https://github.com/WebAssembly/design/blob/master/FAQ.md#why-not-just-use-llvm-bitcode-as-a-binary-format https://github.com/WebAssembly/design/blob/master/FAQ.md#why...
- moolcool 10y agoThis feels like history repeating itself. The Flash version still runs better for me than the WebAssembly version, and the Flash version worked well on people's systems 5 years ago! It seems like half of the things I see on HackerNews is JavaScript poorly doing that other solutions did better a decade or more ago
- stcredzero 10y agoThat's why programming is "half a field," according to Alan Kay. If it were a real field, then there would be greater preservation of group knowledge/experience. Instead, it's like a pop culture, subject to cyclic fads, with less overall progress. For awhile, OOPSLA was full of presentations of things that people did in Java, that had previously been done in Smalltalk. I'm sure many others have parallels. Also, if Adobe had done a much better job, things would be different. (You could say the same thing for Smalltalk and OO.) But corporate incentive structures are somewhat broken and too short term. This is why Apple could produce a better UX free of bloatware and outcompete Wintel. This is also why Apple is now starting to fail some of its users. I'm now looking at networking for browser based multiplayer games. WebRTC datachannel has a pretty big header. Websockets carry TCP sematics. I think Flash did this better too!
- bane 10y agoThe best part is that we're just now achieving what we could do in Flash 5-10 years ago, which was capable of achieving what we could do with native code 5-10 years before that.
- pfranz 10y agoI never had a problem with Flash games and I haven't heard it many others. Flash games and Flash animation were casualties lost when it fell out of favor. What I hated with a passion is seeing a progress bar and warning to updates Flash so I could look at the hours for a restaurant down the street. It would also hijack copy/paste and other shortcut keys to switch windows or close the window. I would also hear my CPU fan spin up and battery life drop because I left it open in another browser tab. When CSS and Javascript started doing things Flash used to do I sighed because while I can use a Flash blocker, I can't do the same for CSS/Javascript.
- bigato 10y agoI look forward to the day I'll be allowed to use ttk (tcl/tk) compiled to WASM instead of html/css to build interfaces.