[RELEASED] Endless Terrain2D Generator

Asset Store Link

In Terrain2D tool, you can easily design 2d hill climb style terrains. Layer based system allows you to build terrain that you want. For example you have a main layer and you want more bumpy terrain after 1000 meters, you can add a new layer and set it’s start point, weight and frequency you can set it’s end point if bumpy region is finite.

Collider of terrain will support polygon colliders for 2D physics and mesh colliders for 3D physics. And yes it is working on mobile fluently (Only tested on Galaxy s3).

Features

*Procedural terrain generation depending to a transform
*Node based noise generator editor
*Text based serialization for saving your noises
*Advanced object spawning system with pooling.
*A Demo car for trying your terrain
*Working on Unity Free
*Mobile optimised

Planned Features

*Exturding option to get 3 dimentional view.
*Gap generator for bridges (This will probably contain bridge generator.)
*More advanced texturing options (I am not good at shaders, this feature will come so much later)

If you have a feature advice or question. Please feel free to say and ask.
Thanks.

Documentation || Demo || Demo2

hi, looks like a cool system

I always ask the same question with these types of assets :)… will this work in the case of an endless runner where the player and camera stay in the middle of the screen and the terrain scrolls in one direction… This is to avoid the floating point precision issue when moving FAR away from coord 0,0 in Unity. Or does your terrain generation system requires the camera to actually keep moving in one direction therefore moving further and further away from the centre coordinates 0.0?

Thanks

Hi
Thanks. In the package, Terrain requires a transform (Camera or player etc.). But your idea is good to avoiding the floating point precision. I am probably going to implement this option for the next update. It is easy to make this :slight_smile:
Thanks for the advice :slight_smile:

I’m thinking in buying it!

Is there any news or additional demos? =)

I think it will fit my needs buy I want to be sure!

Hi
I am going to release a new version in next few days . That update will contain

*Advanced object spawning system with pooling.
*A Demo car for trying your terrain

New Demo With Car

Thanks! You just won me with this demo! =)

I’m happy that i was able to help : )

New verison is under review : )

excellent,
nice to hear about the spawning and pooling built into the package…

any update not he endless feature where player is kept at origin?

thanks

Hi

I am going to implament that feature too . But I am a collage student and exams are coming. I will be busy for 2 weeks . Sorry for the delay. :frowning:

nice one

Hi
New version is now online. This version comes with

*Advanced object spawning system with pooling.
*A Demo car for trying your terrain

New Demo With Car

Hi
Next update will contain bridge generator. :wink:

Hello,
I just bought this Asset, and i’m not sure I understand the Documentation very much.
How can I have a Smooth Hills Terrain like on Tiny Wings ? Something like this :

mygaming.co.za/news/wp-content/uploads/2011/12/Tiny-Wings-Screen.jpg

Thank you

1617714--98737--$screen568x568.jpeg

Hi

The package has perlin noise generator. You can make similar terrains with that generator but it wont be exact same. Tiny wings has sinus like terrain. Perlin generates random hills this means there can be a hill on a hill :slight_smile:

Settings of terrain

Result

Ok i am going to add a new generator for that. If you want to try terrrain in the picture. Download attachment and put it in resource folder that is in terrain2D tool folder.

And if you want take updates early . You can send Verify Invoice Number via email. :wink:

Email : sayiliromer@gmail.com

1617795–98748–$TinyWings.txt (1.82 KB)

Hi

How can i get in the ObjectPlacer script, the objects rotated along the normals of the terrain? Like in “Extreme Road Trip” or the mentioned “Tiny Wings”

Waiting new features and thks

There is no feature for that. But i made a quick look at the code and modified it for you

At Terrain2D.cs Script add this function

public Vector3 ComputeNormal(float DistanceFromEnd,float spacing)
    {
        int Xpos = (int)(BodyMeshGameObj[BodyCollGameObj.Length - 1].transform.position.x + updateX - DistanceFromEnd);
        Vector2 delta1 = new Vector2(Xpos + 0, height * terrain.module.GetInstant((Xpos + 0) * freq, 0, 0)) - new Vector2(Xpos + spacing, height * terrain.module.GetInstant((Xpos - (int)spacing) * freq, 0, 0));
        return delta1;
    }

and edit DistanceRule function at ObjectPlacer.cs like this

void DistanceRule(PlacerRule rule) {

        if (terrain.distance - rule.lastPlacedPoint >= rule.inputValue)
        {
            rule.lastPlacedPoint = (rule.inputValue) * (rule.placementCounter + 1);
            rule.inputValue += (rule.enhancer) * (rule.placementCounter);
            for (int k=0; k < rule.Count; k++)
            {
                Vector2 aa = terrain.ComputeNormal(rule.spacing * k, rule.spacing);
                rule.Prefab.transform.Spawn(terrain.getPosition(rule.spacing * k, rule.height), new Quaternion(0,0,-Mathf.Atan(aa.y/aa.x),Mathf.PI/2));
               
            }
            rule.placementCounter++; 
        }
    }

Now objects will be spawned like this

first of all. i’d like to say. it’s a nice plugin. it saves me much time in my work…
but well… i found several bugs when i use it in my own project.

  1. when i change to use 3d collider. the surface of the terrain goes to be very strange after travel a few seconds on it.
    2.the terrain can’t always keep continuous after travel several minutes.
    3.the texture offset and scale u use in you code seems to be not good. there is a better way to make it nicer.

i fix 1 and 3 by myself. but still want u can know this. and fix it in your next version.

and i saw u r going to implement bridge generator. it’s a good news for me.
looking forward to ur next version.

if u r willing to know more detail and feedbacks. doooo feel free to send me a mail… it’s my pleasure if i could help…
thanks.

Is there a way that you can clear the ObjectPlacer objects pool, for restart the terrain? and a callback when the procedural terrain is just created within the followed transform?

thks

Hi

@renderdonkey

Thanks for your feedbacks
I am aware of 1st and 3th issues. First one will be fixed with next update. I am not good at texturing and shaders but i still working on it. And 2nd bug I do not know about it. If you do a detailed explanation, i will take care of it. (You can send via email or here. Screenshots or video captures would be much more helpfull )

@futer24

Unfortunately, there is no fucntion for this. But I wrote it on my list : )