Browse Source

experimental world rendering, basic high map generation

Kajetan Johannes Hammerle 3 years ago
parent
commit
4618384615

+ 2 - 88
client/Game.cpp

@@ -5,87 +5,10 @@
 Game::Game(const Control& control, const Camera& camera, Ray& ray, const Clock& fps, const Clock& tps,
         RenderSettings& renderSettings) :
 control(control), camera(camera), ray(ray), fps(fps), tps(tps), renderSettings(renderSettings), lengthAngle(20.0f),
-widthAngle(35.0f), texture("resources/textures.png") {
-    for(int x = -6; x <= 6; x++) {
-        for(int y = -6; y <= 6; y++) {
-            for(int z = -6; z <= 6; z++) {
-                if(x * x + y * y + z * z < 16) {
-                    addCube(x, y, z,
-                            x * x + (y - 1) * (y - 1) + z * z >= 16,
-                            x * x + (y + 1) * (y + 1) + z * z >= 16 && !(x == 0 && y == 3 && z == 0),
-                            (x - 1) * (x - 1) + y * y + z * z >= 16,
-                            (x + 1) * (x + 1) + y * y + z * z >= 16,
-                            x * x + y * y + (z + 1) * (z + 1) >= 16,
-                            x * x + y * y + (z - 1) * (z - 1) >= 16);
-                }
-            }
-        }
-    }
-    addCube(0, 4, 0, false, true, true, true, true, true);
+widthAngle(35.0f), world(blockRegistry), worldRenderer(world) {
     pos.set(0, 10, 0);
-    m.build();
-}
-
-void Game::addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back) {
-    const float ERROR = 1.0f / 1024.0f;
-    if(bottom) {
-        m.add( {x - ERROR, y - ERROR, z - ERROR, 0.125f, 0.0f, 0, -1, 0});
-        m.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0f, 0, -1, 0});
-        m.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.125f, 0.0625f, 0, -1, 0});
-
-        m.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0f, 0, -1, 0});
-        m.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 0, -1, 0});
-        m.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.125f, 0.0625f, 0, -1, 0});
-    }
-    if(top) {
-        m.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 1, 0});
-        m.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 1, 0});
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.3125f, 0.0f, 0, 1, 0});
-
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.3125f, 0.0f, 0, 1, 0});
-        m.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 1, 0});
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.3125f, 0.0625f, 0, 1, 0});
-    }
-    if(left) {
-        m.add( {x - ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, -1, 0, 0});
-        m.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, -1, 0, 0});
-        m.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, -1, 0, 0});
-
-        m.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, -1, 0, 0});
-        m.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0f, -1, 0, 0});
-        m.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, -1, 0, 0});
-    }
-    if(right) {
-        m.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.25f, 0.0625f, 1, 0, 0});
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 1, 0, 0});
-        m.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 1, 0, 0});
-
-        m.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 1, 0, 0});
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 1, 0, 0});
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 1, 0, 0});
-    }
-    if(front) {
-        m.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 0, 0, 1});
-        m.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 0, 1});
-        m.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 0, 0, 1});
-
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0f, 0, 0, 1});
-        m.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 0, 0, 1});
-        m.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 0, 1});
-    }
-    if(back) {
-        m.add( {x - ERROR, y - ERROR, z - ERROR, 0.25f, 0.0625f, 0, 0, -1});
-        m.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 0, -1});
-        m.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, 0, 0, -1});
-
-        m.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, 0, 0, -1});
-        m.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, 0, 0, -1});
-        m.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 0, -1});
-    }
 }
 
