Problems with autotiling between different level chunks

(TaylorAnderson) #1

I started using HaxePunk a while ago but the community is not nearly as responsive, so I am crawling back to the Flashpunk forums for a question about HaxePunk (although mostly pertaining to how grids work)

So I’m trying to make a world out of multiple different chunks of level that I arrange (I make the levels in Ogmo, they consist just of a grid and a tileset).

I also have an algorithm that does autotiling for me, to save me a tooonnn of time once i actually start making content.

My problem is: autotiling relies on the grid of the level to determine which tiles it will lay where. This works fine for individual levels, but when you put them together the seams show. Different chunks don’t notice each other so they can’t take their neighbours’ grid data into account when doing their autotiling.

What I’m looking for is either some way of taking x/y values and using them to find tiles within multiple grids, OR a way to put all the grids together into one large grid object when the level is loaded.

Any ideas?