Skip to content

Commit

Permalink
Lowered chunk Y to 64 in order to conserve memory
Browse files Browse the repository at this point in the history
  • Loading branch information
AdivonSlav committed Dec 26, 2022
1 parent a8b43fa commit 53987b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Core/src/gameobjects/Chunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "graphics/Camera.h"

#define CHUNK_X 16
#define CHUNK_Y 128
#define CHUNK_Y 64
#define CHUNK_Z 16

using namespace CoreGraphics;
Expand Down
5 changes: 2 additions & 3 deletions Core/src/gameobjects/TerrainGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ namespace CoreGameObjects
{
Noisify(*chunk);
ChunkManager::Serialize(chunkPos, chunk.get(), GetSeed());
chunk->SetSerialized(false);
}

ChunkManager::LoadChunk(chunk);
Expand Down Expand Up @@ -215,8 +214,8 @@ namespace CoreGameObjects
{
for (int z = 0; z < CHUNK_Z; z++)
{
int16_t surfaceY = 64;
int16_t stoneY = 59;
int16_t surfaceY = 32;
int16_t stoneY = 28;

// Getting block coordinates in world space and adding a seed value lerped between -255.0 and 255.0
float blockX = x + chunkPos.x + m_LerpedSeed;
Expand Down

0 comments on commit 53987b8

Please sign in to comment.