
Why HTML5 is the best platform for rapid game development - austinhallock
http://austinhallock.com/2012/05/19/html5-the-best-platform-for-rapid-game-development/
======
varelse
All IMO of course, but programming HTML 5 Canvas apps today feels like having
a late 1980s vintage CPU strapped to an early 2000s GPU. This is a really
unbalanced combination IMO.

Given this imbalance, when I was at a recent employer, I suggested that
exposing OpenCL or CUDA within the browser could lead to some really cool
games and web apps. I was soundly shut down. Right around the same time, WebCL
was announced: <http://www.khronos.org/webcl/>.

But it doesn't seem like it's moving particularly fast, sigh...

~~~
nextparadigms
OpenCL is going to become a big thing for games going into 2013 now that all
new mobile GPU's will support it. Thew new GPU's will also support OpenGL ES
3.0, so I'm curious what kind of mobile games we'll see within a year or so.

------
dsirijus
As a rapid game producer, I'm calling this bullshit.

Fastest rapid game dev is with Flash, and nothing has come even close to it
(just poke around game dev jams).

Now, if you need mobile support, go with HaXe, it has HTML5 target too. As
well as native iOS and Android and much more.

------
jiggy2011
With HTML5 you also have to worry about the cross browser compatibility mess ,
which doesn't seem to work well as "rapid" development.

Not to mention that I think writing something like a scene graph in JS would
make me rage.

~~~
Kiro
Either the browser supports canvas or not. It's not much more mess than that
and definitely not as messy as making a normal website cross compatible.

~~~
kevingadd
Canvas mostly works across browsers but there are still variances and browser-
specific edge cases you have to detect. Cross-browser audio is an absolute
trainwreck, and APIs like gamepad, fullscreen, etc. are all very finicky as
well and will require careful effort if you want to use them in each browser.
Plus, each JavaScript runtime has things it likes/doesn't like so to get
playable performance for a serious game in all the browsers you'll have to
spend a while figuring out how to tune your JS for all of them (or writing
browser-specific versions). This is made worse by the fact that some of the
major browsers don't have usable profiling tools...

But sure, if all you want to do is draw some lines and bitmaps on the screen,
no problem.

~~~
sil3ntmac
Agreed. HTML5 audio is definitely a complete mess, you need shims and
fallbacks if you even want to consider using it... but for the present (e.g.,
on modern browsers+devices), canvas seems to be the winner in terms of write-
once, run-anywhere for games and animations that look great and run smooth.
And since it is an open standard, we can look for other devices (smart tv's,
game consoles, car dashboards... okay perhaps that is dangerous) to support it
in the not-so-distant future.

------
Dove
_I don’t think anyone will argue the fact that the only other platform I
would’ve been able to rapidly develop and deploy games like Nick vs Bus and
Word Wars would be Flash._

I would argue it. The speed with which you can develop simple games has much
more to do with how well you understand the platform itself (its tools,
libraries, capabilities) than what the platform is.

I'm not saying platforms and languages don't intrinsically affect your pace.
They do. But it also depends a lot on what you're doing. One language lets you
write a web server in an hour; another allows fast and robust mathematical
analysis. Writing a fun game in 24 hours is such a pliable goal that you could
clear it with, say, a graphing calculator, an industrial robot, or a Word
macro. To say nothing of languages people actually write games in!

~~~
austinhallock
That's a valid point. I updated the wording a bit.

------
bryceneal
The "game" is bad and and this article is bad.

A lot of the points the author is making in favor of HTML5 are simply not
true.

No Compiling - Languages like flash can build while you and work and compile
in under 5 seconds. This is also not a compelling reason to choose a platform,
and no intelligent person has ever chosen a platform based on how fast it
compiles.

Easy Testing - HTML5 is no easier to test than anything else. Perhaps having
to connect a device to test would be an exception. Simply not true.

