Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
See more:
Hello Codeproject,

I am currently developing a game, this game is
based on Minecraft, I am having a problem with
generating perlin noise. Basically, what I want
to do is create a perlin noise that can be generated
by the few factors(Perhaps a class even)

C#
public double X {get;set;}
public double Y{get;set;}

public double[,] Noise {get;set;}

public class PerlinNoise()
{
 Noise = new int[Map.Width, Map.Height];
}


Basically, a simple class like this allows me to quite
a lot, I need the X and Y to change so I have the abillity
to add this to my game. The X,Y also represent the place
where the noise should be generated, just like Chunks really.


Does anyone have any ideas?
Posted
Updated 3-Apr-13 9:51am
v2

Im assuming that this is what you want:
http://devmag.org.za/2009/04/25/perlin-noise/[^]

It was just a quick search away :-)
 
Share this answer
 
Comments
Yvar Birx 3-Apr-13 16:02pm    
Perfect, I after a few days of Googling never saw this one. :(
Thanks a lot!
Sergey Alexandrovich Kryukov 3-Apr-13 16:09pm    
5ed. I also added a link with referenced implementations, please see.
—SA
You can also find some implementations here: http://en.wikipedia.org/wiki/Perlin_noise[^].

Even the original code by Ken Perlin can be easily translated to C#.

—SA
 
Share this answer
 
Comments
Yvar Birx 3-Apr-13 16:10pm    
Very helpful, as always. Thanks! :)
Sergey Alexandrovich Kryukov 3-Apr-13 16:13pm    
You are welcome.
—SA
Kenneth Haugland 3-Apr-13 16:15pm    
5'ed it :-) Search and you will find
Sergey Alexandrovich Kryukov 3-Apr-13 16:41pm    
Thank you, Kenneth.
This kind of noise is quite interesting and good looking.
—SA
Kenneth Haugland 3-Apr-13 16:47pm    
I had never heard of it before, but it looks really cool. The fire and the random blending of pictures was especially impressing.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900