Live data from Hacker News

Gaming in HTML5: the future is now

scirra.com

21–30 of 41 posts

Re: Gaming in HTML5: the future is now

#21
post #10

Earlier quoted context omitted.

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…

>not some kind of bytecode

Have you ever tried to reverse engineer/figure out the details of any of google's compiled javascript?

It's pretty damn obtuse.

Re: Gaming in HTML5: the future is now

#22
post #18

Earlier quoted context omitted.

Yeah, some good points I guess. But the fact we make an engine lots of games use makes it a bit easier: if magical improvements in JS appear which require some tricky changes to take advantage of, we can do the hard work in our engine and all the games benefit from it. But yeah, probably will always be a bit slower. 2D games don't tend to have really complicated logic though.

> 2D games don't tend to have really complicated logic though. Your demo asteroids game certainly doesn't, but what about a 2D game that's actually worth playing? Things like physics or flocking algorithms are going to be very expensive in JS.

You're right physics uses a lot of CPU, but I don't think games not using physics are automatically not worth playing. Did you see this platformer? http://news.ycombinator.com/item?id=3192719

Re: Gaming in HTML5: the future is now

#23
post #20

Earlier quoted context omitted.

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?

Other games tend to hide their assets into cryptic packages and file format (or they can even try to encrypt them). Not always impossible to bypass, but very annoying. It's a bit harder to do in html5, where you are supposed to use the standard formats for images/sounds, etc. That, alone, is not really an issue. I suppose you could do the same as native games. If a demand is there, an API or libraries to do that will…

> That, alone, is not really an issue. I suppose you could do the same as native games. If a demand is there, an API or libraries to do that will appear.

How do you propose to obfuscate images and audio in a way that's going to work across all browsers and can't be easily circumvented (and it obviously can't be security through obscurity if it's to be used by more than one game).

> In practice, though, can someone make something out of loads of minified javascript ? Or is it equivalent to reading deassembled C ?

Minified Javascript would be very easy (unless the minifier renamed everything, but even that isn't too bad). Javascript compiled with something like Google's Closure Compiler would be a lot harder, but still a lot easier than disassembled C.

The assets are much more of a problem than the code - although not being able to compile the code means if you do find a way to obfuscate the assets, your deobfuscation code is going to be out in the open.

Re: Gaming in HTML5: the future is now

#25
To summarize: Here's a game that doesn't work on mobiles, doesn't work in IE or Firefox or any version of Chrome less than 15. Now that Adobe has caved to the various walled-garden app stores and given up hope for a share of the casual games mobile market, game developers will be stuck with our spaghetti Javascript and browser idiosyncrasies for the next decade or until the standards agency manages to raise Jesus and tie its shoes at the same time. So suck it up and deal with the fact that OO code and multi-platform development are dead, and we're so cool because we made a game in 3D that can almost be played at 2 FPS on a phone browser (but we'll let someone else figure out how to make phones 15x faster... it's right around the corner!)

Re: Gaming in HTML5: the future is now

#26
post #24

I wouldn't say the entire industry is heading for HTML5. Yes, it is very capable, but, check out this demo: http://molehill.zombietycoon.com/ Flash's decision to drop mobile is probably because they're focusing more on Flash 11 and Molehill.

Agreed. And Molehill will be powering a majority of iOS games lonnnnng before WebGL games are playable in Safari.

Re: Gaming in HTML5: the future is now

#27
post #18

Earlier quoted context omitted.

> 2D games don't tend to have really complicated logic though. Your demo asteroids game certainly doesn't, but what about a 2D game that's actually worth playing? Things like physics or flocking algorithms are going to be very expensive in JS.

You're right physics uses a lot of CPU, but I don't think games not using physics are automatically not worth playing. Did you see this platformer? http://news.ycombinator.com/item?id=3192719

I don't think presenting a retro platformer (which, FWIW, crawls here in FF 8) really argues your case much. Why should developers go back to making simpler games to get adequate HTML5 performance when they could develop directly for the target platform and use the hardware to its full potential?

Re: Gaming in HTML5: the future is now

#28

We ported our 2D Android/iOS game, "Bouncy Mouse," to HTML5/WebGL. It's on the Chrome Web Store ( https://chrome.google.com/webstore/detail/cgdllcbmneiklcmbec... ) and doing great. With WebGL, the performance seems great, and the graphics and effects look sharp too. Audio was definitely an issue, and more work needs to be done there by browser makers. Using WebkitRequestAnimationFrame over setTimeout helps battery li…

Nice game! Runs smooth. Why do you reject non-Chrome browsers instead of doing feature detection?

No real reason. One man developer (who's on vacation right now), and we were heads down getting this to work on Chrome for a little under a month so he could make his vacation on time. :)

There were a few things that were working in Chrome only when this was coded. For example, Opera stable didn't have WebGL support at the time. But, in general it works great on Firefox too. When my colleague is back from vacation, we'll get it working on all the browsers (except IE, since there's no WebGL support there). Thanks for the comments too!

Re: Gaming in HTML5: the future is now

#29

To summarize: Here's a game that doesn't work on mobiles, doesn't work in IE or Firefox or any version of Chrome less than 15. Now that Adobe has caved to the various walled-garden app stores and given up hope for a share of the casual games mobile market, game developers will be stuck with our spaghetti Javascript and browser idiosyncrasies for the next decade or until the standards agency manages to raise Jesus and…

So, since a a5's gpu is 7x better than an a4 (in one year) I'm thinking they'll be fast enough about the time user's 4s's contracts are up.

Of course, that's assuming there aren't any javascript-on-the-phone performance enhancements to be had. Also, it's assuming apple will someday open up webgl on the phone.

Post reply on HN