Tag Info

New answers tagged

2

If your chunks are square, you could align Tiles into a single array, and use a little math to find you indices. For example: class Chunk { final int SIZE = 8; int[] tiles = new int[SIZE * SIZE]; int getTile(int col, int row) { return tiles[row * SIZE + col; } } The same this could be applied to Map. I'm not sure how much more efficient this ...



Top 50 recent answers are included