Hi everyone! I'm starting development on my new game and I want to keep a development log, so you can follow along.
My game is going to be a side-view tank battle game. The first thing I need to create is a level generator.
Day 1. Level generator
I used a pretty straightforward algorithm to create the generator:
1. When layout starts, I add the coordinates of key points to the array. Each following points has a random coordinates that depends on the previous points (for example: random(-100,100) + oldX ).
2. Next, I added two Tile Background objects to the layout: one for ground, the other one for grass.
3. Then, using a loop and a special spline formula, I set positions the mesh points in a way that connects the key points from the array.
Overall, I got a pretty decent level generator =)