I got me 90 odd images that form an explosion animation. When I come to 'play' the animation, I use a Swing Timer
to set a new Icon for a JLabel
, and cycle through until I reach the last image.
My question is this: is it better to have loaded and stored all the ImageIcons
in some static form somewhere, or load them from file every time I need them?
Explosions are quite common in the game, and I have two sizes of them (scaling each image for every size of explosion seemed rather inefficient when I want them to swap very quickly) which makes for 200 images (roundabout).
Store or load?