# Tile animation with standard java MapReader

**URL:** https://discourse.mapeditor.org/t/tile-animation-with-standard-java-mapreader/2810
**Category:** Questions
**Created:** [November 5, 2017, 1:41am UTC](https://discourse.mapeditor.org/t/tile-animation-with-standard-java-mapreader/2810 "2017-11-05T01:41:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PiratePeter](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@PiratePeter](https://discourse.mapeditor.org/u/PiratePeter)
#### Post date: [November 5, 2017, 1:41am UTC](https://discourse.mapeditor.org/t/tile-animation-with-standard-java-mapreader/2810/1 "2017-11-05T01:41:13Z")

</div>

Hello guys

I recently started a little game using Tiled(great job btw 👍🏻) and Java without any frameworks.  
Currently i’m using the standard tiled.io.TMXMapReader and it looks pretty well so far.  
But when i try to load a map with animated tiles, just the original tiles are shown.

Now i would like to know if there is a way to realize it with the standard map reader or if it’s more recommendend to use a framework which already implemented this feature.

---

<div class="post-metadata">

### Author: ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)
#### Post date: [November 7, 2017, 2:26pm UTC](https://discourse.mapeditor.org/t/tile-animation-with-standard-java-mapreader/2810/3 "2017-11-07T14:26:25Z")

</div>

> [@PiratePeter](#):
>
> I recently started a little game using Tiled(great job btw 👍🏻) and Java without any frameworks.  
> Currently i’m using the standard tiled.io.TMXMapReader and it looks pretty well so far.  
> But when i try to load a map with animated tiles, just the original tiles are shown.

Nice to hear you’re enjoying Tiled! Unfortunately though, tile animations are currently not implemented in libtiled-java. The `AnimatedTile` class is an old remnant from Tiled Java and not currently functional.

If you’d like to look into supporting tile animations, you should start with the generated `org.mapeditor.core.Frame` and `org.mapeditor.core.Animation` (referenced from `TileData.animation`) and look into some way of driving the animation and rendering the “current frame” when rendering a tile. It may be that the code in `AnimatedTile` helps, but it could also be misleading.

Since I don’t personally code Java at the moment, any help in maintaining or improving libtiled-java is greatly appreciated!

---

<div class="post-metadata">

### Author: ![PiratePeter](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@PiratePeter](https://discourse.mapeditor.org/u/PiratePeter)
#### Post date: [November 10, 2017, 6:00pm UTC](https://discourse.mapeditor.org/t/tile-animation-with-standard-java-mapreader/2810/4 "2017-11-10T18:00:10Z")

</div>

Thanks for your response.  
I added some methods to some of your classes to load the animated tiles into my game. But it’s too messy and too specific to share it at the moment.  
I will let you guys know when i manage to create a clean and general solution.
