You use a tilemap to do the terrain so that it doesn't lag.
You have to implement perlin noise with events with C2, or there may be a plugin.
Anyways after that here is one possible way:
dropbox.com/s/o219jt9lzbzcv5g/noise_gen2.capx
Or use the forum search. There have been many solutions over the years for that.