Designing my Javascript target

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Designing my Javascript target

Rezmason
I now have a fairly complete game with a Flash dependent view and a platform independent model. I'm now trying to set up my Javascript target so that I can reuse as much of my Flash view code as possible, and so that my game can run on browsers that have HTML5 support.

I've looked around for information about the best way to do this, and I've found conflicting opinions. I've read arguments for Raphael, the SVG library, and other arguments for a neash/canvas-nme sort of project. I've created a mockup of my game in SVG, and while it has some neat features, I'm not confident that it will run well. Since my game's view also relies heavily on bitmap filtering, I feel like I'll need to use an HTML5 canvas somehow no matter what.

Those of you who've compiled a large game to Flash and then to JavaScript: what libraries have you depended on? What works best?


-Jeremy

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Designing my Javascript target

Dion Amago
See my blog post:
http://dionamago.net/?p=410

The downside of the "re-implement flash APIs" strategy is that it's cumbersome for what you really need in a game, if you are needing to output multiple platforms, especially if those platforms are not yet mature.

Looking at your game, I think that using CSS transforms on sprites that themselves are small canvas elements would probably be the most efficient, since your background is mostly static, while keeping the graphical effects.

Dion


Jeremy Sachs wrote:
I now have a fairly complete game with a Flash dependent view and a platform independent model. I'm now trying to set up my Javascript target so that I can reuse as much of my Flash view code as possible, and so that my game can run on browsers that have HTML5 support.

I've looked around for information about the best way to do this, and I've found conflicting opinions. I've read arguments for Raphael, the SVG library, and other arguments for a neash/canvas-nme sort of project. I've created a mockup of my game in SVG, and while it has some neat features, I'm not confident that it will run well. Since my game's view also relies heavily on bitmap filtering, I feel like I'll need to use an HTML5 canvas somehow no matter what.

Those of you who've compiled a large game to Flash and then to JavaScript: what libraries have you depended on? What works best?


-Jeremy

--
haXe - an open source web programming language
http://haxe.org