It's not a plugin - This is irrelevant. If we're talking about browsers, flash
has more penetration than HTML5 does right now. So which is worse -- a plugin
that 99% of PC users already have, or an executable installer that needs to be
run in order to update or change to a browser that supports canvas?

You can rapidly prototype with many languages. I am not arguing against HTML5
at all. Infact, I believe it is probably the future of casual web games. I am
only arguing against this poorly written article. The author actually claims
that HTML5 is better because of the "hype" around it. Give me a break.

The only final thing I will say is that javascript is a shitty language to
write anything like a big game in. If you know anything about CS fundamentals,
then you can't refute this fact.

------
tomjen3
I have to call bullshit -- he could have made those games in Unity3D and
gotten a better environment and better (and more extensive) math libraries.

~~~
epaik
While Unity is extremely powerful, the point that it's plugin based for
browser accessibility remains.

My biggest draw towards developing games in HTML5 is that it runs _natively_
in (almost) all browsers.

~~~
abbyroad9191
performance on these games are shit on the iphone 4, and the 2nd game flickers
unless its in landscape mode. Why are people championing for sub-par
technology?

------
epaik
I love participating in game jams. For those who haven't heard, a game jam is
an event where you have a limited number of time (maybe 48 or 72 hours) to
develop a game.

One of my favorites to participate in is Ludum Dare. This past LD, I used
HTML5 to develop my game. It was the first major project in which I used
Javascript and Canvas, and the code could've been better, but I managed to
quickly develop and prototype a game I'm proud of within 72 hours[1].

The biggest issue with HTML5 isn't the speed of development, but rather the
fact that it's not a mature technology yet. I still haven't ironed out some
issues with sound and resource loading that works consistently between Chrome,
Firefox, and Safari.

[1] <http://ekun.nukenine.com/two/game.html>

------
tagawa
A couple of issues:

1\. "assuming you’re with the rest of us in the 21st century" - that's pretty
insulting to the millions who can't afford a smartphone.

2\. "it’ll run from your phone’s browser" - but only if it's WebKit.

~~~
austinhallock
1\. Changed that blurb 2\. I don't have an Android/WP7 phone to test it on,
does it not work from yours?

~~~
tagawa
Thanks. I appreciate the quick response. Mobile Opera & Firefox don't work for
me. I haven't looked into why yet but can do that on Monday and get back to
you.

~~~
austinhallock
I'd appreciate that! My email is austin (at) clay [dot] io

------
pacomerh
Wether this is the fastest way to make games or not, the demand for HTML5 game
engineering is gaining traction in several ways. HTML5 framework makers are
promising one time develop and multiple platform deploy, which in theory
sounds very nice. And 'optimist' game developers are really having fun using
their already mastered web standards skills to create one page games. Why is
there so much interest?, you have to wonder. I have these assumptions.

------
Skoofoo
As a platform for game development, there is much better out there than HTML5.

With HTML5 you have to deal with many serious faults that do not exist when
working with many other platforms. HTML5 canvas doesn't feature the ability to
turn off anti-aliasing, HTML5 audio has only one channel per instance, has
latency issues and is inconsistently implemented, JavaScript has many various
faults, performance leaves something to be desired, you cannot do things that
are common in most games like going fullscreen or grabbing the mouse, and
overall it just feels like you have to wrestle with your web browser to write
a game on top of it.

It is convenient to simply link a game to someone and let them play without
manually downloading it, but is it really worth hacking around all these
issues? Like the web browser was designed decades ago to share formatted text
and images, we should design a modern, open browser that makes sense for video
games. Perhaps something that combines the best qualities of web gaming and
Steam, and distributes data through decentralized P2P?

