1
\$\begingroup\$

I'm looking to create a game like Dino Run, where I will need to create large slopes for a level, procedurally generated. How do I go about this?

Do I have to make certain predefined pieces of level that I can connect to each other? How do I make this fully procedural?

I'm using Sprite Kit if it makes any difference.

\$\endgroup\$
2
\$\begingroup\$

You essentially want to experiment with various noise functions, such as Perlin Noise. The various parameters you choose, and how you interpolate the information, will give you vastly different results.

As for how you transform the information into graphics, it'll vary. In Tiny Wings, there's clearly a foreground image that's 'cutout' above the noise function. Additionally a line gets drawn along the function to give the appearance of a border. In Dino Run, since the style is so simple, it's essentially filling the area below the function with a solid colour. Then sprinkle other stuff like trees and rocks around the level with some other noise function.

I don't have experience with Sprite Kit, so I wouldn't know if implementing it that way would be practical; I'd personally write a custom shader to draw it, using OpenGL ES.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.