Slick only has Images, but that's fine.

I can't really figure out why you chose to store images in an animation, and other stuff.. I'm just going to give
you my way of drawing a tilemap that can be changed on the fly.
I usually create a tile object, holding it's own position and an image perhaps.
If I ALL the tiled, I use a Tile[][]-array, and load all the tiles into it on initialization.
When I need to change something about it I can just do something like this:
1 2 3 4 5
| public Tile getTile(x, y) { return tiles[x][y]; }
getTile(1,1).changeImage(Art.getBrick(4)); |
Where my art class contains this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| private static Image[] bricks = new Image[8];
public static void loadBricks() { try { SpriteSheet sheet = new SpriteSheet(ART_PATH + "bricks.png", 20, 20); for (int i = 0; i < 8; i++) { bricks[i] = sheet.getSubImage(i, 0); } } catch (SlickException ex) { Logger.getLogger(Art.class.getName()).log(Level.SEVERE, null, ex); } }
public static Image getBrickImage(int id) { return bricks[id]; } |
This way images are only loaded once into different image-objects, saving that CPU usage.
It depends how much you need to change, and how often.. With the imformation you gave, this approach should be fast though

Good luck!