------
bonyt
The awesome love2d lua game engine ( <https://love2d.org/> ) has an html5
port, love-webplayer, that can play a lot of the games written in lua for
love2d.

<https://github.com/ghoulsblade/love-webplayer>

------
stesch
Funny. It's an empty page with NoScript.

~~~
nacs
Also funny -- Diablo 3 doesn't work when I disable my graphics card. /s

~~~
jamesbritt
Do you get a message telling you there's a problem?

------
dc-tech-fan
Doodle or Die is all HTML5.

Doodles are stored as JSONP: <http://doodles.s3.amazonaws.com/d2/5iSFn-
ME/8qp73zuBe.js>

This json renders in canvas as the page loads like these amazing drawings:
<http://doodleordie.com/profile/underwearhero>

We want to make a native mobile app because we've heard that HTML5 is slow
enough to frustrating. I tried a Lua-based framework and it was fun to use but
the resulting drawing too was too slow to be usable because every line had to
be created as a new object, instead of Canvas-like pixel manipulation.

~~~
austinhallock
Impressive stuff!

------
novalis
The poster says on the Flash topic: "but I can see HTML5 being favored over
something that is completely beyond their control." ...and further down, on
security as a flaw: "you can make your game secure, you just need a backend
that can be done fairly easily with node.js."

This strikes as an incredible double standard for appreciation that permeates
the article top to bottom. I do understand why the poster is so enthusiastic
for developing games rapidly in HTML and went about it cutting some corners
when having to compromise. But enthusiasm is just that, doesn't make said
games any good by default or the plat to magicly be mature to the point it
should.

------
freditup
I feel that the error the compiler will find will more than make up for the
very few seconds it would take to compile a game like Nick vs. Bus. I also
don't think the single corporation and plugin points makes a direct difference
to game development (I would argue it does if you had to buy expensive tools
just to develop for Flash or HTML5.)

My personal opinion is still that Flash is a better platform for games, at
least right at the moment. I have nothing against HTML5, although I'm not a
big fan of JS as a programming language. Undoubtedly ads and such should move
to HTML5/JS. I'm still not convinced about it for games yet.

------
bazookaBen
write about HTML5 game distribution, i'd love to hear input on this.

~~~
duwease
Yes, the first thing I thought after "ooh, neat" was "Are there any portal
communities for HTML5 even close to those for Flash?"

~~~
TomGullen
We've started building one which is going well: <http://www.scirra.com/arcade>

Not as big as Flash portals obviously but people love playing the games

~~~
xiaoma
I just tried one of the featured games. It was extremely basic, no sound and
pretty lame. Compare it to any of the featured games on
<http://kongregate.com> and you'll see that there's no comparison at all.

I like JS. I'm learning how to use some of its first class functions, and it's
really cool! But honestly the only reason I'd play any of those games is
_because_ they're written in an interesting technology... not because they
were actually more fun than the stuff written in flash.

There's a lot of potential, but the platform isn't quite ready yet.

------
basicallydan
Obviously, it's especially pretty awesome for multiplayer game development
because you don't have to worry too much about figuring out what method of
communication to use, firewalls, etc.

~~~
sil3ntmac
Yes and no. Websockets is awesome, but no UDP support yet (although chrome
nightlies have added this as an experimental feature!). Once UDP comes, we can
do p2p and eliminate the server round-trip (as well as the whole TCP ACK
bottleneck), vastly speeding up realtime games... but then we have to deal
with firewalls :D So its up to the dev to pick his battles, although I'm sure
there will be libraries to vastly speed this thing up.

------
factorial
"Honestly, HTML5 games get more attention just for being HTML5 – deserved or
not."

...that's one of his arguments why HTML5 is the "best platform". I wish he
would have gone more into detail how he defines "best" as his understanding of
that adjective doesn't seem to take into account that more mature platforms
have some benefits too. For instance, maturity.

~~~
austinhallock
It's definitely a shallow argument, but still a pro for HTML5 nonetheless. If
I can make a game that's more likely to be played simply because of the tool I
use, it's more lucrative to me.

I listed various other arguments for why I feel it's the "best" out there
right now. I think the strongest arguments however are the two games in < 24
hours each.

~~~
factorial
If it's only played due to the platform it is on, then it's due to a novelty
factor. I got that you were after "viral spread", but imagine a world in which
people cared a bit less about rapid deployment and more about quality. I
rather play a finely-crafted game than one that was put out in less than a
day. This is not to say that it is not possible to put something decent
together in a short amount of time. Just check out Ludum Dare for some
examples.

~~~
austinhallock
The post was on "rapid game development", not "polished game development".
It's up in the air which platform is best for a more generalized game, each
have their strengths and weaknesses. Ludum Dare is a good example of games
developed quickly in various languages -- it's certainly possible to create a
quality game under time constraints in C++, Java, what-have-you, my thoughts
however are that HTML5 is the optimal platform for that.

~~~
riffraff
>it's certainly possible to create a quality game under time constraints in
C++, Java, what-have-you, my thoughts however are that HTML5 is the optimal
platform for that.

you should probably substantiate that, at least in the article if not here, as
you have not given any reason for why this would be true (I have no idea if it
is or not).

It may well be, but nothing of what you wrote in the article supports this.

EDIT: let me clarify:

* Mobile Support (large support is not speed of development)

* No compiling (the only thing that seems somewhat related. Many things don't need to be compiled this days though)

* It’s not a plugin (irrelevant to the speed of development, at most a distribution issue)

* It’s not controlled by a single corporation (irrelevant)

* More active development (doesn't make you faster)

* HTML5 games get more attention (irrelevant to your speed)

If you meant "wanting to support gaming in mobile and desktop quickly html5 is
the best solution" then it could make sense.

~~~
sil3ntmac
I would argue that "not a plugin" and "not controlled by a single corporation"
are more than "irrelevant". Here's a few reasons:

\- Want to port your game to a new platform (game console? embedded device?) -
just get webkit/mozilla/<your favorite open source browser> to compile.
Although this is no small task, in many cases it can be easier and _way_
faster than rewriting the code for an entire game. not to mention this
mandates one port per console, rather than one port per game per console.
N^2->N time savings :D

\- Not being controlled by a single corporation is incredibly important. Take
iphone games: want to update your game to use some newly released feature of
the sdk? Get ready for 1+ weeks of waiting for approval. Notice a low-level
bug in the sdk? ha-ha, have fun talking to Apple's technical support. These
are the obvious reasons, there are a million-and-one examples as to how
limited access can slow down - and even halts - the game development process.

That's all I have time for now, I'll try and think of some more later

Edit: too/to

~~~
riffraff
they are mightily important concerns but not relevant to "create a quality
game under time constraints".

Take flash, which is evil in a plugin and controlled by a cruel corporation
and runs on unicorn blood. You will still be able to create a game in 24 hours
and put it on the market, people do it all the time. No ipad? Sure, read the
end of my previous comment.

Also, while this is still irrelevant (cause the statement is that html5 is
better than all the others, but there are plenty of open source things), I
don't see how finding a bug in the iOS sdk is any different than finding a bug
in a browser's canvas implementation. You work around it in both cases cause
you can't control your users software setup.

And the fact that iOS apps have to go through an approval process bears no
weight in the generic statement that a proprietary platform causes slow time
to market.

~~~
sil3ntmac
Okay, semantics; you're right, in my haste I misread the original quote. If
you're judging a game strictly on quality, platform has nothing to do with it;
most (all?) modern platforms have decent game libraries so dev time just
depends on what you're used to. If you're judging a game on _mass appeal_ ,
_popularity_ , or _user friendliness_ \-- or just plain success -- platforms
absolutely, beyond a doubt, matter.

As for your last point though... lolwut. iOS was just an example, the same is
true for consoles, other app markets, etc. iOS apps bear "no weight" in the
statement that a proprietary platform causes slow time to market?! iOS is one
of the largest and most developed-for proprietary platforms, which makes it a
great example, which means it absolutely _does_ bear weight -- and a lot of
weight at that -- in a statement that generalizes proprietary platforms.
</semantics>

