Unofficial BSP v30 File Spec
Table of content
- Introduction
- Header
- LUMP_ENTITIES
- LUMP_PLANES
- LUMP_TEXTURES
- LUMP_VERTICES
- LUMP_VISIBILITY
- LUMP_NODES
- LUMP_TEXINFO
- LUMP_FACES
- LUMP_LIGHTING
- LUMP_CLIPNODES
- LUMP_LEAVES
- LUMP_MARKSURFACES
- LUMP_EDGES
- LUMP_SURFEDGES
- LUMP_MODELS
Introduction
The following file specification concerns the BSP file format version 30, as it has been designed by the game developper Valve and used in their famous GoldSrc Engine. The file extension is ".bsp".
Important: The following informations do NOT rely on any officially published file specification from Valve Corporation. The file format is still in use by the proprietary Half-Life Engine (better known name of the GoldSrc Engine) implying that there is no public source code of either the file loader or renderer. The following specification has been put together based on informations from the open source project Black Engine as well as the compilers included in the Half-Life SDK which also contains their source.
This file spec uses constructs from the C programming language to describe the different data structures used in the BSP file format. Architecture dependent datatypes like integers are replaced by exact-width integer types of the C99 standard in the stdint.h header file, to provide more flexibillity when using x64 platforms. Basic knowledge about Binary Space Partitioning is recommended. There is a common struct used to represent a point in 3-dimensional space which is used throughout the file spec and the code of the hlbsp project.