-float testAngle = 0.0f;
-
 void Game::tick() {
     const float speed = 0.25f;
     if(control.keys.down.isDown()) {
@@ -139,19 +62,10 @@ void Game::tick() {
     if(control.keys.test4.isDown()) {
         renderSettings.testBias *= 0.95f;
     }*/
-
-    testAngle += 5.0f;
 }
 
 void Game::renderWorld(float lag, Renderer& renderer) const {
-    (void) lag;
-    (void) renderer;
-    renderer.translateTo(0.0f, 0.0f, -0.5f)
-            .rotateY(interpolate(lag, testAngle - 5.0, testAngle))
-            .translate(-0.5f, 0.0f, -0.5f)
-            .update();
-    texture.bind(0);
-    m.draw();
+    worldRenderer.render(lag, renderer);
 }
 
 void Game::renderTextOverlay(float lag, Renderer& renderer, FontRenderer& fr) const {

+ 8 - 4
client/Game.h

@@ -9,6 +9,9 @@
 #include "client/rendering/Mesh.h"
 #include "client/rendering/FileTexture.h"
 #include "client/rendering/FontRenderer.h"
+#include "common/world/World.h"
+#include "common/block/BlockRegistry.h"
+#include "rendering/renderer/WorldRenderer.h"
 
 class Game final {
 public:
@@ -22,8 +25,6 @@ public:
     bool isRunning() const;
 
 private:
-    void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
-
     const Control& control;
     const Camera& camera;
     Ray& ray;
@@ -34,8 +35,11 @@ private:
     float lengthAngle;
     float widthAngle;
     Vector pos;
-    Mesh m;
-    FileTexture texture;
+    
+    BlockRegistry blockRegistry;
+    World world;
+    
+    WorldRenderer worldRenderer;
 };
 
 #endif

+ 1 - 7
client/Main.cpp

@@ -9,7 +9,6 @@
 #include "client/rendering/Engine.h"
 #include "client/utils/Clock.h"
 #include "client/rendering/RenderSettings.h"
-#include "common/block/BlockRegistry.h"
 
 bool initGLEW() {
     GLenum err = glewInit();
@@ -79,16 +78,11 @@ int main() {
     Control control;
     Clock fps;
     Clock tps;
-    Game game(control, camera, ray, fps, tps, renderSettings);
+    static Game game(control, camera, ray, fps, tps, renderSettings);
     
     initCallbacks(window, size, framebuffers, control);
     window.show();
     
-    BlockRegistry registry;
-    registry.forEach([](const Block& b){
-        std::cout << b.getRegistry() << "\n";
-    });
-
     const u64 nanosPerTick = 50000000;
     u64 lag = 0;
     while(!window.shouldClose() && game.isRunning()) {

+ 1 - 1
client/rendering/Mesh.h

@@ -28,7 +28,7 @@ public:
 
 private:
     VertexBuffer vertexBuffer;
-    List<VertexData, 4096> buffer;
+    List<VertexData, 65536 * 2> buffer;
 };
 
 #endif

+ 87 - 0
client/rendering/renderer/WorldRenderer.cpp

@@ -0,0 +1,87 @@
+#include "client/rendering/renderer/WorldRenderer.h"
+#include <iostream>
+
+WorldRenderer::WorldRenderer(const World& world) : world(world), texture("resources/textures.png") {
+    for(uint x = 0; x < World::WORLD_SIZE; x++) {
+        for(uint y = 0; y < World::WORLD_SIZE; y++) {
+            for(uint z = 0; z < World::WORLD_SIZE; z++) {
+                if(world.getBlock(x, y, z).getId() != 0) {
+                    addCube(x, y, z,
+                            isAir(x, y - 1, z), isAir(x, y + 1, z),
+                            isAir(x - 1, y, z), isAir(x + 1, y, z),
+                            isAir(x, y, z + 1), isAir(x, y, z - 1));
+                }
+            }
+        }
+    }
+    mesh.build();
+}
+
+void WorldRenderer::render(float lag, Renderer& renderer) const {
+    (void) lag;
+    (void) renderer;
+    texture.bind(0);
+    mesh.draw();
+}
+
+bool WorldRenderer::isAir(uint x, uint y, uint z) const {
+    return world.getBlock(x, y, z).getId() == 0;
+}
+
+void WorldRenderer::addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back) {
+    const float ERROR = 1.0f / 1024.0f;
+    if(bottom) {
+        mesh.add( {x - ERROR, y - ERROR, z - ERROR, 0.125f, 0.0f, 0, -1, 0});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0f, 0, -1, 0});
+        mesh.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.125f, 0.0625f, 0, -1, 0});
+
+        mesh.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0f, 0, -1, 0});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 0, -1, 0});
+        mesh.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.125f, 0.0625f, 0, -1, 0});
+    }
+    if(top) {
+        mesh.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 1, 0});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 1, 0});
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.3125f, 0.0f, 0, 1, 0});
+
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.3125f, 0.0f, 0, 1, 0});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 1, 0});
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.3125f, 0.0625f, 0, 1, 0});
+    }
+    if(left) {
+        mesh.add( {x - ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, -1, 0, 0});
+        mesh.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, -1, 0, 0});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, -1, 0, 0});
+
+        mesh.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, -1, 0, 0});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0f, -1, 0, 0});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, -1, 0, 0});
+    }
+    if(right) {
+        mesh.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.25f, 0.0625f, 1, 0, 0});
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 1, 0, 0});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 1, 0, 0});
+
+        mesh.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 1, 0, 0});
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 1, 0, 0});
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 1, 0, 0});
+    }
+    if(front) {
+        mesh.add( {x - ERROR, y - ERROR, z + 1 + ERROR, 0.1875f, 0.0625f, 0, 0, 1});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 0, 1});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 0, 0, 1});
+
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.25f, 0.0f, 0, 0, 1});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z + 1 + ERROR, 0.1875f, 0.0f, 0, 0, 1});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z + 1 + ERROR, 0.25f, 0.0625f, 0, 0, 1});
+    }
+    if(back) {
+        mesh.add( {x - ERROR, y - ERROR, z - ERROR, 0.25f, 0.0625f, 0, 0, -1});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 0, -1});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, 0, 0, -1});
+
+        mesh.add( {x + 1 + ERROR, y + 1 + ERROR, z - ERROR, 0.1875f, 0.0f, 0, 0, -1});
+        mesh.add( {x + 1 + ERROR, y - ERROR, z - ERROR, 0.1875f, 0.0625f, 0, 0, -1});
+        mesh.add( {x - ERROR, y + 1 + ERROR, z - ERROR, 0.25f, 0.0f, 0, 0, -1});
+    }
+}

