It's all a matter of processing power and economics. HTML5 browsers are just slow, buggy virtual machines for a computing platform that never existed.
Drivers tend to be written in C/ASM because every cycle counts when your hitting the limits of a bus. Nobody wants JavaScript Nvidia drivers.
Game engines, same reason again, it takes more work in a lower level language but what you gain is performance.
Which of course, is totally obvious however, this isn't my point.
A web-browser running some javascript code providing access to a HTML5 DOM, is no less capable in terms of coding efficiency than any object-orientated language and a suitable framework/engine to work in.
And the only reason we are seeing the proliferation of HTML5 as a gaming platform now is because of one un-important reason, and two important ones.
The unimportant reason : That the code is portable across multiple platforms.
Why it's unimportant : Good engine code is portable on those same platforms, for native compilation in C etc.
Now the two important reasons we're seeing the proliferation :
A) Certain vendors don't let you release or even write native code, you're forced (will be forced) to use HTML5/Javascript (because it protects their investment, not because it's better for the consumer)
B) Every man and his dog gets into web-development, fancies themselves as a game developer and sticks with the language they know.
--
Now if a game is fun, then people arn't going to care if you coded it in machine code or javascript. (They'd care even less if it wasn't fun)
But if you're on some mobile device, then it does matter because for now, the devices are still fairly restrictive when compared to desktop computers. So coding in a native language for the device or coding in HTML5 is the difference between some laggy version of solitare or some fast and detailed 3D world. (I know that's an exaggeration but the margin is still signifigant, especially when it comes to latency bound operations such as realtime sound processing)
One day it won't matter, the gap between native and interpreted performance will be nothing compared to the upper capabilities of the device.
But for now, anybody looking to get into web-development who also would like to write games, HTML5/Javascript is an excellent choice.
However if you want to be a professional game developer or indeed, are a hobbiest that wants to really understand game development? don't waste your time with a markup language that's more suited to a newspaper layout and a scripting language that was designed for flexibility, not speed.
And yes, I know the goolge JS engine (V8 or whatever) is fast, optimized with JIT style capabilities etc
But do you care? honestly? I mean what kind of claim is that? "Our new javascript engine is only 3% slower than native code!"
So it's still slower than native code? and I've gained absolutley nothing but some exotic language features that are useful in the abstract but of no use when it comes to mathematical algorithms. My language is already turing complete thanks and I'm a game developer, I need to be next to the hardware, not waving at it from across a river.
Bookmarks