Tremble is an asset importer for Quake-style .map files, that works in Editor and at runtime.
Full feature list:
- Support for TrenchBroom v2023 and v2024 on Windows, Mac, and Linux (Linux support is experimental and only tested on Ubuntu 22.04 LTS)
- Supports TrenchBroom features such as layers (including omitting layers marked as "omit for export")
- Support for Unity 2021.3+ (Tremble will run faster on newer versions as additional optimisations are available)
- Syncs to your map editor when compiling code (optional)
- Automatically imports maps on save from your map editor
- Automated generation and installation of game config and FGD files for TrenchBroom
- Optional support for importing maps at runtime in Standalone builds
- Allow your players to create their own maps and import them!
- Works with Steam Workshop, Unity User Generated Content, and more (though you'll need to write the Steam/other backend specific code yourself to download/upload maps using the revelant SDK)
- Support for "template" map files - create a single template to base all maps on to save initial work setting up common entities
- Supports point and brush entities from maps, mapped to MonoBehaviours
- Entities can be grouped
- Entities have full collision, UV2 for lightmaps, and are baked as static when appropriate
- Fully supports prefabs:
- Prefabs are displayed in your map 1:1 with Unity
- Entities can be parented to other entities
- Fully supports member variables/[SerializedField]s on entities
- Supported for prefabs and all other entities
- Supports basic types (string, int, float, bool, etc)
- Supports enums
- Supports custom types (extendable by user)
- Supports references between entities in map
- Supports ScriptableObjects - so you can wire your data up directly in maps
- Fully supports materials:
- Materials are displayed in your map 1:1 with Unity (including custom shaders)
- Materials can be grouped for ease of use
- "Special" coloured or checkerboard textures can be generated for your map editor for use with volumes and other invisible entities
- Live Update (experimental):
- Edit your map while in playmode and see changes instantly!
- Map Repair:
- Swap out broken textures and entities from maps
- Change every instance of a given texture in a map for another
- (experimental) Import map geometry and entities from other games!
- Import FGD files from other games to generate entity classes
- Import WAD files from other games to import textures
- Customisable naming convention for materials, entities, materials, and fields
- Use snake_case, UpperCamel, lowerCamel, Human-readable or preserve your naming as-is from Unity
- Customisable import scale
- By default, 64 map units = 1 Unity meter, but you can use whatever makes sense for your game
Under the hood, it comprises 4 major parts, Map Sync, Map Import, Map Repair and Live Update.
Map Sync takes your Unity prefabs and materials, and creates a TrenchBroom "game" full of textures and entity definitions, and handles the installation and configuration of it. Within seconds, you can be editing a map full of your actual Unity assets in TrenchBroom! Map sync for a small project is instant, and for a medium-sized project takes around 2 seconds.
Map Import takes your .map file from TrenchBroom, and converts it back to a Unity prefab, applying your original materials and spawning your linked prefabs into it automagically. In doing so it also optimises the map geometry to remove hidden faces and to combine faces wherever possible. Map import for a small project is instant, and for a medium-sized project takes around 2 seconds.
Map Repair takes a .map file which has broken textures or entity naming, and fixes them using values from your Unity project. It can be used to make wholesale swaps of textures and entities, or even to bring in maps from other games while swapping in your own prefabs. Map Repair for a small map is instant, and for a large map (such as Quake's E1M1) takes around 5 seconds.
Live Update watches for maps that are modified while your game is running (in playmode). When detected, it re-creates all worldspawn brushes, updates supported properties on all map entities, adds any newly-added entites in the map, and deletes any removed objects from the map. This enables quick iteration while the game is still running. Map Reinstance for a small project takes around 50ms, and for a medium-sized project takes around 1 second.
At runtime, Tremble steps aside and has zero overhead whatsoever. You can query your map for entities quickly if needed, but Tremble does not contain any Update code in your game and is zero-cost at runtime.
Supports all current Unity LTS releases (Unity 2021.3.x and above). When run against newer versions of Unity, additional optimisations are available and so it's recommended to use the latest LTS or Tech Stream release.
NOTE: Tremble supports Windows, macOS and Linux. Linux support is currently only validated on Ubuntu 22.04 LTS, with TrenchBroom from the GitHub releases page (not via Snap).