2022-10-03 00:10:54 +00:00
# Building
2023-03-22 07:22:47 +00:00
## Preface
2024-06-22 07:24:13 +00:00
If you don't plan on modifying the engine, then you can grab binaries
from [FTEQW ](https://www.fteqw.org ) and move them into the root
directory.
2022-10-19 23:20:09 +00:00
## Dependencies
2024-06-22 07:24:13 +00:00
Nuclide is entirely game-logic oriented, so it only requires a working
QuakeC compiler. In our case [FTEQCC ](https://www.fteqcc.org/ ). Which
you can also build with:
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
$ make fteqcc
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
The resulting binary `./fteqcc` will then be used to build the
game-logic related targets.
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
Besides a working **C** compiler, such as `gcc` or `clang` , the QuakeC compiler shouldn't need any other dependencies. [Click here for a full list of dependencies for the various optional components. ](Documentation/Dependencies.md )
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
> [!tip]
> `make help` will always show a list of available targets, including their purpose.
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
## Keeping Up-To-Date
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
You can issue the following to check for updates of tools/dependencies:
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
$ make update
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
## Building Game-Logic {#build-game}
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
You can build games by running the following command:
2023-01-15 22:41:11 +00:00
```
2024-06-22 07:24:13 +00:00
$ make game GAME=base
2023-01-15 22:41:11 +00:00
```
2024-06-22 07:24:13 +00:00
Adjust the **GAME** argument to select which game you want to
build. The game `base` is the assumed, default target.
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
Usually, the resulting files are `progs.dat` , `csprogs.dat` and
(sometimes) `menu.dat` . Those are the libraries dealing with the
**Server**, **Client** and **Menu** aspect of the game respectively.
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
They are accompanied by name-matching `.lno` files. These contain
extra debugging information helpful to the engine. *They can be
stripped from a shipping build of your game.*
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
> [!tip]
> You do not need to rebuild the logic for each and every platform.
> The results will be identical, since QuakeC is not machine code.
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
## Building the Engine {#build-engine}
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
Issue the following to build a generic version of the engine [FTEQW ](https://www.fteqw.org/ ):
2023-01-15 22:41:11 +00:00
```
2024-06-22 07:24:13 +00:00
$ make fteqw
2023-01-15 22:41:11 +00:00
```
2024-06-22 07:24:13 +00:00
Which you can then run with `./fteqw -game base` . [For more information on launching games, mods, check out the page on Launching ](Documentation/Launching.md ).
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
Some engine features are only available as a plugin. See `$ make help` for info on how to build them.
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
### Optional: Custom Branding & Features
2023-01-15 22:41:11 +00:00
2024-06-22 07:24:13 +00:00
If you want to build a custom version of the engine,
with custom branding and the ability to strip unneeded
functionality out of the binary, you can make a copy of
`ThirdParty/fteqw/engine/common/config_fteqw.h` , adjust it and save
it under your game directory as `engine.h` . When issuing the command:
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
$ make engine GAME=yourgame
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
It will then look for `yourgame/engine.h` , and build a copy of FTEQW
against it. The output will normally be something along the lines of
`yourgame_x64` . The name can be changed by passing `NAME=YourGame`
to the make program.
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
## Building the Level Editor {#build-editor}
2022-10-19 23:20:09 +00:00
2024-06-22 07:24:13 +00:00
Issue the following to build [GtkRadiant ](https://icculus.org/gtkradiant ):
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
$ make radiant
2022-10-19 23:20:09 +00:00
```
2024-06-22 07:24:13 +00:00
A launcher will be created in the root directory allowing you to launch it via `./radiant` .
2023-12-13 23:58:13 +00:00
2024-06-22 07:24:13 +00:00
For documentation regarding Radiant and general id Tech level design, [you can visit this page ](https://icculus.org/gtkradiant/documentation.html ).