A Trenchbroom-style .map brush loader for raylib-d, written in D.
Raydrench parses Valve220-format .map files (as exported by TrenchBroom), converts brushes into convex polygons, builds raylib Models from them, and provides simple brush-based collision resolution.
- Parses
.mapfiles (entities, brushes, brush faces, Valve220 UVs) - Converts brush planes into polygons via plane-intersection
- Automatically loads and caches textures (tries common raylib-supported formats)
- Builds renderable raylib meshes/models from parsed brushes
- Basic AABB/plane-based player collision resolution against brush geometry
Details
Build the library:
cd src
dub buildBuild and run the example:
cd example
dub runDetails
git submodule add https://github.com/zariep-software/raydrench.git deps/raydrench
git submodule update --init --recursiveThis drops the raydrench repo into deps/raydrench in your project, with deps/raydrench/src being the actual dub package (same as this repo's src/ folder).
Point the raydrench dependency at the local submodule path instead of fetching it from the DUB registry:
"dependencies": {
"raylib-d": "~>6.0.1",
"raydrench": {
"path": "deps/raydrench/src"
}
}