
Mozilla and Epic Preview Unreal Engine 4 Running in Firefox - robin_reala
https://blog.mozilla.org/blog/2014/03/12/mozilla-and-epic-preview-unreal-engine-4-running-in-firefox/
======
cromwellian
I just bought Titanfall yesterday. I run this on a watercooled PC, dual GPU
setup. I wouldn't have bought such a PC setup just to run at 60% of system
performance.

I think Mozilla is marketing this wrong. Triple-AAA titles go for squeezing
every last ounce of system performance. I don't think there is anything to be
gained to putting a game like Titanfall, which has 5 gigabytes of assets (some
UE titles are much bigger and need blu-ray distribution) inside of a browser.
Long downloads, long startup, half performance.

But there is enormous value of running casual games with asm.js. Something
like Clash of Clans, or Flappy Bird will run just fine. Pitching that asm.js
is going to scale games from mobile up through desktop performance I think is
overselling things and bound to lead to disappointment.

Rather than believe we're going to get Call of Duty running acceptably on
Firefox OS. Let's first settle for CSR Racing, or HayDay.

~~~
azakai
As the video shows, this is not just about the highest-end AAA games, there is
a 2D platformer there too.

But the important thing in working to port the highest-end games is to push
the limits of the web platform, so it can be better optimized. Before UE3 was
ported, people were - rightfully! - skeptical any such engine would work well
on the web at all, and that port helped get to that point (and now to UE4).

Also, note that the 60% is of _CPU_ performance. You also get close to 100% of
GPU performance using WebGL. So overall it will be even closer to native speed
(depending on how the specific game balances between CPU and GPU).

~~~
supergauntlet
Most games these days (with a few exceptions) are GPU bound. Battlefield, Far
Cry, Assassins Creed, etc are all GPU bound. You can't get away with a
completely awful CPU but you don't need a great one for these. For other
games, like Starcraft, or Kerbal Space Program, the GPU isn't your limiting
factor, but your CPU's performance. Skyrim, for example, will perform vastly
different with the same graphics card with different CPUs. For many games the
anemic CPU performance won't matter, at least not very much.

~~~
smacktoward
_> Most games these days (with a few exceptions) are GPU bound._

Most _AAA_ games are GPU-bound, you mean. It's very rare to find titles from
indie developers or smaller publishers that come anywhere near taxing a modern
GPU -- due in part to the massive expense required to create engines and
assets that are capable of doing so.

