{"id":23681396,"url":"https://github.com/codecat/godot-tbloader","last_synced_at":"2025-04-13T00:49:26.932Z","repository":{"id":40442381,"uuid":"465080574","full_name":"codecat/godot-tbloader","owner":"codecat","description":"TrenchBroom Loader for Godot 4. (Alternative to Qodot)","archived":false,"fork":false,"pushed_at":"2025-01-11T14:25:43.000Z","size":162,"stargazers_count":253,"open_issues_count":35,"forks_count":35,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-13T00:48:57.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecat.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"openplanet"}},"created_at":"2022-03-01T22:44:36.000Z","updated_at":"2025-04-02T20:19:23.000Z","dependencies_parsed_at":"2024-05-02T22:35:27.259Z","dependency_job_id":"5a76a423-9960-45ce-8b35-f5637240401b","html_url":"https://github.com/codecat/godot-tbloader","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgodot-tbloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgodot-tbloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgodot-tbloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecat%2Fgodot-tbloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecat","download_url":"https://codeload.github.com/codecat/godot-tbloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650436,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-29T18:37:58.565Z","updated_at":"2025-04-13T00:49:26.908Z","avatar_url":"https://github.com/codecat.png","language":"C++","readme":"# TrenchBroom Loader for Godot\nMade as an alternative to [Qodot](https://github.com/QodotPlugin/qodot-plugin), using much of the\nsame map parsing code using the original [libmap](https://github.com/QodotPlugin/libmap) and a\nmodified [C++ port](https://github.com/EIRTeam/qodot/tree/4.0) of it.\n\n# Why not Qodot?\nQodot is great! It works really well. I initially made TBLoader because I wanted to try several\ndifferent approaches to creating meshes, including creating a bunch of `CSGMesh3D` inside of\n`CSGCombiner3D`, but that ended up being [problematic](https://github.com/godotengine/godot/issues/58637).\n\nWhen I originally made this, Qodot didn't officially support Godot 4. So I decided to take on the\nchallenge and rewrite most of it in godot-cpp mostly for fun. Nowadays, Qodot has a version available\nwhich does support Godot 4: https://github.com/QodotPlugin/Qodot\n\nIf you're already using Qodot, there might not be a lot of reasons for you to use this. It is not\nbackwards compatible with Qodot, and does a few things differently.\n\n# Alternatives\nThere are some other alternatives, as well:\n* [func_godot](https://github.com/func-godot/func_godot_plugin): a pure GDScript importer.\n* [Cyclops Level Builder](https://github.com/blackears/cyclopsLevelBuilder): an in-editor level\n  builder, much like what SabreCSG used to be.\n\n# Usage\nTo install TBLoader, you can either install it through [AssetLib](https://godotengine.org/asset-library/asset/1265)\n(search for \"TrenchBroom Loader\"), or by downloading a [release from Github](https://github.com/codecat/godot-tbloader/releases)\nand extracting it to your project's `addons` folder, so that you have a structure like this:\n```\nproject/addons/tbloader/plugin.cfg\n```\n\nYou might have to manually enable the plugin from your project settings. In the Godot editor, click\non Project -\u003e Project Settings, and go to the Addons tab. Check the \"Enable\" box next to TBLoader.\n\nTo build a level's geometry, create a `TBLoader` node in your scene hierarchy. In the properties of\nthe node you can select where your `.map` file is located, plus some more useful settings. With the\nnode still selected and the 3D view open, you will see a button `Build Meshes` in the toolbar the 3D\nview. Click that button to build the geometry.\n\n# TrenchBroom game config\nThe `tb-gameconfig` folder contains a game configuration for this addon. This includes a simple FGD\nwhich will have some common entities that create Godot nodes. Simply place the files in a folder\ncalled `Godot` inside the `games` folder of your TrenchBroom installation, so you would have\n`games/Godot/\u003cfiles\u003e`.\n\n# Entities\nThe following brush entities are supported by default:\n\n* `worldspawn` and `func_group`: Mesh instances and collision shapes\n* `area`: [`Area3D`](https://docs.godotengine.org/en/latest/classes/class_area3d.html)\n\nThe following point entities are supported by default:\n* `light`: [`OmniLight3D`](https://docs.godotengine.org/en/latest/classes/class_omnilight3d.html)\n\n## Custom entities\nYou can make custom entities as well. This works by loading and instantiating a `PackedScene` object\nbased on the class name. For example, the class name `foo_bar_foobar` will try to load one of the\nfollowing in this order:\n\n* `res://entities/foo_bar_foobar.tscn`\n* `res://entities/foo/bar_foobar.tscn`\n* `res://entities/foo/bar/foobar.tscn`\n\nThe first resource it finds will be loaded and instantiated. The root for this (`res://entities` by\ndefault) can be changed in the `TBLoader` node properties.\n\nAny properties set on the entity will be set directly on the instantiated node using\n[`_set`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-method-set)\nand [`_get`](https://docs.godotengine.org/en/latest/classes/class_object.html#class-object-method-get).\nThe getter is used first to determine the type of the property.\n\n# Textures\nTo see your textures in TrenchBroom, navigate to `Preferences` -\u003e `Godot` -\u003e `Game Path` and set it to your project's root directory. TrenchBroom will be able to see textures in your project. TBLoader will look for your textures in the `res://textures` directory. If you have a material (`rust.material`) in the same folder and with the same name as your texture (`rust.png`), TBLoader will load your material instead.\n\n\u003e Note: This currently only works with textures in `.png` format, and materials in `.material` or `.tres`.\n\n# Building\nOn all platforms, the build process is the same. Make sure scons is installed, and then just run\n`scons target=template_release` to build.\n\nOn Mac, the process is the same, but you will have to codesign and notarize your resulting binary as\nwell if you want it to run on consumer hardware. To do this, you need to already have the notary\ntool configured on your machine (you need a keychain profile), and then run:\n\n```\n$ codesign -s \"Developer ID Application: Your Name (1234567890)\" libtbloader.macos.universal.dylib --timestamp\n$ zip archive.zip libtbloader.macos.universal.dylib\n$ xcrun notarytool submit --keychain-profile \"Profile Name\" --wait archive.zip\n```\n\n# Credits\n* [Qodot](https://github.com/QodotPlugin/qodot-plugin)\n* [Original libmap](https://github.com/QodotPlugin/libmap)\n* [EIRTeam libmap-cpp](https://github.com/EIRTeam/qodot/tree/4.0) (modified)\n","funding_links":["https://patreon.com/openplanet"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecat%2Fgodot-tbloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecat%2Fgodot-tbloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecat%2Fgodot-tbloader/lists"}