fogleman/Craft
FreeA simple Minecraft clone written in C using modern OpenGL (shaders).
FreeFree tier
About fogleman/Craft
A simple Minecraft clone written in C using modern OpenGL (shaders). It features procedural terrain generation using Perlin/Simplex noise, over 10 block types with support for plants and transparency (glass), day/night cycles, a textured sky dome, and persistent world changes stored in a SQLite database. Multiplayer is supported via a Python-based server, and the codebase is designed to be compact (a few thousand lines) and easy to understand.
Key Features
Procedural terrain generation using Perlin/Simplex noise
Over 10 types of blocks with plants and transparency (glass)
Day and night cycles with a textured sky dome
Simple cloud rendering
World persistence via SQLite3 database
Multiplayer support with a Python-based server
Cross-platform (Windows, macOS, Linux)
Compact codebase (~few thousand lines of C) for easy learning
Pros & Cons
Pros
- Open source (MIT licensed) with free access to source code
- Compact and well-structured code for educational purposes
- Works across multiple operating systems
- Includes multiplayer functionality out of the box
- Terrain generation produces nice-looking results with noise algorithms
Cons
- Limited to a small set of block types (though extendable with code changes)
- Lacks advanced gameplay features (e.g., survival mechanics, crafting)
- Server requires manual setup and compilation of a C library
- No official hosting; multiplayer relies on self-hosted Python server
Best For
Learning OpenGL and voxel game developmentBuilding a basic multiplayer voxel worldPrototyping Minecraft-like game mechanicsEducational reference for terrain generation and chunk rendering
FAQ
What is Craft?
Craft is a simple Minecraft clone written in C using modern OpenGL (shaders). It includes terrain generation, block placement and destruction, day/night cycles, and online multiplayer via a Python-based server.
How do I run Craft from source?
Clone the repository, install dependencies (CMake, GLEW, etc.), run 'cmake .' and 'make' in the project directory, then execute './craft'. Binaries are also available on the project website.
Can I play multiplayer?
Yes, Craft supports multiplayer. You can either connect to a server using command line arguments (./craft [HOST [PORT]]) or via the '/online' command in-game. The official server is no longer running, but you can host your own by compiling the world DLL and running server.py.
What controls does Craft use?
WASD for movement, Space to jump, Left Click to destroy blocks, Right Click to create blocks, number keys 1-9 to select block types, Tab to toggle flying mode, and various other keys for zoom, lighting, and chat.