19 releases (12 breaking)
Uses new Rust 2024
| 0.14.1 | Feb 1, 2026 |
|---|---|
| 0.13.0 | Jan 18, 2026 |
| 0.11.0 | Dec 30, 2025 |
| 0.10.0 | Nov 19, 2025 |
| 0.3.0 | Feb 22, 2025 |
#578 in Game dev
Used in bevy_trenchbroom
160KB
3.5K
SLoC
QBSP
Rust crate for parsing, and operating with Quake 1, 2, and GoldSrc BSP files.
Features
- Parsing
.bspfiles with the BSP29 BSP2, BSP30 BSP38, and Qbism formats. - Structured easy access to the bsp data.
- BSP raycasting.
- Mesh generation.
- Lightmap atlas generation either per-style or per-slot (
.litsupported). - BSPX support, including built-in structures for the
RGBLIGHTING,LIGHTGRID_OCTREE,BRUSHLIST,DECOUPLED_LM, andFACENORMALSlumps.
Quickstart
use qbsp::prelude::*;
let _ = BspData::parse(BspParseInput {
bsp: &[], // Data of the bsp file.
lit: None, // Optional lit file for colored lighting if no `RGBLIGHTING` BSPX lump is present.
settings: BspParseSettings::default(),
});
Feature wishlist
I might work on these at a later date, but if anyone wants to help out or just give some ideas, they're more than welcome to!
- More flexible meshing API
- BSP writing
Version support table
I wish these used whatever was in your project, but at the time of writing, wildcards just makes Cargo just choose the latest version rather what what is best for you.
| QBSP | bevy_reflect | glam |
|---|---|---|
| 0.13-0.14 | 0.18 | 0.30 |
Dependencies
~14MB
~365K SLoC