I am looking for some help on how to make a 'Tile Solver' for my game. I am generating tiles at a certain X position off screen and I am moving all tiles X positions across the screen to give a scrolling effect (for an endless runner game).
I have some global values which basically keep track of when to create gaps and also control the length of the platforms that are generated. Once the tiles reach a certain X position off screen (on the left) they are destroyed. I also have a global value to control the height of the platforms too.
I am looking for help on how I can start to create a solver which will place the correct tile by its neighboring tiles. My tile sprite has 32 animation directions, each of these animation directions holds a different tile. My current setup in the event editor basically generates the tiles and platform lengths and gaps and height. When there is a change in height I want to change the tile that is generated to a different tile and then when there is a gap in the platform I want to change the end tile of the platform and the start tile of the new platform.
I don't know what the best way is to handle this and I am pretty sure that I may need a 'For Each' loop because I am dealing with instances which are the tiles that are being generated.
There is probably more than one way to do this, if you need to see the logic in the event sheet I am happy to provide screenshots. Right now the global values I have is "Platform Length", "Platform Gap", "Height", "Ticker". The value names are pretty clear, I use them in combination with some simple comparing and random() functions to give variation in the gaps and platform lengths.