Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

While working on my 2D tile based game, I encountered a problem. I use Perlin Noise to generate the terrain. Some biomes (Desert, Forest, etc) have different flatness values depending on terrain, which causes the end/start of a new biome to have a big cliff because the terrain is different. When 2 biomes have the same flatness, they are fine, but if they are different, this can happen. Is there any way to keep this from happening?

Example (In programmer art) enter image description here

share|improve this question
5  
I'd simply lerp the border regions evenly, so that the last 5-10 tiles of desert are higher than average and the fist 5-10 tiles of mountains are lower than average. –  Raven Dreamer Nov 11 '12 at 23:15
2  
For any attribute which you can blend across a biome border, you probably should. –  Kevin Reid Nov 12 '12 at 4:50
add comment

1 Answer 1

up vote 5 down vote accepted

When I had this problem in 3D, i solved it by blending values from both noise generators near seam. I blended not only height, but everything: textures, terraint details, etc.

Here's how it worked out: http://nevermind.wdfiles.com/local--files/_unity%3Aroentgen/WebPlayer.html (unity web player). As you can see, blending works almost perfectly.

share|improve this answer
    
This is only tangentially related, but what code are you using for your mouselook in there? It's much smoother than anything I've done in unity, and I'd be interested in duplicating its functionality. –  Raven Dreamer Nov 12 '12 at 12:20
    
@Raven Dreamer umm... It's the standard CharacterController with MouseLook script from Standard Assets, nothing fancy at all. –  Nevermind Nov 12 '12 at 18:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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