TileMap with animations

ok now, I got a 2D sidecrolling game
it features tilemaps

it works like this: every “field” has a bufferedimage which is null or not

quite simple and it works

however now I wanted to feature animated tile sprites aswell of course… a static world would be kinda boring
but I’m not sure how it is supposed to be done.

I wanted to change my TileMap class so that it features a tile AND a animation per field
and it would check if the tile is null. if so it would check if the animation is also null and play it

there is already an animation class

I just wanted to know how the default way of solving this is

If applicable you could have the game loop through the tiles at the frame rate required, or with the other animation method you presumably have to tell it to advance, and call an advance frame method before the draw method. You would have to add an advance method to your tile class(empty) and create a animated tile that would override the advance method. If this doesn’t work with your architecture or you don’t understand feel free to e-mail me at satinyou@googlemail.com
Hope this helps ;D

yeah I ended up doing it kinda like that
as every tile in my game is now a what I call “bufferedTile” either a BufferedImage or an Animation