• Stars
    star
    236
  • Rank 170,480 (Top 4 %)
  • Language
    C++
  • License
    MIT License
  • Created over 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TrenchBroom Loader for Godot 4. (Alternative to Qodot)

TrenchBroom Loader for Godot

Made as an alternative to Qodot, using much of the same map parsing code using the original libmap and a modified C++ port of it.

Why not Qodot?

Qodot is great! It works really well. I initially made TBLoader because I wanted to try several different approaches to creating meshes, including creating a bunch of CSGMesh3D inside of CSGCombiner3D, but that ended up being problematic.

When I originally made this, Qodot didn't officially support Godot 4. So I decided to take on the challenge and rewrite most of it in godot-cpp mostly for fun. Nowadays, Qodot has a .Net version available which does support Godot 4: https://github.com/QodotPlugin/Qodot

If you're already using Qodot, there might not be a lot of reasons for you to use this. It is not backwards compatible with Qodot, and does a few things differently.

Usage

To install TBLoader, you can either install it through AssetLib (search for "TrenchBroom Loader"), or by downloading a release from Github and extracting it to your project's addons folder, so that you have a structure like this:

project/addons/tbloader/plugin.cfg

You might have to manually enable the plugin from your project settings. In the Godot editor, click on Project -> Project Settings, and go to the Addons tab. Check the "Enable" box next to TBLoader.

To build a level's geometry, create a TBLoader node in your scene hierarchy. In the properties of the node you can select where your .map file is located, plus some more useful settings. With the node still selected and the 3D view open, you will see a button Build Meshes in the toolbar the 3D view. Click that button to build the geometry.

TrenchBroom game config

The tb-gameconfig folder contains a game configuration for this addon. This includes a simple FGD which will have some common entities that create Godot nodes. Simply place the files in a folder called Godot inside the games folder of your TrenchBroom installation, so you would have games/Godot/<files>.

Entities

The following brush entities are supported by default:

  • worldspawn and func_group: Mesh instances and collision shapes
  • area: Area3D

The following point entities are supported by default:

Custom entities

You can make custom entities as well. This works by loading and instantiating a PackedScene object based on the class name. For example, the class name foo_bar_foobar will try to load one of the following in this order:

  • res://entities/foo_bar_foobar.tscn
  • res://entities/foo/bar_foobar.tscn
  • res://entities/foo/bar/foobar.tscn

