CodingTrain / OpenSimplexNoise-for-Processing

A Processing library for open simplex noise
Other
51 stars 18 forks source link

This library isn't working. #7

Open Fortran-to-Python opened 3 years ago

Fortran-to-Python commented 3 years ago

I downloaded the zip file and extracted it all into a new folder in "libraries" in my Processing folder, but when I would type "import processing.OpenSimplexNoise.*;" I got the message "The import processing.OpenSimplexNoise cannot be resolved." I discovered that this was because the library and JAR file didn't have the same name, and the "lib" folder should be "library." I fixed these two issues, and then OpenSimplexNoise appeared in the Import Library menu, but when I did, a bunch of code appeared:

import japplemenubar.*; import processing.awt.*; import processing.core.*; import processing.data.*; import processing.event.*; import processing.javafx.*; import processing.opengl.*;

and the error message:

More than one library is competing for this sketch The import japplemenubar points to multiple libraries: core (C:\Program Files\Processing\processing-3.5.4\core) OpenSimplexNoise (C:\Users**\Documents\Processing\libraries\OpenSimplexNoise) Extra libraries need to be removed before this sketch can be used.

As far as I can tell, I haven't done anything incorrectly, and whatever's happening here is probably far beyond my understanding.

orgicus commented 3 years ago

Sometimes it helps to slow down and go through the README ;) The library is working.

You're not meant to unzip the source code of the Processing library (which is what this repo is). Instead you should compile this example library as a Processing library using eclipse as you can see in the README tutorial videos

Good luck!

(P.S. The error refers to the fact that this repo includes a copy of Processing's core library (core.jar) while your installation also obvious has it's own: this is where the conflict lies. "There can be only one" :P)

Fortran-to-Python commented 3 years ago

I tried looking for a README that had steps for importing a library, but the only one I saw, the one at the bottom of the main page, had only very basic information about the library and nothing about installing it. Nothing about compiling or Eclipse. Same with the videos. Was there another big obvious README that I was missing?

Fortran-to-Python commented 3 years ago

Wait, was the one thing I needed to know about using libraries buried in 39 minutes of videos about making libraries?

orgicus commented 3 years ago

Hmmm, it feels like a mismatch in expectations to me :)

If you simply googled for a processing noise library and got here you might have glanced over a few details in the README:

That's what I tried to explain the in the stackoverflow answer: if you simply want to use noise, just use the noise() function in Processing or another library.

This one works too, but it's main purpose isn't to be the best Processing noise library (thought it could become if more people contribute algorithms to it), but a practical/hands-on example how to make a Processing library from scratch: something a bit more exciting than saying hello.

If you're in a hurry looking for a quick solution to a problem I can see how all the hoops to jump through to compile the library before getting to use is can be frustrating. On the other: what a great learning opportunity, right ? You probably didn't think you'd learn now to compile a Processing library today.

HTH, George