TrenchBroom is a modern cross-platform level editor for Quake-engine based games.



TrenchBroom Icon

TrenchBroom is a modern cross-platform level editor for Quake-engine based games.


  • General
    • Full support for editing in 3D and in up to three 2D views
    • High performance renderer with support for huge maps
    • Unlimited Undo and Redo
    • Macro-like command repetition
    • Issue browser with automatic quick fixes
    • Point file support
    • Automatic backups
    • .obj file export
    • Free and cross platform
  • Brush Editing
    • Robust vertex editing with edge and face splitting and manipulating multiple vertices together
    • Clipping tool with two and three points
    • Scaling and shearing tools
    • CSG operations: merge, subtract, intersect
    • UV view for easy texture manipulations
    • Precise texture lock for all brush editing operations
    • Multiple texture collections
  • Entity Editing
    • Entity browser with drag and drop support
    • Support for FGD and DEF files for entity definitions
    • Mod support
    • Entity link visualization
    • Displays 3D models in the editor
    • Smart entity property editors
  • Supported Games
    • Quake (Standard and Valve 220 file formats)
    • Quake 2
    • Quake 3 (partial, no patches or brush primitives yet)
    • Hexen 2
    • Daikatana
    • Generic (for custom engines)
    • More games can be supported with custom game configurations


  • Binary builds are available from releases.





See releases for latest changes.

  • Daikatana support

    Daikatana support

    • [x] Pak file support
    • [x] Model support
    • [x] Texture support - .wal files have 9 instead of 4 mip levels and include palette
    • [x] Deferred palette loading support - load palette as specified in a worldspawn property
    • [x] Map file support
    • [x] Create Daikatana FGD

    Useful info:

    • - Daikatana to Quake 2 model converter
    • Daikatana model file extension is .dkm
      • DK's model format is actually two versions, with the vertices stored differently, and with different version numbers in the header
      • The first version has the vertex as 3 bytes, the second has they packed together into an unsigned int, so x and z coord have 11 bits, and y has 10 bits
    • - Daikatana .wal format
    • - Daikatana .pak format
    • Daikatana map files are like Quake 2's, but have an optional additional RGB triple for each face
      • does the presence of the RGB triple imply that Quake 2's content flags and surface flags / value is also present?
    • Quark should have code to read all of the above
    • Textures can contain a palette that should be used - not hard to extend my Wal reader for this
    Type:Enhancement Prio:3 
    opened by kduske 50
  • Missing INCLUDE_DIRECTORIES for OpenGL on Unix

    Missing INCLUDE_DIRECTORIES for OpenGL on Unix

    Problem: OpenGL library and its headers are not always installed under /usr prefix. On many operating systems, it can often be found under /usr/local, which is not in the compiler's default header file search path.

    Consider attached patch. This is required at least on FreeBSD.

    opened by danfe 45
  • Add Assimp support.

    Add Assimp support.

    This PR adds an AssimpParser to Trenchbroom that will load any entity model in a format that Assimp supports if another parser didn't get to import it first. assimp is required as supported model format in the GameConfig. This does not include animation, so all meshes are static. Assimp supports mdl, so that means this includes Half-Life model support. md5mesh and LWO are also included, but are untested. Solves #3449. Helps out #1140. Solves #719, hopefully. This code's pretty big and complicated compared to what I usually write so apologies if it's messy. A fix for #3906 would pair well with this PR as importing 'modern' models will still take a while to do due to building the spatial tree. image

    opened by EludeQ 39
  • Trying to compile TrenchBroom 2020.1 release fails with

    Trying to compile TrenchBroom 2020.1 release fails with "illegal instruction (core dumped)" message

    System Information

    TrenchBroom v2020.1 on Fedora 32 Workstation Edition

    Expected Behavior

    Compilation succeeds and produces a working binary.

    Steps to Reproduce

    Install distribution dependencies, then fetch sources and try to compile:

    $ git clone sources
    $ git submodule update --init --recursive
    $ git checkout tags/v2020.1 -b qt-build
    $ mkdir build && cd build
    $ cmake ..
    $ make -j25

    Crash Info

    [ 98%] Built target dump-shortcuts
    [ 99%] Generating gen-manual/index.html
    [WARNING] Duplicate identifier 'keyboard_shortcuts' at line 1112 column 1
    [ 99%] Generating gen-manual/default.css, gen-manual/shortcuts_helper.js
    [ 99%] Generating gen-manual/shortcuts.js
    make[2]: *** [app/CMakeFiles/TrenchBroom.dir/build.make:103: app/gen-manual/shortcuts.js] Illegal instruction (core dumped)
    make[2]: *** Deleting file 'app/gen-manual/shortcuts.js'
    make[1]: *** [CMakeFiles/Makefile2:1804: app/CMakeFiles/TrenchBroom.dir/all] Error 2
    make: *** [Makefile:172: all] Error 2

    I'm probably doing something wrong or missing something. This is a pretty clean Fedora install I only did few weeks ago. However I'm unable to figure this one out. It's probably about lack of specific build flags or maybe there is something weird with dump-shortcuts or something.

    I tried to Google this issue, but all I saw was stuff about nodejs crashing due to some CPU instruction not being present in certain very old AMD CPUs. However I have AMD R9 3900X so that shouldn't be the issue. Also I didn't have any trouble compiling Trenchbroom's older releases on AMD FX-8320 last summer.

    Edit: Added the missing checkout I did. I think it was in this order. I'm starting to suspect that this is where it went wrong and I received wrong submodule commit and then dump-shortcuts used it and something blew up even if the compiling of dump-shortcuts went alright.

    Edit 2: Well, nope. I did get different commit of vecmath (7902d5f5603e86f38b60b418302823a6276c1594) but even after make clean and then trying again with make -j25 it still fails the same way.

    opened by Sinihopea 38
  • Bug: RMBClick while in VEF modes

    Bug: RMBClick while in VEF modes

    If you right-click while in one of the VEF manip modes a new brush seems to be created at the click point 1 unit in dimensions, however this new brush cannot be interacted with at all. Further, it appears to be selected but clicking on other brushes does not deselect it. RMBClicking again will clear this 'ghost' brush.

    opened by necros0 36
  • Moving brush groups makes them unpickable

    Moving brush groups makes them unpickable

    Linux Mint 17 'Qiana', Xfce 32 bit. TrenchBroom 2.0.0 5cfc5aOR:

    (This is a weird one to try and describe, but here goes.)

    Steps to reproduce:

    1. Copy and paste a grouped set of brushes (hereafter "Brush Group A").
    2. Move Brush Group A to a different location in the map (sometimes you need to move it more than once for the bug to kick in).
    3. Select something else (e.g. a different brush or a different brush group).
    4. Try to select Brush Group A again --> It has now become impossible to click anywhere on Brush Group A to select it; the programme will instead select something behind it. To select Brush Group A, you now need to click on one particular brush within the group, otherwise TB2 acts as if it is not there and instead selects something behind it.
    5. Closing the programme and re-opening the same .map file fixes this: Brush Group A can now once again be selected normally.
    opened by totalnewbie 32
  • Shift+LMB Face dragging sometimes inconsistent with mouse movement

    Shift+LMB Face dragging sometimes inconsistent with mouse movement

    Sometimes dragging a face to resize a brush has the face movement incongruous with the mouse motion. eg: You pull the face directly away but it shrinks the brush instead of stretches it.

    This only ever happens with angled faces relative to the rest of the brush, ex:

    ( 2000 2560 -192 ) ( 2000 2720 -192 ) ( 1936 2720 -192 ) metaltrim -0 -17 90 1 1
    ( 1936 2720 -80 ) ( 2000 2720 -80 ) ( 2000 2560 -80 ) ne_wall48_16 -14.843 -21.7846 45 1 1
    ( 1944 2530 -192 ) ( 1944 2530 -80 ) ( 1888 2628 -80 ) metaltrim -0 -0 90 1 1
    ( 1910 2628 -176 ) ( 1910 2628 -144 ) ( 1826 2544 -144 ) metaltrim -0 -0 90 1 1
    ( 1902 2488 -80 ) ( 1902 2488 -192 ) ( 1804 2544 -192 ) ne_wall48_16 -16 -0 -0 1 1
    ( 1904 2600 -192 ) ( 1832 2528 -192 ) ( 1868 2564 -80 ) wall48_1 -128 -27 -0 1 1.13

    If you place the camera so that it is axially aligned to the world and try to drag the 45 degree faces, there is this pause where nothing happens while dragging and then suddenly it starts to move. Also, if you drag the mouse perpendicularly to the face's normal (parallel to the face), the expected behaviour is that the brush should not stretch at all, but instead it will stretch outwards.

    Seems like this is an issue with the way the editor is interpreting mouse movements relative to the face. They seem to be interpreted as axial, but should instead be made to be relative to the face's normal.

    Not sure if this is a known issue?

    opened by necros0 32
  • Revamp duplication

    Revamp duplication

    The offset is not really all that useful to me. I'd like to be able to duplicate stuff in place because every time the copy offsets, I have to spend time dragging it back into whatever axis is now shifted wrong.

    Maybe spacebar could duplicate in place, I dunno. :)

    opened by WarrenMarshall 28
  • Groups and Layers

    Groups and Layers

    Every good level editing problem has some concept of groups or layers. The map format supports this through func_group entities, but those are seriously lacking because they cannot contain entities and brushes which belong to a func_group cannot belong to a brush entity. So TB needs to at least extend this.

    The requirements for such a features are

    • must be able to create groups of objects (entities and brushes) and delete groups of objects (not the objects themselves)
    • each group should have a unique name which is editable
    • must be able to add objects to existing groups, remove objects from groups or move objects from one group to another (see first question below)
    • must be able to hide everything but a selection of groups or to hide only selected groups
    • must be able to lock groups (just like we discussed, locked groups are displayed but not editable)
    • commands such as "select all" must only affect the non-hidden objects


    • should it be possible for objects to belong to several groups? if so, func_groups are out of the question.
    • Even if not, func groups are problematic because they cannot contain entities. We can fix this in the editor of course so that entities can be added to groups, too. This can be persisted by adding a new key to those entites (such as "__TB_group" "My very useful group").
    • The result of the aforementioned trick is that brush entities can belong to at most one group - you cannot assign some brushes of a func_door to one group and others to another group.

    I'm all for using the existing func_group capabilities if we extend them so that they can contain entities. The advantage is interoperability with other editors. The disadvantages of func_groups are that objects can only belong to one group (which I don't see as a problem, though) and that brushes of a brush entity can only belong to one group.

    What do you think?

    opened by kduske 26
  • Integer Errors in .MAP files for Vertex locations

    Integer Errors in .MAP files for Vertex locations

    Editing using the vertex and or clip tool causes micro errors in vertex positions for brushes. The same can happen for Texture rotation and X.Y offsets. I suspect the texture offset errors only happen with brushes that have the float values instead of integers.

    Included file for inspection. It is a quake 2 map.

    opened by Rbanninga 25
  • Quake3 support

    Quake3 support

    Some resources:

    Map Format

    • (patchDef2 and brushDef)
    • (some examples)

    MD3 Format




    PK3 Files

    • (lightweight zip library)


    • [ ] Add support for pk3 files
    • [ ] Add support for Q3 map files (skip patches and brush primitives)
    • [ ] Add support for Q3 shaders
    • [ ] Add support for brush primitives (brushDef)
    • [ ] Add support for patches (patchDef)
    • [ ] Add support for md3 models
    Type:Enhancement Prio:1 
    opened by ghost 25
  • Undo/Redo stop working, only resume working after a reset

    Undo/Redo stop working, only resume working after a reset

    on TrenchBroom 2022.2, multiple users have reported that Undo/Redo stop working through keyboard shortcut AND menu option.

    They only resume working after closing and restarting TB.

    No steps to reproduce are known.

    opened by muk0r 1
  • Consider splitting up the Edit menu into several categories

    Consider splitting up the Edit menu into several categories

    Using TrenchBroom v2022.1 still.

    As TB keeps gaining features, the Edit menu continues to expand vertically. My pitiful laptop with its max resolution of 1366x768 doesn't like that very much, and draws the menu as if it had two columns:


    I imagine it's possible to split up all the options available therein into two, maybe three categories, without losing the UI's signature minimalism.

    Maybe move everything from Flip Horizontally downwards into a "Manipulation" menu? Not the best suggestion but something for a start.

    Type:Enhancement Prio:3 
    opened by onetruepurple 2
  • Display order of overlapping edges in 2d view favours locked layers.

    Display order of overlapping edges in 2d view favours locked layers.

    System Information

    2022.1 Win64

    Expected Behavior

    That the edges of a locked layer are drawn first, so that all of the other layers are drawn in front, or alternatively, that it's based on the order of the layers themselves, top to down.

    Steps to Reproduce

    create 2 brushes, 1 in front of the other, but maybe 1 is longer, but edges are overlapping. put them in 2 seperate layers, and lock 1 layer.

    Why / Use case.

    I wanted to simplify a model, to make it work for grid 8, so I was overlapping the model in the locked layer, but then I noticed this problem.

    Crash Info

    No crashing detected.

    Thank you very much!

    Type:Enhancement Prio:2 
    opened by nathnolt 7
  • Algebraic Terms on strings

    Algebraic Terms on strings

    I've been messing around with getting non-quake unit models into TB nicely, and I've figured it involves resizing the model.

    At a glance, with the expression language it would seem that {"model": modelname, "scale": modelscale*64} would do it, but that results in an error as modelscale is given as a string in the expression, even if the type of the key is float in the FGD.

    I've found a work-around, although it's ugly... {"model": modelname, "scale": 64 * (modelscale|0)} - using the binary operator the modelscale is converted to an int and I can perform math! ...although now I can't have decimal scalings...

    It's a little bit unintuitive, to say the least. It also didn't display any errors when I set the modelscale in the gameconfig!

    Type:Bug Prio:2 
    opened by ACBob 8
  • Add `color` to the color picker keyword trigger list.

    Add `color` to the color picker keyword trigger list.

    Not sure why excluded color from the list of words that triggers the color picker to appear, but could we get that added?

    I have mods that use a color key name, and I am forced to rename it to _color to make the color picker appear, choose my colors, then rename it back to color. This is an easy change to make, unless there was some reason against it.

    Type:Enhancement Prio:2 
    opened by eGax 2
  • Create universal binaries for Apple Silicon

    Create universal binaries for Apple Silicon

    I stumbled upon #3966 and also thought that it would be great if TrenchBroom was compiled into a universal/Apple Silicon (ARM64) binary.

    I am using TrenchBroom on my 2021 MacBook Pro (M1 Max) and currently, the build does run - however, since it's being translated through the Rosetta layer, it runs quite slowly and is not super pleasant to use.

    Would be awesome! :)

    Prio:2 Type:Maintenance 
    opened by konsuko 2
The TrenchBroom Level Editor
A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.

A Tiny 2D OpenGL based C++ Game Engine that is fast, lightweight and comes with a level editor.

Samuel Rasquinha 54 Nov 3, 2022
Open-source, cross-platform, C++ game engine for creating 2D/3D games.

GamePlay v3.0.0 GamePlay is an open-source, cross-platform, C++ game framework/engine for creating 2D/3D mobile and desktop games. Website Wiki API De

gameplay3d 3.9k Nov 24, 2022
MAZE (My AmaZing Engine) - 🎮 Personal open-source cross-platform game engine

MAZE (My AmaZing Engine) is the self-written open-source cross-platform game engine in the active development stage. At the moment it is my main pet project, developed for the purpose of learning and preserving different game dev technologies.

Dmitriy Nosov 13 Nov 9, 2022
One framework for creating powerful cross-platform games.

MonoGame One framework for creating powerful cross-platform games. The spiritual successor to XNA with thousands of titles shipped across desktop, mob

MonoGame 8.9k Nov 23, 2022
VERY simple cross-platform C++ analytics for games (using Google Analytics)

Tiniest Analytics is a very simple to use, cross-platform (tested on win/osx/linux/ios/android) and basically very tiny analytics system written in C++ (less than 100 lines of code), made specifically for games. It uses libcurl to post events to your Google Analytics account.

Mihai Gosa 96 Oct 11, 2022
KlayGE is a cross-platform open source game engine with plugin-based architecture.

KlayGE KlayGE is a cross-platform open source game engine with plugin-based architecture. It's started since 2003. The explicit goal of KlayGE is: to

Minmin Gong 1.8k Nov 24, 2022
Intrinsic is a Vulkan based cross-platform game and rendering engine

Intrinsic is a Vulkan based cross-platform game and rendering engine

Benjamin Wrensch 1k Nov 18, 2022
This is a list of different open-source video games and commercial video games open-source remakes.

This is a list of different open-source video games and commercial video games open-source remakes.

Ivan Bobev 145 Nov 19, 2022
Quake GPL Source Release

This is the complete source code for winquake, glquake, quakeworld, and glquakeworld. The projects have been tested with visual C++ 6.0, but masm is

id Software 3.9k Nov 29, 2022
Quake 2 GPL Source Release

This is the complete source code for Quake 2, version 3.19, buildable with visual C++ 6.0. The linux version should be buildable, but we haven't test

id Software 2.2k Nov 23, 2022
Quake 4 SDK integrated with Doom 3

Quake4Doom Quake 4 SDK integrated with Doom 3 GPL release This project is a code integration of the Quake 4 SDK against the Doom 3 GPL codebase. This