(Which is also why the AAA game business model seems more and more to be
teetering; AAA titles have differentiated themselves via graphics for decades,
but the cost of being cutting edge is so high now that if the title sells at
anything less than blockbuster rates it's a financial failure.)

------
pvnick
This is very exciting. I've had the chance to meet Brendan Eich a couple of
times at Moz conferences, and he never fails to strike me as a visionary and a
super nice guy. Between the asm.js stuff and Rust (which I actually had the
privilege of witnessing the much-anticipated unveilling several years ago.
Honestly I thought it was an overly-ambitious fools errand but that's why I'm
not cto of mozilla), he really seems to be driving Mozilla exactly in the
right path of where the web is going.

~~~
Pacabel
From what I can see, Mozilla is generally going in a direction that's
alienating existing users, without necessarily bringing in any new ones.

For example, it's widely understood today that Firefox has a much smaller
share of the market now than it did a few years ago. Most measures I've seen
show a drop from somewhere in the mid 30%'s down to under 20% today.
Proportionally fewer Firefox users means less influence over the future
direction of the web, of course.

SeaMonkey never really had that much penetration to begin with, and still
remains basically irrelevant.

Firefox OS doesn't really seem to be taking off. While it may sound nice from
an ideological standpoint in terms of openness and standards and all of that,
in practice it doesn't sound very enjoyable or practical to use. I've seen
enough people show displeasure over the low-end devices it's commonly used
with, with the highly restrictive development environment (being forced to
essentially use JavaScript/HTML5/CSS for apps), with a lack of features, and a
lack of apps. Those are very serious and fundamental shortcomings.

Thunderbird and Persona have both been "turned over to the community". That
appears to be a polite way of saying that Mozilla has given up on them.

Asm.js is pretty unremarkable. It's a human-unfriendly subset of JavaScript.
NaCl is a much better approach that would ideally be adopted by the major
browsers. Unfortunately, we've seen nothing but hostility toward it from
Mozilla.

Rust sounds appealing, but it's not really usable today. We keep hearing that
there will be a stable release sometime later this year, but we'll need to see
that actually happen first before it'll have any chance at being widely
adopted. Even then, it's doubtful Rust alone will have any major impact on the
web any time soon. Servo may, but that's clearly very much also an unusable
work in progress at this point.

So overall, I don't see Mozilla as heading in a very positive direction. They
really haven't had any wildly successful new offerings in quite some time now,
and what they have been working on lately doesn't seem to be getting all that
much adoption. Without a large base of users, their influence over the
development of the web will just get weaker and weaker.

~~~
soapdog
Firefox OS has been launched in 16 countries. You may not be on an emerging
market but people on most of these countries are enjoying what affordable
smartphones can give them. In Venezuela alone Firefox OS already has a larger
marketshare than Windows Phone. Firefox OS went from 0 to 16 countries, 4
hardware manufacturers and 4 global telecoms in 2 years. And it did that while
being open, accepting contribution, encouraging sharing and open culture,
placing privacy and values over profits. Yes, Android and iOS are larger, much
much larger, but we need to think what kind of world do we want in ten years.
A world where each mobile device is a silo with its platform under complete
draconian control of a single company thats usually from the northern region
of California or where each platform is embracing open standards, where apps
are light and cross platform where people can go from consuming content to
creating content fairly easy (HTML being way easier to learn than Obj-C).

There is a reason why we're using the World Wide Web right now. Its not an
app. Its an ecosystem based on standards where everyone agrees more or less to
play by the same rules. Its also easy to learn so anyone can put anything
online, it doesn't matter if you're building a home page about crappy
gingerbread people, you don't need permission from Apple or Google or a lot of
knowledge to do it. The Web won as main medium to exchange stuff because its
easy and open.

Initiatives such as NaCL and similar are not open. ASM.js based stuff work
even on platforms that doesn't support it. Its about being compatible and
playing well with others.

Mozilla is a strong player and it is not playing a game where the others need
to lose for it to win. Its playing a game where cooperation is the main
objective. Firefox OS doesn't need to win, it just need to show people that
you can do whatever you need using web technologies that don't belong in a
silo.

Sorry if this sounds like a rant but I get really frustrated when people seem
to be content to throw all the advancements we did for the web during the last
20 years into something as shallow as user base numbers.

Four years ago no one could believe that a whole OS could be built on top of a
web engine. That browser would be able to play AAA games without plugins. That
we could do videoconferences using p2p with nothing but HTML/CSS/JS and yet we
can. Now, put your imagination and dreams to work and imagine what the next
four years will bring. Thing a bit longer and imagine what could happen if
instead of trying to embrace proprietary tech we decided to move the web
forward...

~~~
nnethercote
Well said. Anyone who thinks Firefox OS is going nowhere obviously wasn't
paying attention to Mobile World Congress 2013 and 2014.

------
taeric
This is neat and all, but I wonder if things are really better moving to "in
the browser." The discussion is of "upwards of 60% as fast as native." Is this
using the same amount of processing power as native, or is this "67% as fast
as native, using 200% of the CPU as a native solution?"

I mean, I realize that processors and machines are only getting more capable.
It seems silly to start requiring faster and faster processors to achieve what
slower ones could have achieved. I would rather we just kept achieving more.

~~~
MichaelGG
Especially considering that asm.js isn't really using a JS execution engine.
You can smuggle a low-level machine code via any mechanism. As I understand,
without asm.js specific optimizations, it doesn't _really_ work.

I know, it's a cute way to get some movement without the political nightmare
of having to decide on a proper VM for the web. Since it's "just JavaScript",
other browsers will run but be really slow, leading users to blame the
browser. At least, I guess that's the idea. It's still a shame they have to
resort to such tricks.

~~~
chc
It is true that most other browsers don't have special compilers for asm.js,
but they still tend to get pretty good performance out of it.

~~~
stoptalkingshit
Of course they do! asm.js is a collection of everything in Javascript that
optimizes on the current hardware. It's not the least bit dynamic, i.e. it is
not Javascript.

------
soapdog
argh people here are so negative. You get a lot of the content you consume
over the web. You can stream videos over the web and that is more convenient
that using DVDs. you get "facts" from wikipedia and similar resources and
thats easier than picking dead tree encyclopedia. This is about convenience.
When games start being playable on browsers you won't need a local install or
different ports for different platforms. You will need just a browser. It
won't matter if you're on windows, mac or linux. It will just work. That means
reduced cost for the studio. That means less support calls. That means easier
setup.

That will also mean that people will be able to experience with less
mainstream stuff. Sharing stuff on the web doesn't require Apple, Google,
whatever company approval. It becomes easier to create content and users have
less resistance to opening a web page when compared to installing a game. Also
its safer since JS language is pretty safe regarding exploits and viruses and
general malware when compared with something built with native code on your
machine.

~~~
stoptalkingshit
Clueless. Just clueless. None of these benefits are tied to the crap browser
platform that's been foisted on us. The stewards of the browser did a terrible
job of designing it, as proven by shoddy hacks like asm.js. Did you know that
it took WebGL to get them to introduce typed arrays? They weren't smart enough
to see the usefulness of this, they had to bumble into it. Same with async
HTTP requests. So woopty-doo you've caught up to where the JVM was over a
decade ago. Semantic HTML has been destroyed by this mindset also.

~~~
soapdog
WTF? You simply go around calling people clueless without knowing their
background? What is wrong with you?

The browser platform is not perfect, its not close to perfect, its evolving to
do something that it was not originally designed to but it still the best shot
at cross platform software. You can pick the JVM for all elegance it had, it
never achieved what simple servers with bad markup languages did. There is a
reason why you are typing on a browser right now and not using a java applet.
The reason is that even with all the drawbacks of web technology, it works, it
is easy to implement, it is easy to learn. Its not about über programmers in
ivory towers, its about empowering everyone with a technology that is easy to
grasp. It takes a very good professional to craft a good web app but it still
easy enough that people from non-technical backgrounds can share knowledge.
Its a platform for sharing stuff.

Yes they added typed arrays just now. The engines evolved a lot during the
last two years. Lots of things are being ironed out. Instead of just seeing
deficiencies, see how progress is being made with something that is open, free
and common.

~~~
stoptalkingshit
So what you're saying is it's lowest-common-denominator crap? Then we agree!

------
ChuckMcM
This is really cool, I've always had a soft spot for the Unreal Engine. But it
reminds me once again, why the hell does Flash even exist any more? While I
get the whole "HTML5 wars" thing, I've done standards and I know how those get
mired in the muck, but if you can write a game engine with this level of
performance, writing an open source 'flash' equivalent should be pretty doable
right? And open source and open tools and don't bother with the quacking of
the standards guys, just focus on something that works right?

~~~
dave809
Mozilla is working on it :)
[http://mozilla.github.io/shumway/](http://mozilla.github.io/shumway/)

------
kayoone
Its quite contrary to the approach onLive and Gaikai have been taking with
streaming games from the cloud to any device that is able to output a video
stream. I tried some Gaikai demos before they were acquired and to my surprise
it worked very well. Both have their ups and downs but as i see it the
ultimate endgoal would be your desktop in the cloud accessible from any device
by realtime low-latency streaming. In that scenario gaming in the browser
would still be possible but make a lot less sense.

------
sukuriant
Was that video running in Chrome? Honest question, if that's the new Firefox,
it really, really looks like Chrome...

~~~
epmatsw
Firefox's new theme does look a lot like Chrome. The tabs are more rounded and
the color scheme is a bit different, but without going into the menus it's
hard to tell them apart at first glance sometimes.

~~~
Pxtl
Oh yuck, they're bringing back the big wasted void along the top of my page?
The fact that Firefox replaces the title-bar with tabs is my favorite feature
of the darned thing.

~~~
mrec
Chrome and current FF have the same "big wasted void" when not maximized. You
need something you can grab to drag the whole window about, as opposed to a
single tab. It goes away when maximized, and I'd hope Australis will stay the
same.

~~~
epmatsw
Oh wow, that's a nice touch. I'd never noticed that despite using it all the
time, which I guess is a good sign.

------
mschuster91
All the asm.js stuff... well, they still haven't ported UE3/UT3 to Linux,
haven't they?

Sidenote: IIRC all UE code is cross-platform compatible - so shouldn't it be
possible to fuse the UE3 JS engine port and the UT3 content to provide a
"cross platform UT3"?

~~~
pcwalton
Why not use Firefox on Linux? That's a Linux port.

------
higherpurpose
This doesn't even use WebGL2?

~~~
azakai
WebGL2 is a work in progress, but I believe this demo can use some WebGL
extensions. And I think WebGL2 will include those extensions by default. So
there is some connection.

------
jebblue
It's a YouTube video? Will it run on Linux? I still have UT3 in the box new,
the promise of it running on Linux evaporated even though UT2004 ran better on
my machine on Linux than when I ran on Windows on the same machine.

~~~
azakai
Yes, it runs on linux. (I use linux and I've tested many of these demos,
perhaps not this specific build though.)

The only issue with linux is if you have older GPU drivers, they might be
blacklisted by the browser and WebGL support will be off. But if WebGL is
enabled and your drivers are stable, will work fine.

------
pjmlp
This is very nice indeed, except it does not work on mobile devices.

~~~
azakai
Curious why you say so? Have you tested it?

WebGL works on mobile devices, not all browsers have caught up yet, but there
is progress.

~~~
pjmlp
Apple does not allow WebGL except for iAds.

On Android, only the users that install Chrome besides the native browser,
have very up to date version of Android and a device that isn't blacklisted
can see WebGL.

WP is still not there.

Most casual users don't install third party browsers like FF.

Why bother with WebGL on mobile, when native allows for using the handset
resources properly, not drain battery and have a bigger deployment target?

~~~
azakai
I agree, on mobile, the average device+browser today is not going to run WebGL
well or not at all.

But, beta versions of browsers on the same devices show good performance. I
think it's just a matter of time.

But again, right now, of course native on mobile is the way to go.

------
Touche
> demos

Asm.js needs fewer demos and more finished production applications. Apparently
Epic isn't excited enough about this technology to release one of their games
on the web.

~~~
pcwalton
There aren't even any native Unreal Engine 4 games out yet that I'm aware of:

[http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games#Unr...](http://en.wikipedia.org/wiki/List_of_Unreal_Engine_games#Unreal_Engine_4)

That's the purpose of this demo: to show that the Web stack is ready even for
upcoming AAA games, not just ones from a few years ago.

~~~
Touche
Being ready for games doesn't mean games will come, just as U3 games haven't
come (except for the one that hasn't shipped yet). Would be nice if Epic
shipped one of their games; why haven't they?

~~~
zxcdw
Doesn't matter who ships, as long as it can be done without reasonable
tradeoffs. The nature of the Web as we know it gives so many benefits in form
of e.g. ease of deployment that it'd be outright wonder that there wouldn't
soon be a rush of games exploiting the platform.

------
ebbv
They say "without plugins" but that's kind of misleading. Firefox includes
asm.js functionality, but no other browser does. Just because it's included by
default doesn't mean it's not a plugin. Chrome includes Flash by default, it's
still a plugin.

~~~
onedognight
asm.js is a subset of JS, so by the conventional definition, it is not a
plugin. The game should run, albeit slowly, on other browsers.

~~~
azakai
I would not say "slowly" \- that sounds like it is objectively sluggish for
the user, which is not the case. Try the Epic Citadel demo in chrome - works
great.

Depends on the benchmark, on many Chrome has already caught up, on others
perhaps not. But there is constant improvement here.

------
clarry
_Epic Games and Mozilla are demonstrating how the Web is continuing to evolve
as a powerful platform [..]_

And you're still using a youtube embed because a single, simple tag like
<video> is too effin' problematic.

Yeah yeah, I get it. <video> isn't relevant to gaming. WebGL and gaming are
cool new stuff, <video> is prehistoric crap nobody cares about anymore. The
world has moved on.

~~~
abhinavk
Serving videos off YouTube allows them to avoid bandwidth costs.

P.S.: YouTube uses their HTML5 player wherever possible.

~~~
zanny
I have youtube html5 video on, and it only works on adless videos. This one,
for example, doesn't use the html5 player.

~~~
SEMW
[https://addons.mozilla.org/en-US/firefox/addon/youtube-
all-h...](https://addons.mozilla.org/en-US/firefox/addon/youtube-all-html5/)

