Tuesday, 15 June 2010

java - Sprites, storing bitmaps in arrays -



java - Sprites, storing bitmaps in arrays -

right i'm using sheet sprite frames , using 2 rectangles take frame sheet , drawing destination rectangle on canvas. wondering (in terms of speed) if getting every frame @ start , storing in bitmap array better, because sure easier.

i'm no means expert on subject, i've been developing tool manipulates animated sprites recently.

i see increased animation playback performance if load frames list or array ahead of time. allows me more phone call specific frame index, or variety of other things.

i using method similar described, , had 2 downsides:

the source bitmap not ever disposed, locking other applications; larger sprite sheets not played @ total speed.

i assume you'll have bigger memory footprint if start storing frames instead of 1 (but maybe not, since you'd loading whole sheet in other scenario).

i'd love hear more on subject more experience, found got improve results loading frames @ once.

java android arrays bitmap

No comments:

Post a Comment