The first resource it finds will be loaded and instantiated. The root for this (res://entities by default) can be changed in the TBLoader node properties.

Any properties set on the entity will be set directly on the instantiated node using _set and _get. The getter is used first to determine the type of the property.

Textures

To see your textures in TrenchBroom, navigate to Preferences -> Godot -> 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.

Note: This currently only works with textures in .png format, and materials in .material or .tres.

Building

On all platforms, the build process is the same. Make sure scons is installed, and then just run scons target=template_release to build.

On Mac, the process is the same, but you will have to codesign and notarize your resulting binary as well if you want it to run on consumer hardware. To do this, you need to already have the notary tool configured on your machine (you need a keychain profile), and then run:

$ codesign -s "Developer ID Application: Your Name (1234567890)" libtbloader.macos.universal.dylib --timestamp
$ zip archive.zip libtbloader.macos.universal.dylib
$ xcrun notarytool submit --keychain-profile "Profile Name" --wait archive.zip

Credits

More Repositories

1

ClawSearch

A memory scanner plugin for x64dbg, inspired by Cheat Engine.
C
271
star
2

qb

Zero-configuration build system to very quickly build C/C++ projects.
Go
208
star
3

catsight

Cross-platform process memory inspector
C++
168
star
4

angelscript-mirror

Unofficial mirror for Angelscript's SVN repository, updated hourly.
C++
152
star
5

tm-dashboard

Dashboard for Trackmania displaying a bunch of vehicle information on screen.
AngelScript
50
star
6

ccpp

ccpp, a general purpose single-header preprocessor library.
C++
44
star
7

asdbg

A remote debugger for AngelScript.
C++
42
star
8

BinFind

Perform regex pattern matching on binary data. (Regex-like)
C++
35
star
9

go-enet

Enet bindings for Go using cgo.
C
34
star
10

dmzblack-96dpi

🐭 DMZ-Black with only the 96 DPI images. To force size 24 cursor on some Linux machines with high resolution monitors, especially on XFCE.
Shell
32
star
11

enet-p2p

Example for ENet on how to connect 2 peers to each other that are both behind a NAT using NAT hole punching.
C++
27
star
12

scratch2

Single-header base C++ classes.
C++
27
star
13

reddit-radio

Discord bot for /r/hardstyle
JavaScript
26
star
14

tm-better-chat

A better chat for Trackmania using Openplanet.
AngelScript
21
star
15

OpenSMO

πŸ‘― Open Stepmania Online Server
C#
21
star
16

angel

LΓ–VE, but with AngelScript instead of Lua.
C++
13
star
17

hoh-trainer

Trainer mod for Heroes of Hammerwatch, which can also be extended upon by other mods.
AngelScript
12
star
18

OpenAdvanceWars

πŸ”« Open source clone of Advance Wars 2.
C++
11
star
19

Nin

Tiny PHP framework based on some of the core ideas of Yii 1 and 2. (Nin means "No It's Not")
PHP
10
star
20

loveman

Project manager for LΓ–VE and LΓ–VR.
C#
10
star
21

SHVDNPro

Fork of crosire's ScriptHookVDotNet with major optimization fixes.
C#
10
star
22

ClipUpload

Old application to upload images and other files to certain places on the internet.
C#
8
star
23

Chatzilla-Plugins

πŸ’¬ My Chatzilla plugins
JavaScript
8
star
24

mrag2

A Monogame helper library for graphics, content, and animation.
C#
8
star
25

maniaplanet-history

Keeping track of ManiaPlanet 4 updates.
C++
7
star
26

libflp

Library for parsing FL Studio .flp files.
C++
7
star
27

Scratch

🎩 Scratch, a general-purpose header-only core classes library for C++.
C++
7
star
28

unet

Unified Lobby Networking library in C++, providing cross-play between Steam lobbies, Gog Galaxy lobbies, and Enet sockets.
C++
7
star
29

ngui

Structured GUI framework for Love2D written in pure Lua.
Lua
6
star
30

logcrash-decoder

Decoder for Nadeo's LogCrash files generated by Trackmania and Maniaplanet.
Go
5
star
31

singleheader-socket

EzSock.h - single header cross-platform Socket wrapper class for C++.
C++
5
star
32

gonadeo

Go library to authenticate and communicate with Nadeo's live services.
Go
5
star
33

disco

Disposable development containers
Go
5
star
34

irl-phone

iOS app to control the irl-server app on Raspberry Pi
HTML
4
star
35

led-passive

Passive scriptable LED server for Raspberry Pi
C++
4
star
36

maniafix

Fixes an issue in ManiaPlanet 3 and TrackMania United Forever by patching the game in-memory. (Not for ManiaPlanet 4!)
C++
4
star
37

tmgl-viewer

Openplanet plugin to show Trackmania Grand League match status.
AngelScript
4
star
38

a.js

🌎 My Javascript library
JavaScript
3
star
39

irl-server

IRL livestreaming server for Raspberry Pi
Go
3
star
40

anchor-foundation

Dark Foundation theme for Anchor CMS.
PHP
3
star
41

MragPP

πŸ‘Ύ Mrag++ is a C++ library for game development in SDL2. Its structure is loosely based on the concept of XNA (or Monogame).
C++
3
star
42

tm-http-inspect

Openplanet plugin to inspect HTTP requests within Trackmania.
AngelScript
3
star
43

p9

Yet another 9patch library for Love2D.
Lua
3
star
44

Coral

🎲 Coral Engine
C#
2
star
45

edna-run

The Chrome dino game, but set in the Kitboga universe.
JavaScript
2
star
46

steam-utils

Command line Steam utilities for debugging.
C++
2
star
47

mpman

Maniaplanet server manager for Nimz servers.
Go
2
star
48

ssbd-payload

Payload gamemode for Serious Sam's Bogus Detour.
AngelScript
2
star
49

nimania

Maniaplanet server controller written in C#.
C#
2
star
50

CosmicWin

πŸ“Ί Makes YouTube homepage usable.
JavaScript
2
star
51

apache-angelscript

Angelscript module for the Apache webserver.
C++
2
star
52

screen-boundaries

Nimble Screen Boundaries teleports your mouse across multiple monitors when moved into a non-monitor area.
C#
2
star
53

beamngts

Typescript declarations for the BeamNG Lua environment.
Lua
2
star
54

nano

πŸ“ My Nano fork, also referred to as Cato.
C
2
star
55

tm-editor-trails

Playtest trails in the Trackmania editor with playback controls.
AngelScript
2
star
56

ServerGUIHD

πŸ“¦ Serious Sam HD: The Second Encounter dedicated server runner
Visual Basic
2
star
57

angelog.github.com

HTML
1
star
58

op-style-manager

Openplanet plugin to easily install and create custom Openplanet overlay styles.
AngelScript
1
star
59

vst3-premake

Quick example of building a VST3 plugin using Premake5 or GENie.
Lua
1
star
60

Rockets-Forever

πŸš€ Server mod for Serious Sam Classic: The Second Encounter (1.07)
C++
1
star
61

kana

Little site for learning Hiragana and Katakana. γ‚«γƒŠγƒˆγƒ¬γƒΌγƒŠγƒΌ
JavaScript
1
star
62

defqon-timetable

Timetable generator for Defqon. Made for 2019, 2022, 2023.
C#
1
star
63

apache-vhosts

Easy macros for making VirtualHosts in Apache configs.
1
star
64

termbox-powerline

Powerline-style rendering with Termbox.
C
1
star
65

hoh-pets

Pets mod for Heroes of Hammerwatch. Development is streamed live on Twitch.
AngelScript
1
star
66

kimsufi-watcher

⌚ Monitor Kimsufi server availability on a secondary monitor, with bright flashing colors once your desired server becomes available.
C#
1
star
67

xipgen

Generate short xip.io, nip.io, and sslip.io links.
Go
1
star
68

mixxx-gemini-gmx

Gemini GMX mapping and scripts for Mixxx.
JavaScript
1
star
69

TweetDeckSucks

🐦 TweetDeck sucks. So I made my own client called TweetDeck Sucks, based on the original TweetDeck Air client, which Twitter is no longer supporting.
C#
1
star