Made terrain generation fast and low lag
This commit is contained in:
@@ -11,6 +11,9 @@ import static com.mygdx.game.Dimension.BlockMaterials.*;
|
||||
import static com.mygdx.game.Restrictions.*;
|
||||
|
||||
public class Chunks{
|
||||
OpenSimplexNoise gen1 = new OpenSimplexNoise(SEED+1);
|
||||
OpenSimplexNoise gen2 = new OpenSimplexNoise(SEED);
|
||||
|
||||
|
||||
public static void create(){
|
||||
int i = 10;
|
||||
@@ -90,14 +93,10 @@ public class Chunks{
|
||||
}
|
||||
|
||||
public double noise1(double nx, double ny) {
|
||||
OpenSimplexNoise gen1 = new OpenSimplexNoise(SEED+1);
|
||||
|
||||
return gen1.eval(nx, ny)/2 + 0.5;
|
||||
}
|
||||
|
||||
public double noise2(double nx, double ny) {
|
||||
OpenSimplexNoise gen2 = new OpenSimplexNoise(SEED);
|
||||
|
||||
return gen2.eval(nx, ny)/2 + 0.5;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user