2024-12-05 03:04:56 +00:00
# Building {#building}
2022-10-03 00:10:54 +00:00
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
2024-12-05 03:04:56 +00:00
from [FTE's website ](https://www.fteqw.org ) and move the binaries for your platform into the root
directory of Nuclide.
2022-10-19 23:20:09 +00:00
## Dependencies
2024-12-05 03:04:56 +00:00
![](application_osx_terminal.png) Nuclide is entirely game-logic oriented, so it only requires a working
2024-06-22 07:24:13 +00:00
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-12-05 03:04:56 +00:00
@note `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-12-05 03:04:56 +00:00
@note 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-12-05 03:04:56 +00:00
Issue the following to build a generic, non-branded version of the engine [FTE ](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-12-05 03:04:56 +00:00
Which you can then use to run 'Test Game' 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-12-05 03:04:56 +00:00
@note Some engine features are only available as a plugin. See the section on plugins for details.
2023-01-15 22:41:11 +00:00
2024-12-05 03:04:56 +00:00
### Building a Branded Build {#build-branded}
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
2024-12-05 03:04:56 +00:00
`yourgame_x64` .
2022-10-19 23:20:09 +00:00
2024-12-05 03:04:56 +00:00
@note The name can be changed by passing **NAME=YourGame** to the `make` program, or by placing a file named `PROJECT` in your game directory with a short name on the first line.
### Building plugins {#build-plugins}
You can build plugins for your game by specifying **NATIVE_PLUGINS** as an argument to the `make` command, like so:
```
make plugins GAME=base NATIVE_PLUGINS="ode ffmpeg"
```
2022-10-19 23:20:09 +00:00
2024-12-05 03:04:56 +00:00
However, once you've settled on a set of plugins for your game, you can list the contents of the **NATIVE_PLUGINS** string in a file named `PLUGINS` in your game directory.
@note For generic builds of **FTE** you can use the target **fteqw-plugins** instead of **plugins** . You shouldn't specify a **GAME** argument however.
## Building a dedicated server build {#build-dedicated}
![](server.png) If you want a minimal, dedicated server binary for your game that doesn't include all the code related to being a client, you can issue:
2022-10-19 23:20:09 +00:00
```
2024-12-05 03:04:56 +00:00
make dedicated GAME=yourgame
2022-10-19 23:20:09 +00:00
```
2024-12-05 03:04:56 +00:00
And it will, much like a branded build, compile a dedicated binary specific to your game configuration.
## Building the Level Editor {#build-editor}
2023-12-13 23:58:13 +00:00
2024-12-05 03:04:56 +00:00
![](map_edit.png) See [the page dedicated to level editing ](@ref radiant ) for more information.