Hello I'm trying to make procedurally generated maps using libGDX my tiled map won't render just displays an empty screen with all of my sprites on it. . But if I load a tiled map I made in the Tiled program it renders fine. The texture region exists and is gotten from a texture atlas.
Below is how make my tiled map in game. I have multiple layers one for each terrain kind that are drawn one on top of each other and then bit masked.
private void fillInTiles(){ // fills in all of the tiled map tiles to empty base tiles
TiledMapTileLayer layer= new TiledMapTileLayer(xSize, ySize, 32, 32);
layer.setName("layer"+mapLayers.size());
for(int countx=0; countx<xSize; countx++) {
for (int county = 0; county < ySize; county++) { Cell cell = new Cell(); TextureRegion region=assetts.getRegionByName("dirt.0.255.0", "assetts.atlas");
cell.setTile( new StaticTiledMapTile(region));
layer.setCell(countx, county, cell);
}
}
tiledMap.getLayers().add(layer);
}
Hello I'm trying to make procedurally generated maps using libGDX my tiled map won't render just displays an empty screen with all of my sprites on it. . But if I load a tiled map I made in the Tiled program it renders fine. The texture region exists and is gotten from a texture atlas.
Below is how make my tiled map in game. I have multiple layers one for each terrain kind that are drawn one on top of each other and then bit masked.
private void fillInTiles(){ // fills in all of the tiled map tiles to empty base tiles
TiledMapTileLayer layer= new TiledMapTileLayer(xSize, ySize, 32, 32);
layer.setName("layer"+mapLayers.size());
for(int countx=0; countx<xSize; countx++) {
for (int county = 0; county < ySize; county++) { Cell cell = new Cell(); TextureRegion region=assetts.getRegionByName("dirt.0.255.0", "assetts.atlas");
cell.setTile( new StaticTiledMapTile(region));
layer.setCell(countx, county, cell);
}
}
tiledMap.getLayers().add(layer);
}