Skip to content

Commit 47a9262

Browse files
authored
Update README.md
1 parent 2e78c60 commit 47a9262

File tree

1 file changed

+44
-9
lines changed

1 file changed

+44
-9
lines changed

README.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ You can change game settings by modifying `config.ini` file.
4545

4646
You may need to install some additional dependencies, CMake will tell you about them.
4747

48-
#### Windows (using MinGW32-make)
48+
#### Windows
4949

50-
Download and install [CMake](https://cmake.org/download/) and [MinGW](https://sourceforge.net/projects/mingw-w64/).
50+
Download and install [CMake](https://cmake.org/download/).
51+
52+
#### Windows (using mingw32-make)
53+
54+
Download and install [MinGW](https://sourceforge.net/projects/mingw-w64/).
5155

5256
Then in the project root folder run following commands:
5357

@@ -56,6 +60,15 @@ Then in the project root folder run following commands:
5660
mingw32-make
5761
Ccraft
5862

63+
#### Windows (using Visual Studio 2019)
64+
65+
In the project root folder run following commands:
66+
67+
mkdir build && cd build
68+
cmake .. -G "Visual Studio 16 2019" -A x64
69+
70+
Ccraft.sln will be generated, open it in VS 2019 and compile everything.
71+
5972
#### Linux (using make)
6073

6174
Install CMake:
@@ -71,10 +84,32 @@ Then in the project root folder run following commands:
7184

7285
### Libraries used in Ccraft
7386

74-
* **GLFW** - Window creation and management
75-
* **GLAD** - Loading modern OpenGL functions
76-
* **cglm** - Very cool maths library
77-
* **sqlite** - Writing and reading to/from database
78-
* **stb_image** - Loading .png files
79-
* **FastNoise** - Voronoi and Simplex noises for world generation
80-
* **ini** - Parsing .ini fonfuguration files
87+
* [GLFW](https://github.com/glfw/glfw) - Window creation and management
88+
* [glad](https://github.com/Dav1dde/glad) - Loading modern OpenGL functions
89+
* [cglm](https://github.com/recp/cglm) - Very cool maths library
90+
* [SQLite](https://www.sqlite.org/index.html) - Writing and reading to/from database
91+
* [stb_image](https://github.com/nothings/stb) - Loading .png files
92+
* [FastNoise](https://github.com/Auburn/FastNoise) - Voronoi and Simplex noises for world generation
93+
* [ini](https://github.com/rxi/ini) - Parsing .ini fonfuguration files
94+
95+
### Some implementation details
96+
97+
I got inspired by fogleman's [Craft](https://github.com/fogleman/Craft), but my development process bent over visual features, not gameplay ones.
98+
99+
#### Rendering
100+
101+
A couple of rendering optimizations are implemented, such as rendering only exposed faces, using face culling not to draw back faces of triangles,
102+
and frustum culling, which is not drawing chunks that are not visible.
103+
104+
Each chunk has 2 vertex buffers, one for water blocks, the other for everything else. Using separate buffer for water is nessessary to ensure the right
105+
rendering order, so everything will be seen through transparent blocks.
106+
107+
Water has actual transparency, but there's also alpha testing (binary transparency). In shader the alpha value of fragment is checked, and if it's less than 0.5,
108+
the fragment is discarded. Alpha testing allows to draw transparent glass, flowers, grass and tree leaves without usual problems that come with transaprency.
109+
110+
When block in some chunk is changed, the chunk buffers are being completely rebuilt.
111+
112+
To implement post-processing visual effects, such as depth of field, motion blur, gamma correction and saturation tweak,
113+
I had to use separate framebuffer. So, the game is being rendered on a texture, then it's being rendered on yet another texture
114+
and during that the depth of field is applied, and in the final shader pass all other effects are applied and this image is actually what the player (you)
115+
sees. I really like the result, DoF and motion blur look very good.

0 commit comments

Comments
 (0)