Nuclide
Software Development Kit for id Technology
|
You clone the Nuclide git repository first. There's multiple places to get it, one such place may be code.idtech.space:
git clone https://code.idtech.space/vera/nuclide
You can then update the git repository as you normally would. Using git pull
, or the built-in make update
which will additionally update third-party repos and - when specified - a game directory.
If you need to build engine binaries, you can get started on building the engine and the rest of the toolchain now.
Alternatively, you can also move in the official FTE binaries into the Nuclide directory to get started without bootstrapping your own engine + QuakeC compiler.
Once you've built your engine binary or grabbed an existing compile from FTE its website, you should proceed building the game-logic.
You can then run the client and you should see the game window open right away.
In Nuclide, the main design goal is to have Objects included that do most of the work for you. You then use external, plain text files (referred to as 'decl') to fine-tune the various aspects of them. Just because you need a dedicated spawn point entity for a fearful enemy doesn't mean you have to recompile the source code. You can simply make a decl that declares itself to be a spawnpoint with a given classname.
You can read up on decls in these docs to find out how you can take advantage of them.
The engine comes equipped with several commands useful for debugging. Nuclide also contains some commands of its own that aim to make your work easier. Let's go over some important ones.
The console is the main interface to debugging the game. So one needs to learn how to invoke it. It can be opened by pressing Shift + Escape on your keyboard.
From here on you can find out the version of your engine by typing version
and pressing ENTER:
Which may be useful in determining which engine version you are using, in case you need to file bug reports with the engine. Make sure to attach a copy of your engine build config if you happen to use one.
Some other useful commands are condump logfile.txt
, find
, clear
and quit
. The console has support for search and auto-completion so take advantage of it to save time! You can also use the scroll wheel on your mouse or trackball, as well as the Page Up, Page Down, Control + Home and Control + End keys on your keyboard.
You can set watchpoints using watchpoint_ssqc
and watchpoint_csqc
for Server-Side QuakeC and Client-Side QuakeC respectively. To set a watchpoint on an entity its field, like the 1st player in a singleplayer game, you could do this to track their health:
r_showfields 1
, or the output in the console when g_logLevel
is set to 3
. There are some more commands listed below that will help you identify entity numbers.Much like with watchpoints, we can view entity fields as well as manipulate them right from the console.
Will set the 1st player's health to 42
. If you do not assign a value it'll instead print out the field its current value.
You can list the entity data, specific to the level you are on, like so:
And the output will look a lot like:
Much like with watchpoint and poke commands, you need to specify which entity id you want to query. That is the only unique identifier every entity has.
In your levels you may want to debug some of the map-logic in isolation. You can get a list of all available named entities set up to trigger events like so:
The output will look a lot like this:
Output format consists of [entity-id]: targetname (classname)
. You can then use this information to send messages directly to any of them.
You can send a simple trigger impulse to any named entity:
And it will respond as if it was triggered naturally.
Sometimes, you may also want to trigger a specific input on an entity, which can be done with the input
command like this:
Where the syntax is input [entity-id] [input name] [data string]
.
By default, most logging in the console is limited to errors and warnings. They are colored red and yellow in the output respectively.
You can output additional information, which will be useful during object development by setting g_logLevel
to the value of 3
. You will then see additional messages appear when entities receive signals, or run complicated logic and states of success.