So I drew 20000000 tiles representing ocean:
and put them into an array
But…
is it possible to do this?
the code is not working (obviously) but does anyone know of another way to try this?
link:
So I drew 20000000 tiles representing ocean:
delete some combinations of tiles that are unconnectable to other tiles. like:
try to add the tiles only when you need to while making tilemaps.
Thanks for a fun and edifying challenge, @marioeligi!
What I also myself found immediately unintuitive, was that one cannot directly compare two Tiles OR two Tile Location objects directly to eachother, like you attempt with this statement:
The reason seems to be that two (instances?) of an object can not be equal and there is no _.isequal() method defined, as discussed by @cosmoscowboy et.al. here:
But there are other working solution which you could use, some of which I have played around with in this example:
All 3 above work with varying degree of efficiency, but you can see for the green grass tiles, that none of the direct object comparisons work.
There are probably other and more efficient ways to do this, but that would be a question for other more experienced forum members. I never, for instance, figured out @NightIsland’s myTile.tileSet methodology for the same type of comparisons discussed here: