Teonnyn Posted August 13, 2016 Share Posted August 13, 2016 I'm creating a game that requires a grid, and while I've got the basics down, I'd like it to turn a finite grid into infinite that can be scrolled in all directions. How would I go from this: function CreateHexGrid() { for(var x=0; x< mapSize; ++x) { gameMap[x] = []; for (var y=0; y < mapSize; ++y) { var square = new diamondTile(game, x, y); gameMap[x][y] = square; gameContainer.add(square); } } game.world.setBounds(); } to infinite? The image I have describes the results I have thus far. Link to comment Share on other sites More sharing options...
symof Posted August 14, 2016 Share Posted August 14, 2016 https://github.com/borbit/tiler Link to comment Share on other sites More sharing options...
Recommended Posts