Hmm. Just tried it on my mac (has support for 3.3) and got the same error as Simn. I don’t know how to fix this error because it doesn’t seem like anything is wrong. If anyone has any idea, could they please share. I will continue trying to find the cause of this problem on my own.
@Wessles
I don’t think that creating a fat jar will solve any problems. The problem is not locating the files.
new File(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
was a joke the first time I read it, but apparently it’s legitimate. Java’s such a complicated and bureaucratic platform - maybe that’s why companies like it?
Using Java Version: 1.7.0_45
OS: Windows
Using OpenGL Version: 3.0.0 - Build 8.15.10.2291
Loading Texture: grass13.png
Status: Works great!
Thanks for fixing that. That is really awesome. Is the code on github?
Also, do you use matrix transforms for camera? It seems like it… I really want to learn to get away from that, never learned to use quaternions… really want to.
The base engine is a modified version of this tutorial, written in LWJGL. There are dedicated camera and quaternion classes that you can check out if you feel the urge.
@Zeke Yeah, the camera is a bit fragile at the moment. I might look into it and redo the code. No end game at the moment as this just started off as a simple example for simplex noise. If you have any suggestions, I would love to hear them! I fixed the supersonic problem, but it won’t be in the jar until the next release.
Sorry about no developments for a while. School is brutal now and the huge increase in homework has left me no time to work on anything. I plan on trying to make time in the near future to work on this project some more.
You should get back to this when you have spare time, nice hill generation.
How flexible is it? Are you able to control the height easily? Never done this before, interesting to know how flexible a simple implementation of this is.
Using these classes, I can easily generate a series of points, which are later used to create a mesh.
// largestFeature is how often the max and min values are reached (I think)
int largestFeature = 100;
// persistence is how random the points are (while increasing the max and decreasing the min)
float persistence = 0.2f;
SimplexNoise noise = new SimplexNoise(largestFeature, persistence);
// This is used to just create larger features.
float multiplier = 20f;
// Used to move all the points higher or lower
float heightOffset = 0;
// Stores a 2D array of points using the simplex noise.
for(int i = 0; i < map.length; i++)
for(int j = 0; j < map[0].length; j++)
map[i][j] = new Vector3f(i + x, (float)noise.getNoise(i + x, j + z) * multiplier + heightOffset, j + z);
// Mesh generation goes here.
You can check out the source code on github to see how I implemented it. (under com.longarmx.smplx.world)