Browse Source

chunk stuff

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
d44754b089
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      libswan/include/swan/common.h
  2. 1
    1
      libswan/src/World.cc

+ 2
- 2
libswan/include/swan/common.h View File

@@ -6,8 +6,8 @@ namespace Swan {

static constexpr int TILE_SIZE = 32;
static constexpr int TICK_RATE = 20;
static constexpr int CHUNK_HEIGHT = 64;
static constexpr int CHUNK_WIDTH = 64;
static constexpr int CHUNK_HEIGHT = 20;
static constexpr int CHUNK_WIDTH = 32;
static constexpr int PLACEHOLDER_RED = 245;
static constexpr int PLACEHOLDER_GREEN = 66;
static constexpr int PLACEHOLDER_BLUE = 242;

+ 1
- 1
libswan/src/World.cc View File

@@ -13,7 +13,7 @@ static bool chunkLine(int l, WorldPlane &plane, ChunkPos &abspos, const Vec2i &d

// Don't blow our frame budget on generating chunks,
// but generate as many as possible within the budget
if (clock.duration() > 0.01)
if (clock.duration() > 1 / 120.0)
return true;
abspos += dir;
}

Loading…
Cancel
Save