HTML and CSS Reference
In-Depth Information
Figure 4-3: A CSS3 RPG.
The black sheep of the family, SVG has actually been hanging out doing its thing since 2004. However, with
the release of IE9 in April 2011, as the first release of IE to support it natively, people are coming around slowly
to its benefits and potential uses.
Scalable Vector Graphics (SVG) provides a way to draw resolution-independent graphics. Much like Flash,
SVG stores the instructions to draw elements rather than the resultant pixels that make up those elements. This
means that, provided it's used correctly, SVG creates small file sizes good for mobile devices. It also generates
its own scene graph—much like the standard DOM—and is well supported on WebKit mobile and useful in
touch games.
In many ways SVG combines the best of both worlds between Canvas and CSS3. The major problem is
that performance is lacking, so if you are building an action game, SVG is probably not an option. Figure 4-4
shows the SVG game built in Chapter 14, “Building Games with SVG and Physics.”
Search WWH ::

Custom Search