+ 23 - 0
client/rendering/renderer/WorldRenderer.h

@@ -0,0 +1,23 @@
+#ifndef WORLDRENDERER_H
+#define WORLDRENDERER_H
+
+#include "client/rendering/Renderer.h"
+#include "common/world/World.h"
+#include "client/rendering/Mesh.h"
+#include "client/rendering/FileTexture.h"
+
+class WorldRenderer {
+public:
+    WorldRenderer(const World& world);
+
+    void render(float lag, Renderer& renderer) const;
+    void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
+    bool isAir(uint x, uint y, uint z) const;
+
+private:
+    const World& world;
+    Mesh mesh;
+    FileTexture texture;
+};
+
+#endif

+ 0 - 20
common/world/Chunk.cpp

@@ -1,20 +0,0 @@
-#include "common/world/Chunk.h"
-#include "common/block/BlockRegistry.h"
-
-Chunk::Chunk() {
-    for(u32 y = 0; y < HEIGHT; y++) {
-        for(u32 x = 0; x < CHUNK_PARTION_SIZE; x++) {
-            for(u32 z = 0; z < CHUNK_PARTION_SIZE; z++) {
-                blocks[y][x][z] = 0;
-            }
-        }
-    }
-}
-
-const Block& Chunk::getBlock(u32 x, u32 y, u32 z) const {
-    return BlockRegistry::getBlock(blocks[y & BITMASK_HEIGHT][x & CHUNK_PARTION_SIZE][z & CHUNK_PARTION_SIZE]);
-}
-
-void Chunk::setBlock(u32 x, u32 y, u32 z, const Block& block) {
-    blocks[y & BITMASK_HEIGHT][x & CHUNK_PARTION_SIZE][z & CHUNK_PARTION_SIZE] = block.getId();
-}

+ 0 - 28
common/world/Chunk.h

@@ -1,28 +0,0 @@
-#ifndef CHUNK_H
-#define CHUNK_H
-
-#include "common/block/Block.h"
-#include "common/utils/Types.h"
-
-class Chunk final {
-public:
-    Chunk();
-
-    void setBlock(u32 x, u32 y, u32 z, const Block& block);
-    const Block& getBlock(u32 x, u32 y, u32 z) const;
-
-    static const u32 CHUNK_BIT_SIZE = 4;
-
-private:
-    static const u32 CHUNK_PARTION_SIZE = 1 << CHUNK_BIT_SIZE;
-    static const u32 HEIGHT_PARTIONS = 16;
-    static const u32 HEIGHT = CHUNK_PARTION_SIZE * HEIGHT_PARTIONS;
-
-    static const u32 BITMASK = CHUNK_PARTION_SIZE - 1;
-    static const u32 BITMASK_HEIGHT = HEIGHT - 1;
-
-    u16 blocks[HEIGHT][CHUNK_PARTION_SIZE][CHUNK_PARTION_SIZE];
-};
-
-#endif
-

+ 52 - 0
common/world/HighMap.h

