Prerequisites
Before building for PC, ensure you have:- Completed the dependency setup
- Installed system libraries (zlib, glfw3, glew)
- CMake 3.14 or higher
- GCC or compatible C compiler
- OpenGL 2.0 support
Install System Dependencies
Install the required libraries using your system package manager:Build Process
Build Configuration
The PC build uses CMake with the following configuration (fromCMakeLists.txt):
Compiler Flags
-O3- Maximum optimization level-march=native- Optimize for your CPU architecture-g- Include debug symbols
Platform Definitions
PLATFORM_PC- Enables PC-specific code pathsCGLM_ALL_UNALIGNED- cglm configuration for compatibility
Linked Libraries
FromCMakeLists.txt:179:
Running the Game
Copy shader files
The PC version requires fragment and vertex shaders. Copy them from the Place these shader files next to your
resources/ directory:assets/ directory.Controls
The PC version uses keyboard and mouse controls:- Mouse - Look around
- WASD - Movement
- Space - Jump
- Shift - Sneak
- E - Inventory
- Escape - Pause menu
- Mouse buttons - Break/place blocks
For detailed controls, check the
controls.md file in the source repository.Advanced Build Options
Custom Compiler
To use a specific compiler:Build Types
Link-Time Optimization
LTO is enabled by default (fromCMakeLists.txt:177):
Performance Considerations
Default Window Resolution
The default window size is defined insource/graphics/gfx_settings.h:47-48:
Optimization Tips
- Lower resolution improves performance on integrated GPUs
- Disable
GFX_FANCY_LIQUIDSfor better FPS on low-end GPUs - Adjust
GFX_GUI_SCALEbased on your resolution
Troubleshooting
CMake can’t find libraries
Make sure development packages are installed:Missing shaders
If the game fails to launch with shader errors, ensure the.glsl files from resources/ are in the same directory as the executable.