HTML and CSS Reference
In-Depth Information
Table 7-1. The Most Common Tablet Resolutions and Their Aspect Ratios
Pros
Cons
Sprite sheets
Simple and easy to implement
Fast
High memory usage: even moderate
animations use tons of memory and take a
long time to download.
Opaque: scene structure is not exposed to
code, so tasks such as swapping parts are
not easily done.
Vectorization
Assets can be nicely scaled and rotated.
Scene structure is fully exposed to code; recoloring
and swapping parts are easy to do.
Low memory usage
Very difficult to implement correctly and
efficiently
Slow; does not scale well to complex assets
Cutouts
Scene structure is exposed to code, though not
as completely as vectors.
Low memory usage
Fast
Scenes must be structured in a certain way
by the artist.
Not suitable for every type of scene
Like a lot of things in HTML5 game development, there is no best method; it's all about trade-offs and
compromises. Which method(s) you use entirely depends on the type of game and assets you're creating. Moreover,
you may employ a variety of methods in a single game. An asset that will need to be scaled way up could be vector,
whereas characters could be cutouts, and short, hand-drawn explosions could be sprite sheets. The ideal game engine
would allow all three types to be used interchangeably.
 
Search WWH ::




Custom Search