@@ -0,0 +1,52 @@
+#ifndef HIGHMAP_H
+#define HIGHMAP_H
+
+#include "common/utils/Types.h"
+#include "common/utils/Random.h"
+
+template<uint W, uint H>
+class HighMap {
+public:
+
+    HighMap() {
+        Random r(0);
+        for(uint x = 0; x < W; x++) {
+            for(uint y = 0; y < H; y++) {
+                data[x][y] = r.nextFloat();
+            }
+        }
+        smooth();
+        smooth();
+        smooth();
+        smooth();
+    }
+
+    void smooth() {
+        float oldNoice[W][H];
+        for(uint x = 0; x < W; x++) {
+            for(uint y = 0; y < H; y++) {
+                oldNoice[x][y] = data[x][y];
+            }
+        }
+        for(uint x = 0; x < W; x++) {
+            for(uint y = 0; y < H; y++) {
+                float sum = 0.0f;
+                for(uint mx = 0; mx <= 2; mx++) {
+                    for(uint my = 0; my <= 2; my++) {
+                        sum += oldNoice[(x + mx - 1) % W][(y + my - 1) % H];
+                    }
+                }
+                data[x][y] = sum / 9.0f;
+            }
+        }
+    }
+
+    uint getHeight(uint x, uint y, uint max) const {
+        return (uint) (data[x][y] * max);
+    }
+
+private:
+    float data[W][H];
+};
+
+#endif

+ 23 - 8
common/world/World.cpp

@@ -1,13 +1,28 @@
 #include "common/world/World.h"
+#include "common/utils/Random.h"
+#include "common/world/HighMap.h"
 
