Perlin Noise

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
spynaz
Party member
Posts: 152
Joined: Thu Feb 28, 2013 5:49 am

Perlin Noise

Post by spynaz »

How would I use the perlin noise to generate the tiles for my platformer?
User avatar
stampede247
Prole
Posts: 11
Joined: Thu May 02, 2013 8:21 pm
Location: United States
Contact:

Re: Perlin Noise

Post by stampede247 »

Do you understand what perlin noise is? If not here is the wiki: http://en.wikipedia.org/wiki/Perlin_noise

If you do then let me say this. Perlin noise is often used for terrain generation and usually works best for something that is 3d so you can calculate the height and stuff. However there are some applications you could use it for a platformer I've seen. If you want to use perlin noise to generate sloping hills or something like it you could. It would be an example of 1 dimensional perlin noise. Also if you wanted the platformer to have like large bodies of blocks clustered together you could do that too with a 2-dimensional perlin noise.

If you want an actual example then I might be able to make one sometime tomorrow. However i think you might benefit a little more in seeing how perlin noise works and is generated which you can find many places on the web. Just look around would be my suggestion.

Hopefully this might help a bit to clear up some stuff. Maybe someone else will be able to explain more in depth the actual process of it.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Perlin Noise

Post by micha »

spynaz wrote:How would I use the perlin noise to generate the tiles for my platformer?
Do you want to generate tiles (the graphics) or the map (information where to put which tile)?
User avatar
spynaz
Party member
Posts: 152
Joined: Thu Feb 28, 2013 5:49 am

Re: Perlin Noise

Post by spynaz »

stampede247 wrote:Do you understand what perlin noise is? If not here is the wiki: http://en.wikipedia.org/wiki/Perlin_noise

If you do then let me say this. Perlin noise is often used for terrain generation and usually works best for something that is 3d so you can calculate the height and stuff. However there are some applications you could use it for a platformer I've seen. If you want to use perlin noise to generate sloping hills or something like it you could. It would be an example of 1 dimensional perlin noise. Also if you wanted the platformer to have like large bodies of blocks clustered together you could do that too with a 2-dimensional perlin noise.

If you want an actual example then I might be able to make one sometime tomorrow. However i think you might benefit a little more in seeing how perlin noise works and is generated which you can find many places on the web. Just look around would be my suggestion.

Hopefully this might help a bit to clear up some stuff. Maybe someone else will be able to explain more in depth the actual process of it.
I would like a simple example. I have already searched around online quite a bit already. Also, what method would you recommend?
micha wrote:
spynaz wrote:How would I use the perlin noise to generate the tiles for my platformer?
Do you want to generate tiles (the graphics) or the map (information where to put which tile)?
I want to generate the map.
User avatar
Ragzouken
Citizen
Posts: 84
Joined: Fri Aug 10, 2012 7:59 am
Contact:

Re: Perlin Noise

Post by Ragzouken »

This is a very open question. You really need to work out what kind of maps you want to generate and work from there. There are lots of techniques and ways to combine them all, and each will give maps with different characteristics. Perlin noise is one technique but it may not be appropriate for what you are trying to do.

That said; if Perlin noise is really what you want then you could look at my community blogs post on using noise for pixel effects. It's not the application you want (you'll need to find a lua implementation of Perlin) but you can use the little demo programs to play around with the noise quickly, and get a feel for what it looks like.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Perlin Noise

Post by micha »

Generating a level automatically is called "procedural generation".

If you are just starting to learn this, I suggest a really simple approach: Prepare some level parts (by hand) and combine them randomly. Each level part might be 20 tiles wide (or whatever). Let you game select some level parts randomly and just put them next to each other.
This is the simplest approach I know. It has the advantage, that each individual part is adapted to your game mechanics (since you prepared it yourself) and you can guarantee that each part is doable.

This, of course, has nothing to do with perlin noise.
User avatar
spynaz
Party member
Posts: 152
Joined: Thu Feb 28, 2013 5:49 am

Re: Perlin Noise

Post by spynaz »

Ragzouken wrote:This is a very open question. You really need to work out what kind of maps you want to generate and work from there. There are lots of techniques and ways to combine them all, and each will give maps with different characteristics. Perlin noise is one technique but it may not be appropriate for what you are trying to do.

That said; if Perlin noise is really what you want then you could look at my community blogs post on using noise for pixel effects. It's not the application you want (you'll need to find a lua implementation of Perlin) but you can use the little demo programs to play around with the noise quickly, and get a feel for what it looks like.
Ok, thanks.
User avatar
spynaz
Party member
Posts: 152
Joined: Thu Feb 28, 2013 5:49 am

Re: Perlin Noise

Post by spynaz »

micha wrote:Generating a level automatically is called "procedural generation".

If you are just starting to learn this, I suggest a really simple approach: Prepare some level parts (by hand) and combine them randomly. Each level part might be 20 tiles wide (or whatever). Let you game select some level parts randomly and just put them next to each other.
This is the simplest approach I know. It has the advantage, that each individual part is adapted to your game mechanics (since you prepared it yourself) and you can guarantee that each part is doable.

This, of course, has nothing to do with perlin noise.
I need to generate terrain though.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 12 guests