How to draw a tiledmap using scene2d

I want to create a tiled game using libgdx and I found this tutorial

Box2d Tiled Maps

TileMapRenderer has its own renderer for drawing tilemap. I want to render tiles using scene2d because I'm used to doing things with Scene2d. also with the Stage class, things like input are easier to do. Is this tile creation accessible using the Actor class? can I use the scene graph without using the spritebatch passed in the draw method on the Actor class?

+4
source share
1 answer

No, the TileMapRenderer and scene2d Stage / Actor APIs are different. Tile map APIs do not extend or use scene2d APIs.

You can use both at the same time in one application (for example, to render your game zone using plates and your user interface using script2).

There is a new and improved (as of February 2012) Libgdx Tile Map API: http://code.google.com/p/libgdx/wiki/GraphicsTileMaps , which has an example game that can help clarify things.

+4
source

All Articles