Hello again everyone,
We're using the Citrus Engine and Box2D to make an endless runner game.
We are at a point in our game's development where we need to make sure that the obstacles we generate on the fly are not impossible to avoid. We have 5 different types of heroes that have different ways of moving up and down. This means that we're going to generate the world according to each hero's moving pattern and maybe game speed, this includes ground heights, gaps and the placement of obstacles.
We started doing some tests with only one hero at the moment, this hero has the ability to double jump, which means he can jump really high or far, so we can make the gaps between grounds wider and have more obstacles close to each other because in most cases he can just jump them all together. We are generating the obstacles based on a few rules and "obstacle density" parameters. This approach got us quite far BUT, and this is a big but, we cannot guarantee at the moment that the player will always have a safe space to go through.
We're not sure if we should just keep on adding rules to the algorithm that generates the obstacles, because there's a ton of different cases for each hero, or if we should solve the problem in another manner. We've been thinking about a logical grid that keeps track of a chunk of "slices" that came before so that we can have more accuracy in the generation of the slices that come after, but we're still not sure.
What do you guys think? Any advice would be welcome. Thanks!