Monday, April 8, 2013

[android help] OrthogonalTiledMapRenderer and normal Spritebatch just a white box?


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: enter image description here


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

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...