Skip to content

jsoulier/blocks

Repository files navigation

Blocks

Tiny Minecraft clone in C and HLSL using the new SDL3 GPU API

Features

  • Procedural world generation
  • Asynchronous chunk loading
  • Persistent worlds
  • Physics
  • Blocks and sprites
  • Basic lighting
  • Day and night cycle

Building

Windows

git clone https://github.com/jsoulier/blocks --recurse-submodules
cd blocks
mkdir build
cd build
cmake ..
cmake --build . --parallel 8 --config Release
cd bin
./blocks.exe

Linux

git clone https://github.com/jsoulier/blocks --recurse-submodules
cd blocks
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel 8
cd bin
./blocks

Shaders

Shaders are precompiled. To build locally, add SDL_shadercross to your path

Controls

  • WASDEQ to move
  • Space to jump
  • F5 to toggle fly
  • Escape to unfocus
  • Left Click to break a block
  • Middle Click to select a block
  • Right Click to place a block
  • Scroll to change blocks
  • F11 to toggle fullscreen
  • LControl to sprint
  • T to reset the time of day

About

Tiny Minecraft clone in C and HLSL using the new SDL3 GPU API

Topics

Resources

License

Stars

286 stars

Watchers

4 watching

Forks

Contributors