Hey I am using Libgdx to render a TileMap as a background of my game. I meight render some different layers lateron.
Without the tilemap Render and an single background picture it does work correct!
Something Strange happens when i use the TiledRender just take a look at it:
The white areas are normaly a Touchpad and a character...
@Override
public void draw(SpriteBatch batch, float parentAlpha) {
sprite.draw(batch);
}
My Map where i render my TileMap does look like this:
public class Map extends Actor {
private TiledMap map;
private OrthogonalTiledMapRenderer render;
public int[][] mapArray = new int[Config.X_SIZE][Config.Y_SIZE];
public Map(TiledMap map){
this.map = map;
this.render = new OrthogonalTiledMapRenderer(map,(((float)Config.VIRTUAL_VIEW_HEIGHT/Config.Y_SIZE)/(float)Config.TILE_SIZE));
this.toBack();
}
@Override
public void draw(SpriteBatch batch, float parentAlpha) {
this.render.setView((OrthographicCamera) this.getStage().getCamera());
render.render();
}
}
any sugestions to that?
I guess it's a bit heavy to have 27x48 at teh screen. My nexus 7 does run it at 50-61 Frames or do you guess that would be fine? And if i start it it has around 40frames. If i lock the Nexus and unlock it, it does run at 60-61 Frames? is there something i made wrong?
.
stackoverflow.comm
No comments:
Post a Comment