
Why HTML5 Will Succeed for Gaming - skadamat
http://www.gamasutra.com/blogs/AustinHallock/20120715/174150/Why_HTML5_will_succeed_for_gaming.php
======
ilaksh
Everyone thinks I am a 'conspiracy theorist' or something for saying this, but
I really think that Microsoft is holding back WebGL for business reasons.

Microsoft is very dominant in games because most PC games require Windows. If
WebGL were to really take off/become a popular way of distributing/consuming
PC games, which would be 10 or 100x more likely to happen if Windows supported
it out of the box via Internet Explorer, you would have to expect to see lots
of relatively inexpensive and even free 3D games that run in the browser, and
take little or no time to install.

Even with Microsoft refusing to support it, now with Pointer Lock API coming
very soon to a regular Firefox release (tomorrow??) and probably Chrome soon
also, it will be possible to release a FPS or MMO on a website with native
browser technology. Throw in the momentum and capabilities of Node.js, and I
think that means choosing a web stack has big advantages as far as ease of
development for a lot of multiplayer 3D games.

I also think that where JavaScript/JS-based languages like CoffeeScript are
really going to shine and be popular is in scripting for multiplayer 3D
environments online.

I think that mainly we are just waiting for Pointer Lock, maybe a tiny bit
better collaboration between browser and driver developers, and some social
momentum.

When WebGL takes off, Microsoft Windows sales will take a big hit because
people will be able to play the popular games on Macs or even on Linux
machines.

~~~
luriel
"I agree with Microsoft’s assessment that WebGL is a severe security risk. The
gfx driver culture is not the culture of security." -- John Carmack

And Carmack is not precisely known as a MS cheerleader.

~~~
AshleysBrain
The issues with drivers can be and are being mitigated. The question is will
Microsoft support WebGL once drivers are secure? I still doubt it, for the
business reasons.

~~~
luriel
"Mitigated" is not the same as solved.

Graphics drivers are inherently not designed to be exposed like that to
hostile content.

------
kunle
I don't buy this. Apple was pushing HTML5 as an alternative to flash.
Definitely true.

Apple has no preference for HTML5 as an alternative to native iOS. Native is
simply faster, and better on iOS, and as long as Apple continues to have
dedicated teams whose entire purpose is improving native iOS (and as long as
they continue advancing the hardware), it's tough to believe why HTML5 will
ever catch up.

If you believe native iOS encourages lock-in (As in, Apple doesnt make tons of
money from apps, relative to hardware, but the apps make the hardware more
compelling to consumers), then strategically, backing a technology that does
not encourage lock-in, doesnt make that much sense.

It seems to me that most of the people who believe that HTML5 is the wave of
the future (particularly in gaming), dont actually make games (or make money
from games).

It will always be more profitable to make an awesome game in native, and
monetize it on iOS first, than to make a less capable game in HTML5, and
spread that around to every platform. Just my tuppence.

------
seanalltogether
The biggest problem with HTML5 gaming right now is that Canvas rendering is
designed to be single threaded and Flash sprite and bitmap rendering is
multithreaded. Canvas is a direct draw api and Flash uses a deferred renderer.
WebGL can overcome that problem, but most people writing web games naturally
gravitate towards simple 2d canvas apis.

~~~
phoboslab
That's a problem of the implementation, not of the API.

Modern browsers have hardware acceleration for Canvas2D now. In my experience,
it's already way faster than Flash ever was.

------
mtgx
"WebGL - Everyone but Microsoft is in agreement that WebGL is the way to go
for 3d graphics in a browser."

Things like these are the reason IE keeps losing market share. Why limit
yourself to the little functionality of IE? That's why Chrome is growing and
keeps getting recommended to others.

~~~
ilaksh
See I think that for IE to provide a really powerful capable web platform goes
directly against Microsoft's business interests, because they have the most
dominant native platform.

------
programminggeek
HTML5 is not going to change the world for gaming. It's great for in-browser
games now, but mobile has "changed the game" so to speak. The visibility you
get by having a great mobile game in the app stores is huge for finding users
and making money.

If I were writing a game today, I'd do it on mobile first and work backwards
to desktop from there, not the other way around. There are plenty of great
tools for that - cocos2d, corona, etc..

That being said, in a future where supporting multiple platforms is a must,
HTML5 might be great place to start, even for mobile, but it's still very
early and immature at the moment. Great for demos and proof of concepts for
cheap, I don't know that I'd bet the farm on it yet.

~~~
jmduke
I don't follow game development much -- I thought one of the reasons HTML5 was
so widely touted was because it streamlined mobile game development -- instead
of writing an Android and an iOS version of a game, you could write it in
HTML5? I'm surely I'm vastly oversimplifying the issue -- what am I missing?

~~~
phoboslab
Screen size, sound and performance issues are the main problem. I recently
wrote a Making Of for one of my games that offers a few more details:

<http://www.phoboslab.org/log/2012/06/x-type-making-of>

~~~
jmduke
A great read, thanks!

Regarding controls: with the dual analog sticks, did you then have arrow
keys/mouse bound to the sticks for non-mobile browsers, and then touch for
mobile browsers? How was that handled?

~~~
phoboslab
I just switched between these two control schemes, based on whether the
browser supported the touch events.

There's a certain degree to which you could do this "automagically" - i.e.
generate on-screen buttons based on the keyboard keys that are used in the
game. But since controls are so important, I'd rather decide for myself on
case by case basis how they translate to mobile.

------
mattvot
Can someone explain this issue I have an issue with HTML5 games.

I don't know much about WebGL etc, but I do know that JavaScript is used to
direct the game.

So to that end, considering JavaScript cannot be compiled and then sent to the
browser to render, anyone can view the source. Anyone can hack it up. How do
you solve this?

~~~
ilaksh
Once you obfuscate the JavaScript code, its actually a similar situation to
that with Java or even regular C++ programs to a lesser extent, because you
can still 'hack it up'. Look at all of the mods for Minecraft, for example.

~~~
debacle
Not true. You can't really obfuscate JavaScript in a meaningful manner without
making it slower.

~~~
AshleysBrain
What? Take a look at Google Closure Compiler - it renames all identifiers to
nonsense, making it impossible to work with, and not affecting performance at
all.

~~~
debacle
And that obfuscation is easily undone:

www.google.com/search?q=javascript+deobfuscator

------
azakai
> Apple, Microsoft, Google, Mozilla - four of the largest tech companies

One of those is not like the others.

~~~
cryptoz
Which one? They all produce web browsers, operating systems, a collection of
user software and all have millions or more in revenue.

~~~
kajecounterhack
Mozilla is nonprofit. (Incidentally, almost all of its revenue comes from
Google.)

~~~
skadamat
Why is that important at all.

They all have browsers in the race, that's the only thing that's important for
this...

------
bsphil
For low-end gaming to replace flash? Sure, that was inevitable and the writing
has been on the wall for the demise of flash for years now.