null 55 Nov 8, 2022
A model viewer for Quake 1 and Hexen 2 with a focus on accurate representation.

LunarViewer A model viewer for Quake 1 and Hexen 2 with a focus on accurate representation. Powered by raylib and dear imgui! Features Support for Qua

Luna Ryuko Zaremba 35 Nov 24, 2022
Quake II on Dx12

QuakeIIDXXII Quake II on Dx12. It has been tarted from because it is the original code and it was compiling ou

SebH 26 Sep 20, 2022
Combination of various small tweaks/mods for Quake Enhanced

QETweaks A collection of "tweaks" (small mods) for Quake Enhanced multiplayer servers. Enabling tweaks Set saved1 console variable to desired value be

CK 1 Dec 29, 2021
A cross-platform 2D game engine

nCine nCine is a cross-platform 2D game engine. It is released under the MIT License, Copyright (c) 2011-2021 Angelo Theodorou. For additional informa

nCine 768 Nov 26, 2022
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

Panda3D Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. Panda3D is open-source and free for a

Panda3D 3.6k Nov 28, 2022
A powerful free cross-platform RTS game engine

Spring RTS game engine README Spring (formerly TASpring) is an Open Source Real Time Strategy game engine. Visit our project homepage for help, sugges

Spring RTS 2.9k Nov 22, 2022
CSEngine is a cross-platform 3D game engine.

CSEngine - Cross Platform C++ Game Engine CSEngine is a cross-platform 3D game engine. ?? As it is under development, it is not yet suitable for pract

ounols 53 Nov 11, 2022
Free, cross-platform 2D game engine powered by Haxe and OpenFL

flixel | addons | ui | demos | tools | templates | docs | Links Here are the most important links to get you started with HaxeFlixel: G

HaxeFlixel 1.7k Nov 29, 2022