Skip to content

Guide · Open source

How to use Craft: build, run and play the C Minecraft clone

Updated · written with AI from the project's own documentation and checked against our catalogue data

Craft is an open-source Minecraft-style block-building game written in a few thousand lines of C, using modern OpenGL shaders. This guide shows you how to install its dependencies, build it from source, learn the in-game controls and chat commands, and optionally run your own multiplayer server. It is aimed at people who are comfortable with a terminal and want a small, readable voxel game they can run themselves.

Craftfogleman/Craft · ★ 11.1k · MIT

Quick start

  1. 1Install prerequisites. Install CMake, a C compiler and the libraries listed for your operating system in the README.
  2. 2Clone the repository. Run git clone on the Craft GitHub repository and change into the Craft folder.
  3. 3Generate build files. Run cmake . in the project folder to create the build files.
  4. 4Compile the game. Run make to compile Craft. On Windows, use the MinGW commands instead.
  5. 5Start the game. Run ./craft to launch the game, then use the controls listed in the README.
  6. 6Optionally host a server. Build the world library with gcc, then run python server.py to host multiplayer games.

What Craft is and what it isn't

Craft is a Minecraft clone for Windows, Mac OS X and Linux. Its terrain uses Simplex noise, its world changes are saved to a sqlite3 database, and it includes a Python-based server for online multiplayer.

It is a simplified clone with a limited feature set, so it is not a substitute for the full Minecraft experience. The README points to Mac and Windows binaries on the project website; otherwise you build it from source.

  • Terrain generated from Simplex noise, deterministic for each position
  • More than 10 block types, with more that can be added easily
  • Plants, transparent glass, simple clouds, and day/night cycles
  • World changes persisted in a sqlite3 database
  • Optional multiplayer through a Python server

Install the dependencies for your system

You need CMake, a C compiler and a few libraries. The README lists separate steps for each platform.

On Mac OS X, install CMake (Homebrew can do this). On Ubuntu Linux, install the listed packages. On Windows, install CMake and MinGW, add C:\MinGW\bin to your PATH, and install cURL so that CURL/lib and CURL/include are in your Program Files directory.

  • Mac OS X: CMake, optionally via Homebrew
  • Linux (Ubuntu): cmake, libglew-dev, xorg-dev, libcurl4-openssl-dev, and the glfw build dependencies
  • Windows: CMake, MinGW and cURL; use the MinGW commands instead of the standard ones
brew install cmake sudo apt-get install cmake libglew-dev xorg-dev libcurl4-openssl-dev sudo apt-get build-dep glfw

Build and run Craft from source

Once the dependencies are installed, clone the repository, enter the folder, generate the build files with CMake, compile, and start the game.

On Windows, use the MinGW commands in place of the standard CMake and make steps.

  • Clone the repository with git
  • Enter the project folder
  • Generate build files with cmake
  • Compile with make
  • Run ./craft
git clone https://github.com/fogleman/Craft.git cd Craft cmake . make ./craft

Learn the controls

Movement uses the usual WASD keys. Left click destroys a block and right click creates one. Tab switches between walking and flying.

  • WASD to move forward, left, backward and right
  • Space to jump
  • Left click to destroy a block
  • Right click or Cmd + Left Click to create a block
  • Ctrl + Right Click to toggle a block as a light source
  • 1-9 to select the block type, E to cycle through block types
  • Tab to toggle walking and flying
  • ZXCVBN to move in exact directions along the XYZ axes
  • F for orthographic mode, O and P to observe players
  • T to chat, / to enter a command, ` to write text on a block (signs)

Join or host a multiplayer server

The original public server has been taken down, so you need to host your own or find another server. To connect, pass a host and port on the command line, or use the /online command in the game. To run a server, compile the terrain generation DLL and start server.py with Python.

The server is written in Python but needs a compiled library so it can generate terrain the same way the client does.

  • Connect from the command line with ./craft [HOST [PORT]]
  • Or in game with /online [HOST [PORT]]
  • Server requires the compiled world library built with gcc before running server.py
./craft [HOST [PORT]] gcc -std=c99 -O3 -fPIC -shared -o world -I src -I deps/noise deps/noise/noise.c src/world.c python server.py [HOST [PORT]]

Use chat commands and save files

Chat commands are entered with / in the game. /offline [FILE] switches to offline mode and uses the save file named craft by default. /online HOST [PORT] connects to a server. /goto [NAME] teleports you to another user, /list shows connected users, and /spawn returns you to the spawn point.

World changes are stored in a sqlite database, and only the changes are saved; the default world is regenerated and your edits are applied on top.

  • /list displays connected users
  • /login NAME switches to another registered username (case-sensitive)
  • /logout returns you to guest status
  • /pq P Q teleports you to a chunk
  • /spawn returns to the spawn point
/offline [FILE] /online HOST [PORT] /goto [NAME] /pq P Q

What people use it for

  • Reading a compact, real voxel game written in C to learn how chunks and rendering work
  • Studying how OpenGL shaders and vertex buffers are used in a small project
  • Running a small Minecraft-like sandbox on your own computer
  • Hosting a simple multiplayer world for friends on your own network

Frequently asked questions

Is Craft free to use?

Yes. Craft is open source under the MIT licence, and its source code is available on GitHub. You can clone it, build it and modify it.

What do I need to install Craft?

You need CMake, a C compiler such as GCC or MinGW on Windows, GLEW, the GLFW build dependencies and libcurl on Linux. Python is only needed for the optional multiplayer server.

Is there a ready-to-run download for Craft?

The README says Mac and Windows binaries are available on the project website. For Linux, the documented route is to build from source using the listed commands.

Can I play on the official Craft server?

No. The README says the craft.michaelfogleman.com server has been taken down. You can host your own server with the included Python server.py or connect to a server someone else runs.

Why does the build fail on Windows?

The README asks Windows users to install CMake, MinGW and cURL, add C:\MinGW\bin to PATH, and use the MinGW commands in place of the standard ones. Check that each of these steps was followed.

How does Craft compare to Minecraft or other clones?

Craft is a simplified clone with a limited feature set, so it is less complete than Minecraft. The README does not compare it to other projects. Comparable projects mentioned in our analysis include Minetest, Cubyz, Voxelands and Minecraft-Clone.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Craft suits developers, students and hobbyists who want to read or run a compact voxel game in C with OpenGL shaders, and who are comfortable building from source. If you want the full Minecraft experience, a ready-to-run download, or an actively maintained project, pick something else, such as Minetest or another clone, since the last push was in April 2024.

Install options & downloads