-void World::setBlock(u32 x, u32 y, u32 z, const Block& block) {
-    u32 cx = (x >> Chunk::CHUNK_BIT_SIZE) & BITMASK;
-    u32 cz = (z >> Chunk::CHUNK_BIT_SIZE) & BITMASK;
-    chunks[cx][cz].setBlock(x, y, z, block);
+World::World(const BlockRegistry& blockRegistry) : blockRegistry(blockRegistry) {
+    Block air = blockRegistry.getBlock("air");
+    Block stone = blockRegistry.getBlock("stone");
+    HighMap<WORLD_SIZE, WORLD_SIZE> map;
+    for(uint x = 0; x < WORLD_SIZE; x++) {
+        for(uint z = 0; z < WORLD_SIZE; z++) {
+            uint height = map.getHeight(x, z, WORLD_SIZE);
+            for(uint y = 0; y < height; y++) {
+                setBlock(x, y, z, stone);
+            }
+            for(uint y = height; y < WORLD_SIZE; y++) {
+                setBlock(x, y, z, air);
+            }
+        }
+    }
 }
 
-const Block& World::getBlock(u32 x, u32 y, u32 z) const {
-    u32 cx = (x >> Chunk::CHUNK_BIT_SIZE) & BITMASK;
-    u32 cz = (z >> Chunk::CHUNK_BIT_SIZE) & BITMASK;
-    return chunks[cx][cz].getBlock(x, y, z);
+void World::setBlock(uint x, uint y, uint z, const Block& block) {
+    blocks[x & BITMASK][y & BITMASK][z & BITMASK] = block.getId();
 }
+
+const Block& World::getBlock(uint x, uint y, uint z) const {
+    return blockRegistry.getBlock(blocks[x & BITMASK][y & BITMASK][z & BITMASK]);
+}

+ 12 - 13
common/world/World.h

@@ -1,22 +1,21 @@
 #ifndef WORLD_H
 #define WORLD_H
 
-#include "common/world/Chunk.h"
+#include "common/block/BlockRegistry.h"
 
-class World final
-{
+class World final {
 public:
-    void setBlock(u32 x, u32 y, u32 z, const Block& block);
-    const Block& getBlock(u32 x, u32 y, u32 z) const;
-    
-    static const u32 WORLD_SIZE = 256;
+    World(const BlockRegistry& blockRegistry);
+    void setBlock(uint x, uint y, uint z, const Block& block);
+    const Block& getBlock(uint x, uint y, uint z) const;
     
+    static constexpr uint WORLD_SIZE = 64;
+
 private:
-    static const u32 BITMASK = WORLD_SIZE - 1;
-    
-    Chunk chunks[WORLD_SIZE >> Chunk::CHUNK_BIT_SIZE][WORLD_SIZE >> Chunk::CHUNK_BIT_SIZE];
-    
-};
+    static constexpr uint BITMASK = WORLD_SIZE - 1;
 
-#endif
+    const BlockRegistry& blockRegistry;
+    u16 blocks[WORLD_SIZE][WORLD_SIZE][WORLD_SIZE];
+};
 
+#endif

+ 2 - 2
meson.build

@@ -2,11 +2,11 @@ project('cubes plus plus', 'cpp')
 
 # 'common/world/Chunk.cpp', 'common/world/World.cpp', 'common/utils/Face.cpp'
 
-sourcesCommon = ['common/block/BlockBuilder.cpp', 'common/block/Block.cpp', 'common/block/BlockRegistry.cpp', 'common/utils/HashedString.cpp', 'common/stream/Stream.cpp', 'common/utils/DataVector.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'common/utils/Random.cpp']
+sourcesCommon = ['common/block/BlockBuilder.cpp', 'common/block/Block.cpp', 'common/block/BlockRegistry.cpp', 'common/utils/HashedString.cpp', 'common/stream/Stream.cpp', 'common/utils/DataVector.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'common/utils/Random.cpp', 'common/world/World.cpp']
 
 sourcesServer = ['server/Main.cpp', 'server/network/Server.cpp', 'server/GameServer.cpp', 'server/commands/ServerCommands.cpp', 'server/commands/CommandManager.cpp', 'server/network/Socket.cpp', 'server/commands/CommandEditor.cpp', 'server/Clock.cpp']
 
-sourcesClient = ['client/Main.cpp', 'client/rendering/WindowSize.cpp', 'client/math/Frustum.cpp', 'client/math/Ray.cpp', 'client/rendering/Framebuffers.cpp', 'client/rendering/wrapper/GLFWWrapper.cpp', 'client/rendering/wrapper/Window.cpp', 'client/rendering/Engine.cpp', 'client/input/Keys.cpp', 'client/rendering/wrapper/Shader.cpp', 'client/rendering/Shaders.cpp', 'client/utils/Utils.cpp', 'client/rendering/Mesh.cpp', 'client/math/Matrix.cpp', 'client/math/MatrixStack.cpp', 'client/math/Vector.cpp', 'client/math/Camera.cpp', 'client/math/Plane.cpp', 'client/Game.cpp', 'client/input/MouseButtons.cpp', 'client/rendering/FileTexture.cpp', 'client/rendering/FontRenderer.cpp', 'client/rendering/wrapper/Framebuffer.cpp', 'client/rendering/NoiseTexture.cpp', 'client/utils/Clock.cpp', 'client/input/Control.cpp', 'client/rendering/RenderSettings.cpp', 'client/rendering/wrapper/VertexBuffer.cpp', 'client/rendering/wrapper/StreamBuffer.cpp', 'client/rendering/wrapper/Texture.cpp', 'client/utils/PNGReader.cpp', 'client/rendering/wrapper/GLWrapper.cpp', 'client/rendering/Renderer.cpp']
+sourcesClient = ['client/Main.cpp', 'client/rendering/WindowSize.cpp', 'client/math/Frustum.cpp', 'client/math/Ray.cpp', 'client/rendering/Framebuffers.cpp', 'client/rendering/wrapper/GLFWWrapper.cpp', 'client/rendering/wrapper/Window.cpp', 'client/rendering/Engine.cpp', 'client/input/Keys.cpp', 'client/rendering/wrapper/Shader.cpp', 'client/rendering/Shaders.cpp', 'client/utils/Utils.cpp', 'client/rendering/Mesh.cpp', 'client/math/Matrix.cpp', 'client/math/MatrixStack.cpp', 'client/math/Vector.cpp', 'client/math/Camera.cpp', 'client/math/Plane.cpp', 'client/Game.cpp', 'client/input/MouseButtons.cpp', 'client/rendering/FileTexture.cpp', 'client/rendering/FontRenderer.cpp', 'client/rendering/wrapper/Framebuffer.cpp', 'client/rendering/NoiseTexture.cpp', 'client/utils/Clock.cpp', 'client/input/Control.cpp', 'client/rendering/RenderSettings.cpp', 'client/rendering/wrapper/VertexBuffer.cpp', 'client/rendering/wrapper/StreamBuffer.cpp', 'client/rendering/wrapper/Texture.cpp', 'client/utils/PNGReader.cpp', 'client/rendering/wrapper/GLWrapper.cpp', 'client/rendering/Renderer.cpp', 'client/rendering/renderer/WorldRenderer.cpp']
 
 sourcesTest = ['tests/Main.cpp', 'common/utils/String.cpp', 'common/utils/SplitString.cpp', 'client/math/Matrix.cpp', 'client/math/Vector.cpp', 'common/utils/HashedString.cpp', 'common/utils/Random.cpp']