Live data from Hacker News

Gaming in HTML5: the future is now

scirra.com

1–10 of 41 posts

Re: Gaming in HTML5: the future is now

#5
Google sure is good at guiding the conversation on these APIs. It used to be that everyone complained about Chrome's piss-poor audio implementation, but now people are complaining that Microsoft and Mozilla are 'slow to support' the Web Audio API 'standard' even though it looks like Google documenting their NIH mixer library after the fact instead of an actual market-driven standards effort.

Re: Gaming in HTML5: the future is now

#6
post #2

and goodbye battery life. Even the simplest HTML5 game find a way to use 90% of my CPU.

That's because many mobile browsers aren't optimised yet - I think that will be solved with time.

I question whether it's really a matter of optimization. Even on the best modern desktop browser with the most modern JS runtime, JavaScript is going to run 5-10x slower than C. On top of that, consider increases in memory usage.

Mobile hardware is likely to keep getting better, but it's not magically going to make HTML5 games run well on mobiles. For that to happen, a few things are needed:

Magical improvements in JS runtime performance to bring JavaScript closer to native languages. You can at least count on JavaScript to continue getting faster, but there may be a wall somewhere. You may also have to rewrite your JavaScript to use new features and libraries to approach native performance, which isn't free.

Reductions to the amount of work mobile JS runtimes need to do. Right now all the JS for your HTML5 game has to be loaded, parsed and compiled on every run, and doing that is pretty slow on a mobile CPU.

JavaScript and related libraries (like WebGL and Canvas) need to provide good support for concurrency so that you can utilize the multiple cores available on bleeding-edge mobile devices. Clock speeds on individual cores of mobile devices are not likely to reach desktop heights and if you look at desktop trends, even if they do, they won't ever get much higher. Right now, you've got web workers, but they're too limited to be of much use in games (especially if you care about power consumption).

Improvements to power consumption in mobile HTML5 implementations. Even if you can barely hit 60FPS with your pure-javascript algorithm in a mobile browser, it's going to drain your battery a lot faster than a native app that's running 5x faster and letting the CPU/GPU sit idle when they have no work to do.

Re: Gaming in HTML5: the future is now

#7
The problem with HTML5 games is that the game's source code is on your machine which means DRM is gone. Not only that but the problem for me is that my assets and my source is freely available to you to use in any way you want. You can take it and rehost it on your website and I lose any way of making a profit off my game.

Re: Gaming in HTML5: the future is now

#9
post #7

The problem with HTML5 games is that the game's source code is on your machine which means DRM is gone. Not only that but the problem for me is that my assets and my source is freely available to you to use in any way you want. You can take it and rehost it on your website and I lose any way of making a profit off my game.

I don't buy this to be honest, what's stopping you from stealing from any other game? Why have you singled out HTML5 as exclusively suffering from this problem?

Re: Gaming in HTML5: the future is now

#10
post #7

The problem with HTML5 games is that the game's source code is on your machine which means DRM is gone. Not only that but the problem for me is that my assets and my source is freely available to you to use in any way you want. You can take it and rehost it on your website and I lose any way of making a profit off my game.

I don't buy this to be honest, what's stopping you from stealing from any other game? Why have you singled out HTML5 as exclusively suffering from this problem?

Well, because the web, by nature, is open. Javascript is source, not some kind of bytecode. You can easily look at the source of any web page and do whatever you want with it (granted there are obfuscators available, but run it through a tidier and it's at least easier to work with than assembler would be).

It's not that you can't steal games from other platforms, it's just that targeting HTML5 makes it ridiculously easy. I think the web being "open" is a great thing, but obviously it's a genuine concern for people who distribute games. There's already a big problem in the Flash circles of strange Chinese portals stealing a game and sticking their logo on it.

It's not just about the code, either - all the assets (images, sound) pretty much have to be readily available in an unobfuscated format.

Post reply on HN