vimpop/UCraft
소개
자원이 제한된 머신을 위해 C로 작성된 Minecraft 서버 구현입니다.
개발 도구What you can do
- Procedural terrain generation — an explorable world generated on demand as players move around
- Primitive Minecraft gameplay — walk around, chat with other players, and break/place blocks
- Online-mode encryption — authenticated logins through mbedTLS, or offline mode without it
- Tiny footprint — ~46K-byte binary without authentication (~70K with), and ~50K bytes of memory on average (for a single player)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +2
- in 15 days
- +4
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalUCraft
A lightweight Minecraft server implementation written in C, designed for machines with limited resources.
Procedurally generated terrain
UCraft implements just the bare essentials of the Minecraft protocol: clients can join, explore a procedurally generated world, chat, and break and place blocks. It provides the foundation for very primitive Minecraft gameplay — not a full server replacement.
Currently supports Minecraft 26.1.2 clients.
Features
- Procedural terrain generation — an explorable world generated on demand as players move around
- Primitive Minecraft gameplay — walk around, chat with other players, and break/place blocks
- Online-mode encryption — authenticated logins through mbedTLS, or offline mode without it
- Tiny footprint — ~46K-byte binary without authentication (~70K with), and ~50K bytes of memory on average (for a single player)
Building
The server was built and tested on Linux. On Windows, MSVC is required and on macOS, Xcode Command Line Tools and CMake are required.
sudo apt install git build-essential cmake make
git clone https://github.com/vimpop/UCraft/
cd UCraft && mkdir build && cd build
cmake ..
make
This produces an executable named UCraft in build/src.
Pre-built binaries are also available as artifacts of the GitHub Actions workflow runs.
Regression tests
The CTest suite compiles the real gameplay, inventory, and block-storage code. Tests use fixed fixtures and recorded messages, so they need no Minecraft client or account.
Run the portable suite on Linux, macOS, or Windows:
git submodule update --init --recursive
cmake -S . -B build/test -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build/test --config Release --parallel
ctest --test-dir build/test -C Release --output-on-failure --no-tests=error
On Linux, add -DUCRAFT_TCP_TESTS=ON to include the Python TCP smoke test. It
checks status, ping, malformed frames, concurrent clients, and graceful shutdown.
The test uses port 25565 by default and does not contact Mojang.
For memory and undefined-behavior checks on Linux:
cmake -S . -B build/sanitizers -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DUCRAFT_TCP_TESTS=ON -DUCRAFT_SANITIZERS=ON
cmake --build build/sanitizers --parallel
ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 \
ctest --test-dir build/sanitizers --output-on-failure --no-tests=error
The GitHub Actions matrix runs the suite with GCC, Clang, and MSVC, plus Linux
sanitizers. JUnit results and logs are uploaded as artifacts. Use
-DBUILD_TESTING=OFF to build only the server.
Add gameplay cases in tests/game_tests.c and register new names in
tests/CMakeLists.txt.
Running
./src/UCraft
[INFO]: Listening on *:25565
[INFO]: UCraft server started!
Then connect to localhost:25565 with a Minecraft 26.1.2 client.
Implementations
- Lightbulb (BL602 MCU) — implementation details here
- Samsung C410W Printer (ARM BE MCU) - implementation details here
- Italian ISP Router (Broadcom BCM63138) - implementation details here by ZioCook
Your implementation could also be here! (feel free to open up a issue with your implementation)
Credits
- Bixilon for help with major parts of the Minecraft protocol
- wiki.vg for documenting Minecraft's protocol
License
관련 프로젝트 살펴보기
불러오는 중…