views:

485

answers:

3

I'm wondering what the most viable approaches are for 2d game graphics, running in straight (and cross-browser) Javascript?

I've found the canvas and SVG approaches so far. Are there other straightforward methods that offer primitive graphics operations like drawing lines, circles, pixels? Preferrably supported out of the box in IE, unlike canvas/svg. :)

(I recently wrote a dinky little javascript game. Straight CSS+DOM worked for me in that case, but I'm looking into better ways of doing it next time.)

-ThomasN

+1  A: 
Wilq32
+2  A: 

You can have a look at this very simple library:

http://fx.inetcat.com/

Quoting their manual:

Compact lightweight JavaScript library which extends DOM element by adding animation methods. Facilitates CSS properties and other parameters alteration along timeline. Supports parallel effects sets and effects chains. Has extended set of callbacks to adjust behavior.

If you follow the manual you see how easy is to make animations.

Paulo Lopes
A: 

I'm just starting my JS port of a game I'd written in Silverlight, so I haven't used it (yet), but I was really impressed by the demos and API for Raphael.

It has a great set of functions, including awesome animations.

An svg-based library lends itself well to developing with physics engines and such, in addition to being able to animate and manipulate (rotate, mirror, etc.) images/sprites.

Chris Jaynes