More dynamic terrain generation (Still doing it wrong i think)
This commit is contained in:
@@ -17,12 +17,14 @@ void World::LoadWorld() {
|
||||
m_shaders["Basic"]->Load(GameConfig.ResourceBase + "shaders/simple");
|
||||
m_shaders["Basic"]->Link();
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
m_noiseGenerator = std::make_shared<FastNoise>();
|
||||
m_noiseGenerator->SetSeed(rand());
|
||||
|
||||
m_noiseGenerator->SetNoiseType(FastNoise::SimplexFractal);
|
||||
|
||||
m_noiseGenerator->SetFractalOctaves(3);
|
||||
m_noiseGenerator->SetFractalOctaves(5);
|
||||
|
||||
for (int x = -4; x < 10; x++)
|
||||
for (int y = -4; y < 4; y++) {
|
||||
@@ -31,7 +33,7 @@ void World::LoadWorld() {
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Spawn generator threads
|
||||
for (int i = 0; i < 7; i++) {
|
||||
|
||||
m_generatorThreads.push_back(std::thread([&]() {
|
||||
|
||||
Reference in New Issue
Block a user