Hacker News new | past | comments | ask | show | jobs | submit login

I don't know why it would be considered more difficult to use canvas/dom for rendering + JS. I've been working on a simple JS (well, CoffeeScript really) game, and it hasn't been very difficult at all. But then again, I do lot of JS and never touched flash.



I guess most of the reasons people mention here can be summed up as platform maturity. People might hate Flash, but when it comes to game development, it's a lot more mature than Canvas+JS.

Here's another example of that maturity: on Flash platform, you have three big game engines -- PushButton Engine, FlashPunk and Flixel Perhaps there are more, but these three are pretty damn good. When I google for "javascript game engine", the top two (distinct) results are Crafty and gameQuery. Crafty looks decent, but not quite up to PushButton's level. The second engine, gameQuery is pretty much inferior to all three Flash engines I mentioned: the API is very limited and the performance of the demo is abysmal.

Mind, this isn't a 100% fair review, it's not an in-depth comparison or anything like that. It is, however, the "first glance evaluation" you'll probably get from any Flash game developer who's wondering whether they should switch to HTML5+JS.

I'm not saying we should just give up and use Flash forever and ever. I'm trying to explain why HTML5+JS is not a mature game development platform yet.


I should point out that the things provided by Flex engines like FlashPunk are builtin in HTML5's DOM, for the most part. The boilerplate of an engine isn't really required.


That's true, to a certain degree. DOM might cover the object placement, the scene graph and perhaps collision detection.

On the other hand, I'm pretty sure DOM doesn't provide a boilerplate game loop. It might sound trivial, but sorting and linked lists also sound trivial and you don't see people reinventing them on a daily basis either.


The problem is that the HTML DOM is just to slow for any game that has some action going on. And as soon as you switch to using the canvas to render your game, you're back at figuring out and implementing stuff like object collisions yourself.


People often fail to draw the distinction between the developent tool and the platform when talking about Flash. With the tool anyone can knock together interactive animations with nice transitions and cut-n-paste bits of ActionScript from the web to tie it all together. I've seen non-programmers produce decent work this way. There's a lot of trial and error involved, obviously, if you don't really know how to program.

I usually program in Java but I'm using Flash (the tool) to throw together the GUI for a game I'm making. I find it's way more productive to develop the GUI visually rather than positioning and tweening things with code.


In Flex you have the ability to work with a structured hierarchy of display objects - each with their own transformation matrix. Flex pretty much handles all of the relevant transforms when you are doing event handling.

Of course, ultimately you can do all of that in a canvas but it is an awful lot easier in Flex.

Also, don't you have to manage the redraw of areas yourself with canvas?

[NB I hate what people do with Flash as much as the next person - but the actually tool is actually a pretty decenlt development environment (I just used the command line Flex compiler)]


Every time this discussion arises I use this example: http://www.audiotool.com/

I think it's one of the best Flash examples out there.

Ofcourse you can do this already in Javascript and support only some nightly build browsers. But I think it will still take a while before this will be mainstream in Javascript.


Your game wont work on my Windows and IE... flash does though.


IE9 implements hardware accelerated canvas (and is as fast as Chrome in my tests).


Your flash games won't work on most phones, though.


You mean they won't work on iOS phones, that's like 2% of the web browsing market. Not to mention iOS HTML5 support is shit.


Just because Flash is available for Android phones doesn't mean people have it installed.


there are a number of projects that fix this. explorercanvas from google, which can be autoinstalled and doesn't require admin. then you have the SWF converters, and the live shims.

IE not implementing the tag isn't a big deal, since they expose the drawing (directx) interfaces anyway

I got a press release yesterday that said jquery was now more common than flash across the top websites. the 'flash is everywhere' argument is a bit 2004 and isn't true anymore . javascript is everywhere


"I got a press release yesterday that said jquery was now more common than flash across the top websites. the 'flash is everywhere' argument is a bit 2004 and isn't true anymore . javascript is everywhere"

That's not the same, though. Of course JavaScript is everywhere- it always has been, because it comes with browsers. The point is that Flash is also everywhere, because everyone has it installed.


explorercanvas from google, which can be autoinstalled and doesn't require admin

I think you mean Chrome frame here? explorercanvas is an implementation of Canvas on top of SVG for IE.


That is what I meant, couldn't edit to fix the mistake




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: