is anyone here?

This commit is contained in:
Ben Kyd
2019-11-12 14:56:46 +00:00
parent 11445de644
commit 859aef604c
8 changed files with 61 additions and 23 deletions

View File

@@ -53,7 +53,7 @@ Chunk::Chunk(int x, int z, std::shared_ptr<FastNoise> terrainGenerator) {
continue;
}
if (pow(y / (float)CHUNK_HEIGHT, 1.1024f) + terrainGenerator->GetValueFractal(x + (Z * CHUNK_WIDTH), y, z + (X * CHUNK_DEPTH)) * 0.60f < 0.5f) {
if (pow(y / (float)CHUNK_HEIGHT, 1.1024f) + terrainGenerator->GetNoise(x + (Z * CHUNK_WIDTH), y, z + (X * CHUNK_DEPTH)) * 0.60f < 0.5f) {
Voxels.push_back((uint8_t)EBlockType::Grass);
continue;

View File

@@ -13,7 +13,19 @@ Entity::Entity(glm::vec3 postion, glm::vec3 direction, std::shared_ptr<Camera> c
}
}
Player::Player {
Player::Player(glm::vec3 position, glm::vec3 direction) {
}
void Player::Move(Uint8* state) {
}
void Player::HandleMouseSDL(SDL_Event e) {
}
void UpdatePosition(glm::vec3 position);
void UpdateDirection(glm::vec3 direction);
void CameaUpdateProjection(int xres, int yres);

View File

@@ -39,7 +39,7 @@ public:
Player(glm::vec3 position, glm::vec3 direction = {0.0f, 0.0f, 0.0f});
void Move(Uint8* state);
void HandleMouse(SDL_Event e);
void HandleMouseSDL(SDL_Event e);
void UpdatePosition(glm::vec3 position);
void UpdateDirection(glm::vec3 direction);

View File

@@ -24,9 +24,9 @@ void World::LoadWorld() {
m_noiseGenerator = std::make_shared<FastNoise>();
m_noiseGenerator->SetSeed(rand());
m_noiseGenerator->SetNoiseType(FastNoise::SimplexFractal);
m_noiseGenerator->SetNoiseType(FastNoise::Perlin);
m_noiseGenerator->SetFractalOctaves(5);
m_noiseGenerator->SetFractalOctaves(8);
for (int x = -4; x < 50; x++)
for (int y = -50; y < 4; y++) {