Live data from Hacker News

Why HTML5 is the best platform for rapid game development

austinhallock.com

21–30 of 55 posts

Re: Why HTML5 is the best platform for rapid game development

#21
post #7

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.

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.

Canvas is not the only option. I'm currently developing a racing game where you can build your own race track in HTML5 with my colleagues for our final university project and we don't use canvas at all.

The whole game is built upon SVG, CSS3 (transform3d) and CoffeeScript and it works pretty fine, even on the iPad which is also the target platform. The limiting factor with this combination is the number of DOM elements. We are currently considering to render our racing tracks as a single image so we can remove the several SVG paths we currently use for this.

If you want to take a look you can find the source on GitHub[1] or play the game[2]. Currently only Chrome and iPad are supported. But that's only because we haven't added all vendor prefixes yet.

[1] https://github.com/stravid/slotcars [2] http://slotcars.herokuapp.com/

Re: Why HTML5 is the best platform for rapid game development

#22

Earlier quoted context omitted.

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 p…

>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. EDI…

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/ 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

Re: Why HTML5 is the best platform for rapid game development

#23
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.

Re: Why HTML5 is the best platform for rapid game development

#24
post #7

Earlier quoted context omitted.

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.

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…

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.

Re: Why HTML5 is the best platform for rapid game development

#25

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.

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.

Re: Why HTML5 is the best platform for rapid game development

#26
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.

Re: Why HTML5 is the best platform for rapid game development

#27
post #17
post #13

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.

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.

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?

Re: Why HTML5 is the best platform for rapid game development

#28
post #13

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.

They were not 3D games for starters. So he would have to abuse the "better environment". Second, he specifically mentioned the ease of deployment to all kinds of devices and the ease of collaboration on the development of the same game.

Re: Why HTML5 is the best platform for rapid game development

#29
post #8

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.

Also performance right now simply isn't up to par. I'm writing some apps right now that heavily utilize the canvas element, and I'm having to rewrite a large portion of it at the moment simply because I can't get more than 5 fps on one of the new ipads.

Really? I can get 25-30 fps on a canvas game on Safari for iPad 2 or 3.

Re: Why HTML5 is the best platform for rapid game development

#30
post #7

Earlier quoted context omitted.

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.

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…

You think audio is a trainwreck? You haven't tried detecting key presses.
Post reply on HN