I want to create an infinite game background like 'Binary Rush' or 'Stay in the line'. The background could be a simple track. It's sort of like a random racing road track.
Currently I have used a single SKShapeNode to draw the path, and just set the lineWidth to a big number. I use var path = CGPathCreateMutable();
to create the random track.
Apparently this is not the ideal solution since the track is restricted to a single line. I would like the track could be expanded with different width or even add some obstacles inside the track.
So my questions are: 1. For those two game, are their backgrounds just images, and when scrolling, it just load a random one? 2. How could I random generate those tracks, with the flexibility to change its width or add obstacles inside them? 3. How to combine the different segments of those tracks, I assume not to create an infinite long path. Should split it into different segments and removeFromParent once the segment is scrolling off screen.
Thanks a looooooooooooooot!!! :)