c# - How to create side scrollable 2d terrain in unity? -


hi iam trying build game in skater skate on irregular terrain 2d , side scrolling. iam not getting how instantiate terrain dynamically , in different shapes along x-axis.. want achieve http://thegoldenmule.com/labs/terramorphicgenesisalgorithms/. please help.

assuming you're referring 'circle hill' setting on demo linked, here's i'd try:

step 1: generate nice 1d noise. guess linked demo using 2 octaves, i'd start that. these points end being spread apart when generate pixels actual line. looks linked demo had them 50 pixels apart.

step 2: use spline interpolation values between points generated in step 1.

to sense of how works, try this demo (make sure change setting cubic spline though). you'll need experiment parameters of step 1. hunch you'll want avoid noise erratic & you'll need space resulting points out bit. this:

enter image description here

alternatively, when looking spline demo/library, came across curvy - might provide want & save time of rolling own code. if not, there other spline libraries out there might work.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -