I have decided that my game will be split up into different overworlds going down further and further. For my second one, the theme is foliage and overgrown. The tricky thing with this is making tiles, because the amount of basic tiles I have is over 2 pages of the tile map editor. I thought that I could have a foreground sprite where I a drawing a random set of foliage pieces on a chance on array of all locations with walls. Trouble is, that block doesn’t exist. I know I could probably do it with array of all x locations, but that will take a long time and I am trying to make my code efficient, as it is already > 1200 blocks.
Is this small enough? You could also use the Tile Util extension, which has a “for each tile in (current tilemap)” block. The two 16s in the code are the width and height of the tilemap. Just make sure that the first one, with the Y variable, is the height, not the width.
As the comment notes, you could also put your tile spawning code in there instead of unnecessarily using memory to create a list when you don’t have to. This would also avoid looping through the same points twice, once to create the list and another to loop through the list to set the tiles.
Yes that sort of works. Since my camera can never go off screen I will create an image 160 by 120. At each wall I will have a percentage chance to draw a random image of foliage or cracked walls over it. This should give the appearance of random tiles. Oh. I might need this to be seeded so it is always the same every time I restart the game. Any suggestions?