<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Duzenko</id>
	<title>The DarkMod Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Duzenko"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Special:Contributions/Duzenko"/>
	<updated>2026-04-18T13:42:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Windows&amp;diff=28661</id>
		<title>DarkRadiant - Compiling in Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Windows&amp;diff=28661"/>
		<updated>2021-09-26T05:50:17Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To compile the sources in Windows you will need &#039;&#039;&#039;Visual Studio 2019 Community Edition&#039;&#039;&#039; or higher. The Community Edition can be acquired for free and is able to produce both 32 Bit and 64 Bit builds. &lt;br /&gt;
&lt;br /&gt;
You will need a Git client to clone the sources to your machine and install the Windows dependencies package. Then you&#039;re set up to compile DarkRadiant in Visual Studio.&lt;br /&gt;
&lt;br /&gt;
= Install a Git Client =&lt;br /&gt;
The main codebase is stored and maintained on github, therefore you&#039;ll need a Git client like&lt;br /&gt;
* [http://windows.github.com/ &#039;&#039;&#039;Github Desktop&#039;&#039;&#039;]&lt;br /&gt;
* [http://code.google.com/p/msysgit/downloads/list?q=full+installer+official+git &#039;&#039;&#039;TortoiseGit&#039;&#039;&#039;] &lt;br /&gt;
* [https://www.sourcetreeapp.com/ &#039;&#039;&#039;Sourcetree&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Download and install the git client into any folder of your preference. After installation it might ask to reboot your machine, as Tortoise integrates into the Explorer shell.&lt;br /&gt;
&lt;br /&gt;
= Download Sources and Dependencies = &lt;br /&gt;
&lt;br /&gt;
== Using Github Desktop ==&lt;br /&gt;
Create your github-login, configure github desktop as desired, especially the default clone path in the options dialog. Browse to the [https://github.com/codereader/DarkRadiant github page of DarkRadiant] and click on &#039;&#039;&#039;Clone in Windows&#039;&#039;&#039;. That&#039;s it!&lt;br /&gt;
&lt;br /&gt;
== Using TortoiseGit ==&lt;br /&gt;
To prepare the source download, open Windows Explorer and create the folder you want to clone (i.e. download) the sources into. Make sure the folder does not contain spaces. Use your Git client to clone the DarkRadiant repository from github:&lt;br /&gt;
&lt;br /&gt;
Make sure the &#039;&#039;&#039;recursive&#039;&#039;&#039; flag is checked in the dialog.&lt;br /&gt;
&lt;br /&gt;
[[Image:dr git clone.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Cloning takes a minute or two - after the process is finished your folder should be looking like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Dr_bare_repo.png|200px]]&lt;br /&gt;
&lt;br /&gt;
= Compile =&lt;br /&gt;
Start Visual Studio and open the DarkRadiant solution file (.sln) which is ready for you in the &amp;lt;tt&amp;gt;tools/msvc&amp;lt;/tt&amp;gt; folder. &lt;br /&gt;
&lt;br /&gt;
To build a package for the x64 target, make sure to select the &#039;&#039;x64&#039;&#039; platform from the configuration manager&#039;s dropdown box (located in Visual Studio&#039;s toolbar). If you prefer a 32 bit build, select the Win32 target. &lt;br /&gt;
&lt;br /&gt;
Select &#039;&#039;release&#039;&#039; build (unless you want to debug a problem) and hit Ctrl-Shift-B in VC++ to start building the sources or select &amp;quot;Build &amp;gt; Build Solution&amp;quot; from the menus.&lt;br /&gt;
&lt;br /&gt;
{{important|headline=Note|text=If you cloned the sources to &amp;lt;tt&amp;gt;C:\Games\DarkRadiant&amp;lt;/tt&amp;gt;, the application binary will be placed in &amp;lt;tt&amp;gt;C:\Games\DarkRadiant\install\DarkRadiant.exe&amp;lt;/tt&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The project output files are set up in a way to automatically install the binaries in the &amp;lt;tt&amp;gt;install/&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;install/modules/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;install/plugins/&amp;lt;/tt&amp;gt; folders. Also, all dependencies from the w32deps/ folder (see previous section) are automatically copied to the install/ folder during the post-build event. If anything goes wrong during compilation, please seek help in the [http://forums.thedarkmod.com/forum/51-darkradiant-feedback-and-development/ forums].&lt;br /&gt;
&lt;br /&gt;
The build expects the w32deps folder to be located alongside the sources, especially x64 builds expect the w64deps folder to be sitting next to it. This should happen automatically the first time a build is started. See below for how to set up the folders in case that step went wrong.&lt;br /&gt;
&lt;br /&gt;
== Manual Download of the Dependencies Package ==&lt;br /&gt;
For Windows builds additional dependencies are automatically downloaded and copied into the source tree by the build steps in Visual Studio. If this fails for any reason, you&#039;ll have to download and extract the package yourself, either by executing the script in&lt;br /&gt;
&lt;br /&gt;
 tools/scripts/download_windeps.ps1&lt;br /&gt;
&lt;br /&gt;
or by downloading the 7-zipped packages from the following URL (you can [http://www.7-zip.org get 7-zip here]):&lt;br /&gt;
&lt;br /&gt;
 https://github.com/codereader/DarkRadiant_WinDeps/releases/latest&lt;br /&gt;
&lt;br /&gt;
Download and extract it directly to the directory you cloned the sources to. The resulting folder structure should look like this. &lt;br /&gt;
&lt;br /&gt;
[[Image:Dr_windeps_repo.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; The w32deps/ and w64deps/ folder must be in the same folder as the radiant/ or include/ folder.&lt;br /&gt;
&lt;br /&gt;
= (Optional) Compiling the Windows Dependencies =&lt;br /&gt;
This step is optional and more advanced. You won&#039;t need to do this if you just want to compile and run DarkRadiant using the currently maintained version of Visual Studio.&lt;br /&gt;
&lt;br /&gt;
Note: in the past DarkRadiant was linking against a few boost libraries requiring static libraries, this is no longer the case since August 2017.&lt;br /&gt;
&lt;br /&gt;
== Compile the support libraries ==&lt;br /&gt;
DarkRadiant is using a lot of third-party libraries like libxml2, libiconv, vorbis, etc.&lt;br /&gt;
&lt;br /&gt;
For Windows I set up custom VC++ solutions to compile most of the libraries directly from the source (as many of those third-party projects don&#039;t offer Windows x64 binaries), these projects can be found in the &amp;lt;tt&amp;gt;winbuild&amp;lt;/tt&amp;gt; folder in Git. The winbuild folder contains all the sources needed to build the Win32/Win64 dependency binaries. Note that the headers are stored in w32deps, as the main DarkRadiant project needs them there, so w32deps is the place to look for most of the shared headers.&lt;br /&gt;
&lt;br /&gt;
The VC++ project files can be found in the winbuild/msvc folder. To check out the repo, go ahead like this:&lt;br /&gt;
&lt;br /&gt;
# Right-click your C:\Games folder &amp;gt;&amp;gt; Git Clone...&lt;br /&gt;
# Select https://github.com/codereader/DarkRadiant_WinDeps.git to C:\Games\DarkRadiant_WinDeps&lt;br /&gt;
&lt;br /&gt;
or by using the git command line&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/codereader/DarkRadiant_WinDeps.git C:\Games\DarkRadiant_WinDeps&lt;br /&gt;
&lt;br /&gt;
== Program Database Files (.pdb) ==&lt;br /&gt;
When debugging a DarkRadiant crashdump, you&#039;ll need the program database files to get substantial information out of it, so it&#039;s vital to save the .pdb files right after compilation, otherwise they won&#039;t match against the signatures in the crashdump.&lt;br /&gt;
&lt;br /&gt;
As far as the windeps dependencies are concerned, I&#039;ve zipped up all the .pdb files and stored them on the GitHub release page:&lt;br /&gt;
&lt;br /&gt;
* VC++ 2019: https://github.com/codereader/DarkRadiant_WinDeps/releases/latest (look for windeps.pdbs.7z)&lt;br /&gt;
&lt;br /&gt;
== See also / Links ==&lt;br /&gt;
* [[DarkRadiant - Compilation Guide]]&lt;br /&gt;
* [https://visualstudio.microsoft.com/downloads/ Visual Studio 2019 Community Edition]&lt;br /&gt;
* [[Save a Memory Dump for debugging Crashes|Information about recording crash dumps]]&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;br /&gt;
{{darkradiant|sort=Compilation}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=LOD&amp;diff=28604</id>
		<title>LOD</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=LOD&amp;diff=28604"/>
		<updated>2021-08-07T08:47:34Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A &#039;&#039;&#039;Level of Detail&#039;&#039;&#039; (LOD) system can be used to bring more details to the screen while still speeding up rendering. See [http://en.wikipedia.org/wiki/Level_of_detail Wikipedia] for an introduction.&lt;br /&gt;
&lt;br /&gt;
== The new LOD System - Overview ==&lt;br /&gt;
&lt;br /&gt;
[[Image:TheDarkMod LOD System Overview.png]]&lt;br /&gt;
&lt;br /&gt;
SVG version of the above graphic [http://bloodgate.com/mirrors/tdm/TheDarkMod_LOD_System.svg here].&lt;br /&gt;
&lt;br /&gt;
{{infobox|Note: Fade in and fade out &#039;&#039;&#039;only&#039;&#039;&#039; work via &#039;&#039;[[alpha-fading]]&#039;&#039;, so on materials that use an alpha blend and don&#039;t respond to lighting.|bg=#f09090|fg=yellow}}&lt;br /&gt;
&lt;br /&gt;
== How to use LOD in your TDM map ==&lt;br /&gt;
&lt;br /&gt;
To enable the LOD system, use either one of the pre-made LOD-enabled entities in your map (most of these are defined in &#039;&#039;&#039;def/tdm_lod.def&#039;&#039;&#039;) or set &#039;&#039;&#039;dist_check_period&#039;&#039;&#039; to a number greater than 0.&lt;br /&gt;
&lt;br /&gt;
Note: The &#039;&#039;&#039;dist_check_period&#039;&#039;&#039; spawnarg needs to be combined with one of &amp;quot;hide_distance&amp;quot; or &amp;quot;lod_X_distance&amp;quot; and &amp;quot;model_lod_X&amp;quot;, &amp;quot;skin_lod_X&amp;quot; or &amp;quot;noshadows_lod_X&amp;quot; to have any effect!&lt;br /&gt;
&lt;br /&gt;
2.10: Requirement have been relaxed. E.g. for shadow LOD you will now only need two spawnarg&#039;s:  lod_1_distance and noshadows_lod_1.&lt;br /&gt;
&lt;br /&gt;
See also &#039;&#039;&#039;[[LOD Bias]]&#039;&#039;&#039; for how to hide individual entities depending on the menu setting.&lt;br /&gt;
 &lt;br /&gt;
== GUI Setting ==&lt;br /&gt;
&lt;br /&gt;
There is a new GUI setting, called [[Object detail| &#039;&#039;&#039;Object detail&#039;&#039;&#039; ]]. You&#039;ll find it under &amp;lt;tt&amp;gt;&#039;&#039;&#039;Settings - Video - Advanced&#039;&#039;&#039;&amp;lt;/tt&amp;gt;. It consist of multiple levels, where &#039;&#039;&#039;Normal&#039;&#039;&#039; is the default. Lower settings cause the LOD distances to shrink, meaning entities switch sooner to the low-quality version and vanish sooner. Higher settings are the opposite, increasing the quality, but may be decreasing the FPS.&lt;br /&gt;
&lt;br /&gt;
Mappers should design and test their map with the &#039;&#039;&#039;Normal&#039;&#039;&#039; setting on a typical modern PC (e.g. not too old and not high-end gaming rig either), and preferable also test on some slower and faster machines.&lt;br /&gt;
&lt;br /&gt;
== Entities ==&lt;br /&gt;
&lt;br /&gt;
Supported entity types:&lt;br /&gt;
* Models that don&#039;t move (i.e. func static models)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From TDM version 2.03:&#039;&#039;&lt;br /&gt;
* Animated models like waving flags and laundry (i.e. anything with spawnclass idAnimated)&lt;br /&gt;
* AI&lt;br /&gt;
* Animated attachments to AI&lt;br /&gt;
&lt;br /&gt;
=== Example entities ===&lt;br /&gt;
&lt;br /&gt;
* atdm:nature_pine_skeleton (just the tree trunk)&lt;br /&gt;
* atdm:nature_pine (Pine + particle leaves slowly swaying)&lt;br /&gt;
* atdm:nature_tree_stump&lt;br /&gt;
&lt;br /&gt;
More can be found in the &amp;quot;Nature&amp;quot; folder with the DarkRadiant &amp;quot;Create entity&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
== Spawnargs ==&lt;br /&gt;
&lt;br /&gt;
=== min_lod_bias/max_lod_bias ===&lt;br /&gt;
&lt;br /&gt;
See [[LOD Bias]] for how to hide individual entities depending on the menu setting.&lt;br /&gt;
&lt;br /&gt;
=== hide_distance ===&lt;br /&gt;
&lt;br /&gt;
In D3 units. When set to a value &amp;gt; 0, then the entity will be hidden if it is further away than this distance from the player.&lt;br /&gt;
&lt;br /&gt;
Note: This might cause &amp;quot;popping&amp;quot;, e.g. the entity will suddenly vanish or appear. See &#039;&#039;&#039;lod_fadeout_range&#039;&#039;&#039; for how to avoid this.&lt;br /&gt;
&lt;br /&gt;
The actual value used from this spawnarg is modified by the menu setting &amp;quot;Object detail&amp;quot;, so make to sure to test with this setting at &amp;quot;Normal&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== lod_normal_distance ===&lt;br /&gt;
&lt;br /&gt;
From TDM v1.05 onwards: This spawnarg defines a &#039;&#039;&#039;minimum&#039;&#039;&#039; distance from the player where the entity will ignore settings lower than &#039;&#039;&#039;Normal&#039;&#039;&#039;. This can be used to enforce a certain minimum distance so that players who set the detail level to &#039;&#039;&#039;Low&#039;&#039;&#039; or &#039;&#039;&#039;Lowest&#039;&#039;&#039; still do not experience entities popping in and out when being very close.&lt;br /&gt;
&lt;br /&gt;
If this spawnarg is not set, it defaults to &#039;&#039;&#039;500 units&#039;&#039;&#039;. Avoid setting this spawnarg too high or even equal or higher than &amp;quot;hide_distance&amp;quot;. This would only result in the menu setting &amp;quot;Object detail&amp;quot; being fixed at &amp;quot;Normal&amp;quot;, e.g. players could never lower the quality settings to achive better frame rates. Do so only in rare cases where important entities would otherwise vanish in front of the eyes of the player.&lt;br /&gt;
&lt;br /&gt;
=== lod_hide_probability ===&lt;br /&gt;
&lt;br /&gt;
If &#039;&#039;&#039;lod_hide_distance&#039;&#039;&#039; is true, this spawnarg controls what the probabiliy of this entity vanishing is. Values range from 0.0 (will never vanish) to 1.0 (will certainly vanish). Whether a particular entity vanishes is computed at map start, so an entity either stays or vanishes, but does not change during the map play time.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;lod_hide_probability&amp;quot; &amp;quot;0.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you place X identical entities, about 20% of them will vanish at the &#039;&#039;&#039;hide_distance&#039;&#039;&#039; and 80% will stay.&lt;br /&gt;
&lt;br /&gt;
This can be used to &amp;quot;thin out&amp;quot; forests at a distance without having them vanish completely.&lt;br /&gt;
&lt;br /&gt;
=== lod_X_distance ===&lt;br /&gt;
&lt;br /&gt;
In D3 units. Sets the distance from where on LOD X is used. Will be valid until the next defined lod_(X+1)_distance, or infinty if there is no further LOD distance set.&lt;br /&gt;
&lt;br /&gt;
To change the appearance of the entity inside this LOD, use the following spawnargs with a matching X:&lt;br /&gt;
&lt;br /&gt;
==== model_lod_X ====&lt;br /&gt;
&lt;br /&gt;
Set the model the entity displays inside this LOD. If not set, uses the model from LOD 0 e.g. the one from the &amp;quot;model&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;From TDM version 2.03:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A special value &amp;quot;be_still&amp;quot; is supported for animated models. Setting model_lod_X to &amp;quot;be_still&amp;quot; for a LOD level means: stop the animation but don&#039;t switch model.&lt;br /&gt;
&lt;br /&gt;
==== skin_lod_X ====&lt;br /&gt;
&lt;br /&gt;
Set the skin the entity displays uses this LOD. If not set, uses the skin from LOD 0 e.g. the one from the &amp;quot;skin&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
==== noshadows_lod_X ====&lt;br /&gt;
&lt;br /&gt;
Boolean. If set, the entity casts no shadows while in this LOD zone.&lt;br /&gt;
&lt;br /&gt;
==== offset_lod_X ====&lt;br /&gt;
Vector. Origin offset that can be applied to the replacement model if it doesn&#039;t naturally line up with the original.&lt;br /&gt;
&lt;br /&gt;
==== lod_fadein_range ====&lt;br /&gt;
&lt;br /&gt;
{{infobox|Note: Fade in and fade out only work via &#039;&#039;[[alpha-fading]]&#039;&#039;, so on materials that use an alpha blend and don&#039;t respond to lighting.|bg=#f09090|fg=yellow}}&lt;br /&gt;
&lt;br /&gt;
In D3 units. If set to non-zero, then the object will start hidden and begin to fade in at &#039;&#039;&#039;lod_1_distance&#039;&#039;&#039; - &#039;&#039;&#039;lod_fadein_range&#039;&#039;&#039; and be completely (100% opacity) visible at &#039;&#039;&#039;lod_1_distance&#039;&#039;&#039;. This can be used to create entities that only appear in some distance but not close up.&lt;br /&gt;
&lt;br /&gt;
==== lod_fadeout_range ====&lt;br /&gt;
&lt;br /&gt;
{{infobox|Note: Fade in and fade out only work via &#039;&#039;[[alpha-fading]]&#039;&#039;, so on materials that use an alpha blend and don&#039;t respond to lighting.|bg=#f09090|fg=yellow}}&lt;br /&gt;
&lt;br /&gt;
In D3 units. If set to non-zero, then the object will not vanish suddenly at &#039;&#039;&#039;hide_distance&#039;&#039;&#039;, but start to fade out and be completely invisible at &#039;&#039;&#039;hide_distance&#039;&#039;&#039; + &#039;&#039;&#039;lod_fadeoutrange&#039;&#039;&#039;. Defaults to 0.&lt;br /&gt;
&lt;br /&gt;
=== no_lod ===&lt;br /&gt;
:&#039;&#039;This spawnarg will be available in TDM version 2.03&#039;&#039;&lt;br /&gt;
Set &amp;quot;no_lod&amp;quot; &amp;quot;1&amp;quot; to disable LOD completely on an entity. Useful if you want to make use of a LOD entity but use a custom setup.&lt;br /&gt;
&lt;br /&gt;
== Increasing the LOD steps ==&lt;br /&gt;
&lt;br /&gt;
The number of possible LOD steps is fixed in code and defined in &#039;&#039;&#039;game/misc.h&#039;&#039;&#039; as a constant. The current&lt;br /&gt;
value is 7, meaning that there are 5 different rendering possibilities beside level 0 (the original) and level 6 (the object is hidden). That should be enough even for huge outdoor maps.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Profiling showed that 3000 thinking entities consume about 7% CPU time. So if you use only a few hundred or thousand LOD entities, the performance of the extra thinking time is very small compared to the benefits of having only a few entities actually visible around the player. &lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
At it&#039;s simplest, model, dist_check_period, hide_distance, lod_1_distance and model_lod_1 are used:&lt;br /&gt;
[[File:Lod_test2.png|thumb|right|click for full size]]&lt;br /&gt;
* &#039;&#039;&#039;model &#039;&#039;RegularModelName&#039;&#039;&#039;&#039;&#039; -- point this to the fully detailed model&lt;br /&gt;
* &#039;&#039;&#039;dist_check_period 0.5&#039;&#039;&#039; -- time in seconds between distance checks&lt;br /&gt;
* &#039;&#039;&#039;hide_distance 400&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;lod_1_distance 100&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;model_lod_1 &#039;&#039;LessDetailedModelName&#039;&#039;&#039;&#039;&#039; -- lower detail model&lt;br /&gt;
* &#039;&#039;&#039;lod_2_distance 200&#039;&#039;&#039; -- (optional further step)&lt;br /&gt;
* &#039;&#039;&#039;model_lod_2 &#039;&#039;LowerDetailModelName&#039;&#039;&#039;&#039;&#039; -- even lower detail model (optional further step)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Customizing AI models ==&lt;br /&gt;
From TDM 2.03, many of the common AI models use LOD. This is automatic. They are much more detailed than in 2.02 when seen close up, and are lower-poly when seen in the distance.&lt;br /&gt;
&lt;br /&gt;
If you want to switch an AI&#039;s model, for example to make a Builder archer from a citywatch archer by changing the model def and the vocal set and team, then you have a choice: you can change all the different model_lod_* stages to match the ones used by your target Builder; or you can change only the &amp;quot;model&amp;quot; spawnarg, which will work ok but note that LOD will be switched off for that AI. That&#039;s because you won&#039;t your Builder archer to revert to a citywatch model when distant. &lt;br /&gt;
&lt;br /&gt;
This rule was applied so that existing maps with custom models on AI woudn&#039;t get broken by the new AI LOD feature. The rules are: if the mapper overrides the &amp;quot;model&amp;quot; spawnarg but doesn&#039;t override any &amp;quot;model_lod&amp;quot; spawnargs, LOD is disabled on the entity. If the mapper overrides at least one &amp;quot;model_lod&amp;quot; spawnarg too, that shows they have it in hand so LOD remains enabled on the entity.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
Doom3 did not have any LOD system at all. The first steps of such a system were added in TDM by supporting a &#039;&#039;&#039;hide_distance&#039;&#039;&#039; spawnarg, which made entities hide or portals close once they were further away than this distance. The LOD system in TDM was totally rewritten for v1.04. &lt;br /&gt;
&lt;br /&gt;
Support for animated models and AI was added in TDM version 2.03. More details are available on the [http://bugs.thedarkmod.com/view.php?id=3770 bugtracker].&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
&lt;br /&gt;
Here we compare the new (v1.04) to the old system (until v1.02):&lt;br /&gt;
&lt;br /&gt;
* The old system had only two levels: 0 (original model), and 1 (entity is hidden)&lt;br /&gt;
* Due to a typo, all thinking for the LOD entities happened in the first half of the interval. That means if you set the intervall to 1 s, all entities did their distance check between 0 and 0.5 seconds, and none between 0.5 and 1 second and so on. This lead to fluctuating frame rates.&lt;br /&gt;
&lt;br /&gt;
The new system:&lt;br /&gt;
&lt;br /&gt;
* Supports up to 7 levels (last is &#039;&#039;hide&#039;&#039;), more can easily be done with a recompile&lt;br /&gt;
* You can use less levels if you want&lt;br /&gt;
* Thinking is distributed over the entire interval&lt;br /&gt;
* makes scenes with thousands of entities possible&lt;br /&gt;
* Can not only switch the model, but also change the skin (f.i. use less expensive glass shaders) and turn shadows off&lt;br /&gt;
* Can hide only a fraction of all entities of the same class (&#039;&#039;thinning out&#039;&#039;)&lt;br /&gt;
* Allows the player (via the settings menu) to control the quality vs. speed&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[LOD Bias]]&lt;br /&gt;
* [[Creating LOD Models]] with only Gimp/Photoshop and DarkRadiant&lt;br /&gt;
* [[List of LOD Models]]&lt;br /&gt;
* [[SEED]] - Random entity placement and distant culling&lt;br /&gt;
&lt;br /&gt;
{{editing}} {{scripting}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Texture_Guidelines&amp;diff=26313</id>
		<title>Texture Guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Texture_Guidelines&amp;diff=26313"/>
		<updated>2020-04-09T09:35:13Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: /* 2.08 update (2020) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This should be a rough guideline for choosing the correct dimensions and format for your custom TDM texture.&lt;br /&gt;
&lt;br /&gt;
== 2.08 update (2020) ==&lt;br /&gt;
The guidance is for standard tiling textures. A single large texture with a unique pattern shouldn&#039;t cause too much harm, especially if it is&lt;br /&gt;
&lt;br /&gt;
used sparingly. The other consideration is whether this &amp;quot;beautiful&amp;quot; texture matches the pixel density of other textures at natural scale.&lt;br /&gt;
&lt;br /&gt;
You may be admiring your great new texture but players will be looking at TDM textures next to it and thinking &amp;quot;why is everything except the wall&lt;br /&gt;
&lt;br /&gt;
so blurry&amp;quot;? To which the answer will not be &amp;quot;OK, we are going to increase all the texture resolutions and make the game unplayable except for&lt;br /&gt;
&lt;br /&gt;
high-end hardware from 2016+&amp;quot;. Doom 3 \ TDM is more texture heavy than many other engines since it relies on normal maps for most detail&lt;br /&gt;
&lt;br /&gt;
so you have to budget textures differently than an engine where half of the detail is baked into the diffuse because of baked lighting. The limit&lt;br /&gt;
&lt;br /&gt;
is there to act as a sane guideline. &lt;br /&gt;
&lt;br /&gt;
Forum discussion link: https://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/&amp;amp;do=findComment&amp;amp;comment=445922&lt;br /&gt;
&lt;br /&gt;
== Dimensions == &lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;max. 1024 pixels&#039;&#039;&#039; (when used for smaller areas: 512)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;max. 1024 pixels&#039;&#039;&#039;&lt;br /&gt;
* Specular: &#039;&#039;&#039;max. 512 pixels&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;max. 256 pixels&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Compression Standards ==&lt;br /&gt;
* Diffusemaps: DDS (DXT1/DXT3)&lt;br /&gt;
* Normalmap: TGA (uncompressed, no RLE)&lt;br /&gt;
* Specularmap: DDS&lt;br /&gt;
* Editor Image: JPG (medium quality (e.g. 85 in Photoshop), not over-compressed)&lt;br /&gt;
&lt;br /&gt;
* If the texture is to be included in TDM : A high res copy of the diffusemap (can be RLE)&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
Assuming your texture is named &#039;&#039;&#039;rough_grey_dirty&#039;&#039;&#039;, the names are&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;rough_grey_dirty.dds&#039;&#039;&#039;&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;rough_grey_dirty_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Specularmap: &#039;&#039;&#039;rough_grey_dirty_s.dds&#039;&#039;&#039;&lt;br /&gt;
* Editor Image: &#039;&#039;&#039;rough_grey_dirty_ed.jpg&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Nontiling textures have the &#039;&#039;&#039;_nontiling_&#039;&#039;&#039; part in their name: &#039;&#039;&#039;rough_grey_dirty_nontiling_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Textures tiling into one dimension only get the &#039;&#039;&#039;_tiling1d_&#039;&#039;&#039; part added: &#039;&#039;&#039;rough_grey_dirty_tiling1d_local.tga&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Heightmaps: &#039;&#039;&#039;rough_grey_dirty_h.tga&#039;&#039;&#039;&lt;br /&gt;
* Alphamaps: &#039;&#039;&#039;rough_grey_dirty_a.tga&#039;&#039;&#039;&lt;br /&gt;
* Occlusion maps: &#039;&#039;&#039;rough_grey_dirty_occ.tga&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Exceptions ==&lt;br /&gt;
* Skyboxes: Doom can&#039;t handle DDS for Skyboxes, so uncompressed TGA should be used here. If the dimensions of your skybox textures exceed 1024 Pixels, JPEG compression on maximum quality should be applied. (Uncompressed TGA on six 2048 x 2048 textures would result in 72 MB altogether, which is definitely too much and the high resolution will compensate the anyway negligible JPEG artifacts.)&lt;br /&gt;
&lt;br /&gt;
== Material File Conventions ==&lt;br /&gt;
See here: [[Material File Naming Convention]]&lt;br /&gt;
&lt;br /&gt;
Remember: Do keep a backup of the ultra hi-res versions of your work as well as your working files (photoshop, gimp files). These should be added to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository, which keeps all the &amp;quot;working&amp;quot; or &amp;quot;source files&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[DDS creation]]&lt;br /&gt;
* [[How to add Textures to The Dark Mod]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-textures}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Texture_Guidelines&amp;diff=26312</id>
		<title>Texture Guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Texture_Guidelines&amp;diff=26312"/>
		<updated>2020-04-09T09:35:01Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This should be a rough guideline for choosing the correct dimensions and format for your custom TDM texture.&lt;br /&gt;
&lt;br /&gt;
== 2.08 update (2020) ==&lt;br /&gt;
 The guidance is for standard tiling textures. A single large texture with a unique pattern shouldn&#039;t cause too much harm, especially if it is&lt;br /&gt;
&lt;br /&gt;
used sparingly. The other consideration is whether this &amp;quot;beautiful&amp;quot; texture matches the pixel density of other textures at natural scale.&lt;br /&gt;
&lt;br /&gt;
You may be admiring your great new texture but players will be looking at TDM textures next to it and thinking &amp;quot;why is everything except the wall&lt;br /&gt;
&lt;br /&gt;
so blurry&amp;quot;? To which the answer will not be &amp;quot;OK, we are going to increase all the texture resolutions and make the game unplayable except for&lt;br /&gt;
&lt;br /&gt;
high-end hardware from 2016+&amp;quot;. Doom 3 \ TDM is more texture heavy than many other engines since it relies on normal maps for most detail&lt;br /&gt;
&lt;br /&gt;
so you have to budget textures differently than an engine where half of the detail is baked into the diffuse because of baked lighting. The limit&lt;br /&gt;
&lt;br /&gt;
is there to act as a sane guideline. &lt;br /&gt;
&lt;br /&gt;
Forum discussion link: https://forums.thedarkmod.com/index.php?/topic/9082-newbie-darkradiant-questions/&amp;amp;do=findComment&amp;amp;comment=445922&lt;br /&gt;
&lt;br /&gt;
== Dimensions == &lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;max. 1024 pixels&#039;&#039;&#039; (when used for smaller areas: 512)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;max. 1024 pixels&#039;&#039;&#039;&lt;br /&gt;
* Specular: &#039;&#039;&#039;max. 512 pixels&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;max. 256 pixels&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Compression Standards ==&lt;br /&gt;
* Diffusemaps: DDS (DXT1/DXT3)&lt;br /&gt;
* Normalmap: TGA (uncompressed, no RLE)&lt;br /&gt;
* Specularmap: DDS&lt;br /&gt;
* Editor Image: JPG (medium quality (e.g. 85 in Photoshop), not over-compressed)&lt;br /&gt;
&lt;br /&gt;
* If the texture is to be included in TDM : A high res copy of the diffusemap (can be RLE)&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
Assuming your texture is named &#039;&#039;&#039;rough_grey_dirty&#039;&#039;&#039;, the names are&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;rough_grey_dirty.dds&#039;&#039;&#039;&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;rough_grey_dirty_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Specularmap: &#039;&#039;&#039;rough_grey_dirty_s.dds&#039;&#039;&#039;&lt;br /&gt;
* Editor Image: &#039;&#039;&#039;rough_grey_dirty_ed.jpg&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Nontiling textures have the &#039;&#039;&#039;_nontiling_&#039;&#039;&#039; part in their name: &#039;&#039;&#039;rough_grey_dirty_nontiling_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Textures tiling into one dimension only get the &#039;&#039;&#039;_tiling1d_&#039;&#039;&#039; part added: &#039;&#039;&#039;rough_grey_dirty_tiling1d_local.tga&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Heightmaps: &#039;&#039;&#039;rough_grey_dirty_h.tga&#039;&#039;&#039;&lt;br /&gt;
* Alphamaps: &#039;&#039;&#039;rough_grey_dirty_a.tga&#039;&#039;&#039;&lt;br /&gt;
* Occlusion maps: &#039;&#039;&#039;rough_grey_dirty_occ.tga&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Exceptions ==&lt;br /&gt;
* Skyboxes: Doom can&#039;t handle DDS for Skyboxes, so uncompressed TGA should be used here. If the dimensions of your skybox textures exceed 1024 Pixels, JPEG compression on maximum quality should be applied. (Uncompressed TGA on six 2048 x 2048 textures would result in 72 MB altogether, which is definitely too much and the high resolution will compensate the anyway negligible JPEG artifacts.)&lt;br /&gt;
&lt;br /&gt;
== Material File Conventions ==&lt;br /&gt;
See here: [[Material File Naming Convention]]&lt;br /&gt;
&lt;br /&gt;
Remember: Do keep a backup of the ultra hi-res versions of your work as well as your working files (photoshop, gimp files). These should be added to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository, which keeps all the &amp;quot;working&amp;quot; or &amp;quot;source files&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[DDS creation]]&lt;br /&gt;
* [[How to add Textures to The Dark Mod]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-textures}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25529</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25529"/>
		<updated>2019-09-30T14:58:17Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.07 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.07) the corresponding sources are released as well.&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
*Download as a package: http://www.thedarkmod.com/downloads/&lt;br /&gt;
*Get the latest sources directly from SVN (team account): https://svn.thedarkmod.com/svn/darkmod_src/trunk  &lt;br /&gt;
*Get the latest sources directly from SVN (public/anonymous): https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/&lt;br /&gt;
&lt;br /&gt;
Be warned though that (unless you&#039;re a team member and working on the SVN asset base) these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;. The team cannot and will not support you in case you&#039;re running into troubles trying to get it to run.&lt;br /&gt;
&lt;br /&gt;
Download the sources and unpack them next to your darkmod/ directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\Doom3\darkmod       &amp;lt;-- your darkmod location&lt;br /&gt;
 C:\Games\Doom3\darkmod_src   &amp;lt;-- your source folder containing the solution, can be renamed&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.07 you&#039;ll need Visual Studio 2017 to compile the project.&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&amp;amp;rel=15 approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow.&lt;br /&gt;
* If compiling 2.07, make sure &amp;quot;Windows XP support for C++&amp;quot; is installed too (not needed for 2.08).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file (in MSVC 2017 format) in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
Just as the original Doom 3, TDM is built using Scons build system.&lt;br /&gt;
&lt;br /&gt;
Being in the source code root directory (darkmod_src/), you can build TDM with a command like this:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; -j6 ..&lt;br /&gt;
&lt;br /&gt;
If you omit some parameters, Scons will either use the previously defined values or the default ones.&lt;br /&gt;
&lt;br /&gt;
Here is the explanation of parameters:&lt;br /&gt;
* &amp;lt;tt&amp;gt;BUILD=&amp;quot;release&amp;quot;&amp;lt;/tt&amp;gt; --- build release (i.e. optimized) executable&lt;br /&gt;
* &amp;lt;tt&amp;gt;TARGET_ARCH=&amp;quot;x64&amp;quot;&amp;lt;/tt&amp;gt; --- build for 64-bit platform (pass &amp;quot;x86&amp;quot; or &amp;quot;x32&amp;quot; for 32-bit build)&lt;br /&gt;
* &amp;lt;tt&amp;gt;-j6&amp;lt;/tt&amp;gt; --- run six instances of compiler in parallel for faster build (better specify the number of cores in your CPU)&lt;br /&gt;
* &amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt; --- put executables with debug information to ../darkmod (scons cannot access parent directory without it)&lt;br /&gt;
Run &amp;lt;tt&amp;gt;scons --help&amp;lt;/tt&amp;gt; for more information about arguments.&lt;br /&gt;
&lt;br /&gt;
Note: by default the deploy-ready executables are put into the current directory (which is source code root directory).&lt;br /&gt;
They are stripped of debug information, so you won&#039;t be able to debug them.&lt;br /&gt;
If you need debug information, make sure to specify &amp;quot;&amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt;&amp;quot; argument: then debuggable executables will be put into ../darkmod.&lt;br /&gt;
&lt;br /&gt;
Note: starting from version 2.06, fully functional 64-bit build is supported.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install scons                    //&#039;scons&#039; is currently not installed&lt;br /&gt;
  sudo apt-get install m4                       //&#039;SCons Environment&#039; object has no attribute &#039;M4&#039;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that you can run scons build with one of the commands:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..    //on 32-bit OS&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; ..    //on 64-bit OS&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run build as usual:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you have still have problems with your build, please report to forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Linux Kali&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get install build-essential manpages-dev &lt;br /&gt;
  sudo apt-get install scons    &lt;br /&gt;
  sudo apt install libx11-dev      &lt;br /&gt;
  sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
  sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
== Dead text below ==&lt;br /&gt;
&lt;br /&gt;
The remaining part of the article is most likely outdated and does not apply to version 2.06 (and later).&lt;br /&gt;
It would be probably better to simply delete it. Feel free to expand and do history digging if you like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Linux &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For Linux you&#039;ll need gcc and scons, plus a few packages depending on your distribution. There is a README.linux file contained in the source package you downloaded, check it out for some details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Debian Sqeeze 64 bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need the following packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs scons g++ g++-multilib m4 zip&lt;br /&gt;
 apt-get install libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
 apt-get install libc6-dev-i386 libxxf86vm-dev libopenal-dev libasound2-dev libxext-dev&lt;br /&gt;
&lt;br /&gt;
You must also edit &#039;&#039;&#039;sys/scons/SConscript.game&#039;&#039;&#039; and add the following lines near where &#039;&#039;local_env.Append&#039;&#039; is alread used:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append(LIBS = [&lt;br /&gt;
        File(&#039;/lib32/libpng12.so.0&#039;),&lt;br /&gt;
 ])&lt;br /&gt;
&lt;br /&gt;
Also change in the same file (a few lines above):&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng&#039; ] )&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng12&#039; ] )&lt;br /&gt;
&lt;br /&gt;
It might also be necessary to make the following symlink:&lt;br /&gt;
&lt;br /&gt;
 ln -s /lib32/libpng12.so.0 /lib32/libpng.so&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.10 64 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need the same packages as for the 32 bit Ubuntu variants, plus a few additional 32 bit compatibility packages (ia32-libs and libc6-dev-i386):&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev ia32-libs libc6-dev-i386&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.04 32 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After setting up a clean 10.04, these are the packages needed to get the source to compile. Copy &amp;amp; paste the following line:&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
Then run this command to start compiling:&lt;br /&gt;
 ./linuxBuild.sh&lt;br /&gt;
If the build fails, complaining that it can&#039;t find something, it needs more libraries. Execute the following line:&lt;br /&gt;
 sudo apt-get install m4 libxxf86vm-dev libopenal-dev libasound2-dev g++-multilib gcc-multilib zlib1g-dev libxext-dev&lt;br /&gt;
That should install all packages needed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For OS X you&#039;ll need gcc and scons, as with Linux. gcc should be included in your xcode installation, scons can be downloaded from the [http://www.scons.org/ scons project website]. The third-party libraries like boost, devil and libcurl are already included in the TDM source package, so it should compile out of the box. If you ever need to build one of them from scratch, see the subsections below.&lt;br /&gt;
&lt;br /&gt;
The sconscripts are prepared for both Intel and PPC target architectures, the MACOSX_TARGET_ARCH argument will control which architecture you&#039;re compiling for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for Intel architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for PPC architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling a universal binary &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using the following script to generate a universal binary. This script assumes that there are two separate TDM source folders, one in &amp;lt;tt&amp;gt;darkmod_src.i386&amp;lt;/tt&amp;gt; and one in &amp;lt;tt&amp;gt;darkmod_src.ppc&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Note: they are actual copies of the same TDM source package, I just used that as convenience such that I don&#039;t have to recompile the whole source tree after minor changes.&lt;br /&gt;
&lt;br /&gt;
 cd /Users/greebo&lt;br /&gt;
 cd darkmod_src.i386&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.ppc&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.i386&lt;br /&gt;
 lipo -arch i386 gamei386-base.dylib -arch ppc ../darkmod_src.ppc/gameppc-base.dylib -create -output game.dylib&lt;br /&gt;
 zip -d tdm_game03.pk4 game.dylib&lt;br /&gt;
 zip tdm_game03.pk4 game.dylib&lt;br /&gt;
&lt;br /&gt;
After this the &amp;lt;tt&amp;gt;darkmod_src.i386/tdm_game03.pk4&amp;lt;/tt&amp;gt; should contain the universal binary of the TDM game lib. The PK4 is about 6 to 7 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Installing scons &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the scons tarball from their website, unpack it to a folder and run the following commands (note that the exact scons version might differ):&lt;br /&gt;
 cd scons-2.0.1&lt;br /&gt;
 python setup.py install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building libcurl in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called &amp;quot;fat&amp;quot; binary you need to compile for both i386 and ppc targets.&lt;br /&gt;
&lt;br /&gt;
Build the i386 target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch i386&amp;quot; LDFLAGS=&amp;quot;-m32 -arch i386&amp;quot; ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.i386.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the powerpc target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; LDFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.ppc.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.&lt;br /&gt;
&lt;br /&gt;
 lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a&lt;br /&gt;
&lt;br /&gt;
The filesize of the newly created &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; should be around the sum of the single ppc and i386 libs, you can double-check that. Copy the &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; into your &amp;lt;tt&amp;gt;darkmod_src/macosx/libcurl/&amp;lt;/tt&amp;gt; and you&#039;re done with this step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building Boost static libs in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and name it &amp;lt;tt&amp;gt;user-config-darwin.jam&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 using darwin : 8.11 : /usr/bin/g++-4.0 :&lt;br /&gt;
     &amp;lt;architecture&amp;gt;&amp;quot;combined&amp;quot;&lt;br /&gt;
     &amp;lt;address-model&amp;gt;&amp;quot;32&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version-min&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;link&amp;gt;&amp;quot;static&amp;quot;&lt;br /&gt;
     &amp;lt;threading&amp;gt;&amp;quot;multi&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:&lt;br /&gt;
&lt;br /&gt;
 /path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stage&amp;quot; option only works in filesystem and system (not in thread, as of boost 1.45). You&#039;ll find the filesystem and system libs in the &amp;lt;tt&amp;gt;./stage&amp;lt;/tt&amp;gt; folder of your boost root, the &amp;lt;tt&amp;gt;libboost_thread.a&amp;lt;/tt&amp;gt; will be located in the &amp;lt;tt&amp;gt;bin.v2&amp;lt;/tt&amp;gt; folder after compilation. &lt;br /&gt;
&lt;br /&gt;
Copy all libboost*.a files to &amp;lt;tt&amp;gt;darkmod_src/macosx/boost/lib/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25498</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25498"/>
		<updated>2019-09-07T05:24:19Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.07 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.07) the corresponding sources are released as well.&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
*Download as a package: http://www.thedarkmod.com/downloads/&lt;br /&gt;
*Get the latest sources directly from SVN (team account): https://svn.thedarkmod.com/svn/darkmod_src/trunk  &lt;br /&gt;
*Get the latest sources directly from SVN (public/anonymous): https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/&lt;br /&gt;
&lt;br /&gt;
Be warned though that (unless you&#039;re a team member and working on the SVN asset base) these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;. The team cannot and will not support you in case you&#039;re running into troubles trying to get it to run.&lt;br /&gt;
&lt;br /&gt;
Download the sources and unpack them next to your darkmod/ directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\Doom3\darkmod       &amp;lt;-- your darkmod location&lt;br /&gt;
 C:\Games\Doom3\darkmod_src   &amp;lt;-- your source folder containing the solution, can be renamed&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.07 you&#039;ll need Visual Studio 2017 to compile the project.&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&amp;amp;rel=15 approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow.&lt;br /&gt;
* If compiling 2.07, make sure &amp;quot;Windows XP support for C++&amp;quot; is installed too (not needed for 2.08).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file (in MSVC 2017 format) in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
Just as the original Doom 3, TDM is built using Scons build system.&lt;br /&gt;
&lt;br /&gt;
Being in the source code root directory (darkmod_src/), you can build TDM with a command like this:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; -j6 ..&lt;br /&gt;
&lt;br /&gt;
If you omit some parameters, Scons will either use the previously defined values or the default ones.&lt;br /&gt;
&lt;br /&gt;
Here is the explanation of parameters:&lt;br /&gt;
* &amp;lt;tt&amp;gt;BUILD=&amp;quot;release&amp;quot;&amp;lt;/tt&amp;gt; --- build release (i.e. optimized) executable&lt;br /&gt;
* &amp;lt;tt&amp;gt;TARGET_ARCH=&amp;quot;x64&amp;quot;&amp;lt;/tt&amp;gt; --- build for 64-bit platform (pass &amp;quot;x86&amp;quot; or &amp;quot;x32&amp;quot; for 32-bit build)&lt;br /&gt;
* &amp;lt;tt&amp;gt;-j6&amp;lt;/tt&amp;gt; --- run six instances of compiler in parallel for faster build (better specify the number of cores in your CPU)&lt;br /&gt;
* &amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt; --- put executables with debug information to ../darkmod (scons cannot access parent directory without it)&lt;br /&gt;
Run &amp;lt;tt&amp;gt;scons --help&amp;lt;/tt&amp;gt; for more information about arguments.&lt;br /&gt;
&lt;br /&gt;
Note: by default the deploy-ready executables are put into the current directory (which is source code root directory).&lt;br /&gt;
They are stripped of debug information, so you won&#039;t be able to debug them.&lt;br /&gt;
If you need debug information, make sure to specify &amp;quot;&amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt;&amp;quot; argument: then debuggable executables will be put into ../darkmod.&lt;br /&gt;
&lt;br /&gt;
Note: starting from version 2.06, fully functional 64-bit build is supported.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install scons                    //&#039;scons&#039; is currently not installed&lt;br /&gt;
  sudo apt-get install m4                       //&#039;SCons Environment&#039; object has no attribute &#039;M4&#039;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that you can run scons build with one of the commands:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..    //on 32-bit OS&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; ..    //on 64-bit OS&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run build as usual:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you have still have problems with your build, please report to forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Linux Kali&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install build-essential manpages-dev &lt;br /&gt;
  sudo apt-get install scons    &lt;br /&gt;
  sudo apt install libx11-dev      &lt;br /&gt;
  sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
  sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
== Dead text below ==&lt;br /&gt;
&lt;br /&gt;
The remaining part of the article is most likely outdated and does not apply to version 2.06 (and later).&lt;br /&gt;
It would be probably better to simply delete it. Feel free to expand and do history digging if you like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Linux &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For Linux you&#039;ll need gcc and scons, plus a few packages depending on your distribution. There is a README.linux file contained in the source package you downloaded, check it out for some details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Debian Sqeeze 64 bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need the following packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs scons g++ g++-multilib m4 zip&lt;br /&gt;
 apt-get install libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
 apt-get install libc6-dev-i386 libxxf86vm-dev libopenal-dev libasound2-dev libxext-dev&lt;br /&gt;
&lt;br /&gt;
You must also edit &#039;&#039;&#039;sys/scons/SConscript.game&#039;&#039;&#039; and add the following lines near where &#039;&#039;local_env.Append&#039;&#039; is alread used:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append(LIBS = [&lt;br /&gt;
        File(&#039;/lib32/libpng12.so.0&#039;),&lt;br /&gt;
 ])&lt;br /&gt;
&lt;br /&gt;
Also change in the same file (a few lines above):&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng&#039; ] )&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng12&#039; ] )&lt;br /&gt;
&lt;br /&gt;
It might also be necessary to make the following symlink:&lt;br /&gt;
&lt;br /&gt;
 ln -s /lib32/libpng12.so.0 /lib32/libpng.so&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.10 64 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need the same packages as for the 32 bit Ubuntu variants, plus a few additional 32 bit compatibility packages (ia32-libs and libc6-dev-i386):&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev ia32-libs libc6-dev-i386&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.04 32 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After setting up a clean 10.04, these are the packages needed to get the source to compile. Copy &amp;amp; paste the following line:&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
Then run this command to start compiling:&lt;br /&gt;
 ./linuxBuild.sh&lt;br /&gt;
If the build fails, complaining that it can&#039;t find something, it needs more libraries. Execute the following line:&lt;br /&gt;
 sudo apt-get install m4 libxxf86vm-dev libopenal-dev libasound2-dev g++-multilib gcc-multilib zlib1g-dev libxext-dev&lt;br /&gt;
That should install all packages needed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For OS X you&#039;ll need gcc and scons, as with Linux. gcc should be included in your xcode installation, scons can be downloaded from the [http://www.scons.org/ scons project website]. The third-party libraries like boost, devil and libcurl are already included in the TDM source package, so it should compile out of the box. If you ever need to build one of them from scratch, see the subsections below.&lt;br /&gt;
&lt;br /&gt;
The sconscripts are prepared for both Intel and PPC target architectures, the MACOSX_TARGET_ARCH argument will control which architecture you&#039;re compiling for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for Intel architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for PPC architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling a universal binary &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using the following script to generate a universal binary. This script assumes that there are two separate TDM source folders, one in &amp;lt;tt&amp;gt;darkmod_src.i386&amp;lt;/tt&amp;gt; and one in &amp;lt;tt&amp;gt;darkmod_src.ppc&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Note: they are actual copies of the same TDM source package, I just used that as convenience such that I don&#039;t have to recompile the whole source tree after minor changes.&lt;br /&gt;
&lt;br /&gt;
 cd /Users/greebo&lt;br /&gt;
 cd darkmod_src.i386&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.ppc&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.i386&lt;br /&gt;
 lipo -arch i386 gamei386-base.dylib -arch ppc ../darkmod_src.ppc/gameppc-base.dylib -create -output game.dylib&lt;br /&gt;
 zip -d tdm_game03.pk4 game.dylib&lt;br /&gt;
 zip tdm_game03.pk4 game.dylib&lt;br /&gt;
&lt;br /&gt;
After this the &amp;lt;tt&amp;gt;darkmod_src.i386/tdm_game03.pk4&amp;lt;/tt&amp;gt; should contain the universal binary of the TDM game lib. The PK4 is about 6 to 7 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Installing scons &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the scons tarball from their website, unpack it to a folder and run the following commands (note that the exact scons version might differ):&lt;br /&gt;
 cd scons-2.0.1&lt;br /&gt;
 python setup.py install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building libcurl in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called &amp;quot;fat&amp;quot; binary you need to compile for both i386 and ppc targets.&lt;br /&gt;
&lt;br /&gt;
Build the i386 target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch i386&amp;quot; LDFLAGS=&amp;quot;-m32 -arch i386&amp;quot; ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.i386.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the powerpc target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; LDFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.ppc.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.&lt;br /&gt;
&lt;br /&gt;
 lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a&lt;br /&gt;
&lt;br /&gt;
The filesize of the newly created &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; should be around the sum of the single ppc and i386 libs, you can double-check that. Copy the &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; into your &amp;lt;tt&amp;gt;darkmod_src/macosx/libcurl/&amp;lt;/tt&amp;gt; and you&#039;re done with this step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building Boost static libs in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and name it &amp;lt;tt&amp;gt;user-config-darwin.jam&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 using darwin : 8.11 : /usr/bin/g++-4.0 :&lt;br /&gt;
     &amp;lt;architecture&amp;gt;&amp;quot;combined&amp;quot;&lt;br /&gt;
     &amp;lt;address-model&amp;gt;&amp;quot;32&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version-min&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;link&amp;gt;&amp;quot;static&amp;quot;&lt;br /&gt;
     &amp;lt;threading&amp;gt;&amp;quot;multi&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:&lt;br /&gt;
&lt;br /&gt;
 /path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stage&amp;quot; option only works in filesystem and system (not in thread, as of boost 1.45). You&#039;ll find the filesystem and system libs in the &amp;lt;tt&amp;gt;./stage&amp;lt;/tt&amp;gt; folder of your boost root, the &amp;lt;tt&amp;gt;libboost_thread.a&amp;lt;/tt&amp;gt; will be located in the &amp;lt;tt&amp;gt;bin.v2&amp;lt;/tt&amp;gt; folder after compilation. &lt;br /&gt;
&lt;br /&gt;
Copy all libboost*.a files to &amp;lt;tt&amp;gt;darkmod_src/macosx/boost/lib/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25466</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25466"/>
		<updated>2019-08-18T13:53:57Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: /* Ubuntu 16.04 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.07 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.07) the corresponding sources are released as well.&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
*Download as a package: http://www.thedarkmod.com/downloads/&lt;br /&gt;
*Get the latest sources directly from SVN: https://svn.thedarkmod.com/svn/darkmod_src/trunk &lt;br /&gt;
&lt;br /&gt;
Be warned though that (unless you&#039;re a team member and working on the SVN asset base) these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;. The team cannot and will not support you in case you&#039;re running into troubles trying to get it to run.&lt;br /&gt;
&lt;br /&gt;
Download the sources and unpack them next to your darkmod/ directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\Doom3\darkmod       &amp;lt;-- your darkmod location&lt;br /&gt;
 C:\Games\Doom3\darkmod_src   &amp;lt;-- your source folder containing the solution, can be renamed&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.07 you&#039;ll need Visual Studio 2017 to compile the project.&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&amp;amp;rel=15 approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow.&lt;br /&gt;
* If compiling 2.07, make sure &amp;quot;Windows XP support for C++&amp;quot; is installed too (not needed for 2.08).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file (in MSVC 2017 format) in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
Just as the original Doom 3, TDM is built using Scons build system.&lt;br /&gt;
&lt;br /&gt;
Being in the source code root directory (darkmod_src/), you can build TDM with a command like this:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; -j6 ..&lt;br /&gt;
&lt;br /&gt;
If you omit some parameters, Scons will either use the previously defined values or the default ones.&lt;br /&gt;
&lt;br /&gt;
Here is the explanation of parameters:&lt;br /&gt;
* &amp;lt;tt&amp;gt;BUILD=&amp;quot;release&amp;quot;&amp;lt;/tt&amp;gt; --- build release (i.e. optimized) executable&lt;br /&gt;
* &amp;lt;tt&amp;gt;TARGET_ARCH=&amp;quot;x64&amp;quot;&amp;lt;/tt&amp;gt; --- build for 64-bit platform (pass &amp;quot;x86&amp;quot; or &amp;quot;x32&amp;quot; for 32-bit build)&lt;br /&gt;
* &amp;lt;tt&amp;gt;-j6&amp;lt;/tt&amp;gt; --- run six instances of compiler in parallel for faster build (better specify the number of cores in your CPU)&lt;br /&gt;
* &amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt; --- put executables with debug information to ../darkmod (scons cannot access parent directory without it)&lt;br /&gt;
Run &amp;lt;tt&amp;gt;scons --help&amp;lt;/tt&amp;gt; for more information about arguments.&lt;br /&gt;
&lt;br /&gt;
Note: by default the deploy-ready executables are put into the current directory (which is source code root directory).&lt;br /&gt;
They are stripped of debug information, so you won&#039;t be able to debug them.&lt;br /&gt;
If you need debug information, make sure to specify &amp;quot;&amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt;&amp;quot; argument: then debuggable executables will be put into ../darkmod.&lt;br /&gt;
&lt;br /&gt;
Note: starting from version 2.06, fully functional 64-bit build is supported.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install scons                    //&#039;scons&#039; is currently not installed&lt;br /&gt;
  sudo apt-get install m4                       //&#039;SCons Environment&#039; object has no attribute &#039;M4&#039;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that you can run scons build with one of the commands:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..    //on 32-bit OS&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; ..    //on 64-bit OS&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run build as usual:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you have still have problems with your build, please report to forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Linux Kali&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install build-essential manpages-dev &lt;br /&gt;
  sudo apt-get install scons    &lt;br /&gt;
  sudo apt install libx11-dev      &lt;br /&gt;
  sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
  sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
== Dead text below ==&lt;br /&gt;
&lt;br /&gt;
The remaining part of the article is most likely outdated and does not apply to version 2.06 (and later).&lt;br /&gt;
It would be probably better to simply delete it. Feel free to expand and do history digging if you like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Linux &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For Linux you&#039;ll need gcc and scons, plus a few packages depending on your distribution. There is a README.linux file contained in the source package you downloaded, check it out for some details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Debian Sqeeze 64 bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need the following packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs scons g++ g++-multilib m4 zip&lt;br /&gt;
 apt-get install libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
 apt-get install libc6-dev-i386 libxxf86vm-dev libopenal-dev libasound2-dev libxext-dev&lt;br /&gt;
&lt;br /&gt;
You must also edit &#039;&#039;&#039;sys/scons/SConscript.game&#039;&#039;&#039; and add the following lines near where &#039;&#039;local_env.Append&#039;&#039; is alread used:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append(LIBS = [&lt;br /&gt;
        File(&#039;/lib32/libpng12.so.0&#039;),&lt;br /&gt;
 ])&lt;br /&gt;
&lt;br /&gt;
Also change in the same file (a few lines above):&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng&#039; ] )&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng12&#039; ] )&lt;br /&gt;
&lt;br /&gt;
It might also be necessary to make the following symlink:&lt;br /&gt;
&lt;br /&gt;
 ln -s /lib32/libpng12.so.0 /lib32/libpng.so&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.10 64 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need the same packages as for the 32 bit Ubuntu variants, plus a few additional 32 bit compatibility packages (ia32-libs and libc6-dev-i386):&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev ia32-libs libc6-dev-i386&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.04 32 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After setting up a clean 10.04, these are the packages needed to get the source to compile. Copy &amp;amp; paste the following line:&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
Then run this command to start compiling:&lt;br /&gt;
 ./linuxBuild.sh&lt;br /&gt;
If the build fails, complaining that it can&#039;t find something, it needs more libraries. Execute the following line:&lt;br /&gt;
 sudo apt-get install m4 libxxf86vm-dev libopenal-dev libasound2-dev g++-multilib gcc-multilib zlib1g-dev libxext-dev&lt;br /&gt;
That should install all packages needed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For OS X you&#039;ll need gcc and scons, as with Linux. gcc should be included in your xcode installation, scons can be downloaded from the [http://www.scons.org/ scons project website]. The third-party libraries like boost, devil and libcurl are already included in the TDM source package, so it should compile out of the box. If you ever need to build one of them from scratch, see the subsections below.&lt;br /&gt;
&lt;br /&gt;
The sconscripts are prepared for both Intel and PPC target architectures, the MACOSX_TARGET_ARCH argument will control which architecture you&#039;re compiling for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for Intel architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for PPC architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling a universal binary &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using the following script to generate a universal binary. This script assumes that there are two separate TDM source folders, one in &amp;lt;tt&amp;gt;darkmod_src.i386&amp;lt;/tt&amp;gt; and one in &amp;lt;tt&amp;gt;darkmod_src.ppc&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Note: they are actual copies of the same TDM source package, I just used that as convenience such that I don&#039;t have to recompile the whole source tree after minor changes.&lt;br /&gt;
&lt;br /&gt;
 cd /Users/greebo&lt;br /&gt;
 cd darkmod_src.i386&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.ppc&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.i386&lt;br /&gt;
 lipo -arch i386 gamei386-base.dylib -arch ppc ../darkmod_src.ppc/gameppc-base.dylib -create -output game.dylib&lt;br /&gt;
 zip -d tdm_game03.pk4 game.dylib&lt;br /&gt;
 zip tdm_game03.pk4 game.dylib&lt;br /&gt;
&lt;br /&gt;
After this the &amp;lt;tt&amp;gt;darkmod_src.i386/tdm_game03.pk4&amp;lt;/tt&amp;gt; should contain the universal binary of the TDM game lib. The PK4 is about 6 to 7 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Installing scons &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the scons tarball from their website, unpack it to a folder and run the following commands (note that the exact scons version might differ):&lt;br /&gt;
 cd scons-2.0.1&lt;br /&gt;
 python setup.py install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building libcurl in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called &amp;quot;fat&amp;quot; binary you need to compile for both i386 and ppc targets.&lt;br /&gt;
&lt;br /&gt;
Build the i386 target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch i386&amp;quot; LDFLAGS=&amp;quot;-m32 -arch i386&amp;quot; ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.i386.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the powerpc target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; LDFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.ppc.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.&lt;br /&gt;
&lt;br /&gt;
 lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a&lt;br /&gt;
&lt;br /&gt;
The filesize of the newly created &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; should be around the sum of the single ppc and i386 libs, you can double-check that. Copy the &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; into your &amp;lt;tt&amp;gt;darkmod_src/macosx/libcurl/&amp;lt;/tt&amp;gt; and you&#039;re done with this step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building Boost static libs in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and name it &amp;lt;tt&amp;gt;user-config-darwin.jam&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 using darwin : 8.11 : /usr/bin/g++-4.0 :&lt;br /&gt;
     &amp;lt;architecture&amp;gt;&amp;quot;combined&amp;quot;&lt;br /&gt;
     &amp;lt;address-model&amp;gt;&amp;quot;32&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version-min&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;link&amp;gt;&amp;quot;static&amp;quot;&lt;br /&gt;
     &amp;lt;threading&amp;gt;&amp;quot;multi&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:&lt;br /&gt;
&lt;br /&gt;
 /path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stage&amp;quot; option only works in filesystem and system (not in thread, as of boost 1.45). You&#039;ll find the filesystem and system libs in the &amp;lt;tt&amp;gt;./stage&amp;lt;/tt&amp;gt; folder of your boost root, the &amp;lt;tt&amp;gt;libboost_thread.a&amp;lt;/tt&amp;gt; will be located in the &amp;lt;tt&amp;gt;bin.v2&amp;lt;/tt&amp;gt; folder after compilation. &lt;br /&gt;
&lt;br /&gt;
Copy all libboost*.a files to &amp;lt;tt&amp;gt;darkmod_src/macosx/boost/lib/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25458</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25458"/>
		<updated>2019-08-04T10:33:31Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: /* Other distros */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.07 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.07) the corresponding sources are released as well.&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
*Download as a package: http://www.thedarkmod.com/downloads/&lt;br /&gt;
*Get the latest sources directly from SVN: https://svn.thedarkmod.com/svn/darkmod_src/trunk &lt;br /&gt;
&lt;br /&gt;
Be warned though that (unless you&#039;re a team member and working on the SVN asset base) these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;. The team cannot and will not support you in case you&#039;re running into troubles trying to get it to run.&lt;br /&gt;
&lt;br /&gt;
Download the sources and unpack them next to your darkmod/ directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\Doom3\darkmod       &amp;lt;-- your darkmod location&lt;br /&gt;
 C:\Games\Doom3\darkmod_src   &amp;lt;-- your source folder containing the solution, can be renamed&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.07 you&#039;ll need Visual Studio 2017 to compile the project.&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&amp;amp;rel=15 approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow.&lt;br /&gt;
* If compiling 2.07, make sure &amp;quot;Windows XP support for C++&amp;quot; is installed too (not needed for 2.08).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file (in MSVC 2017 format) in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
Just as the original Doom 3, TDM is built using Scons build system.&lt;br /&gt;
&lt;br /&gt;
Being in the source code root directory (darkmod_src/), you can build TDM with a command like this:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; -j6 ..&lt;br /&gt;
&lt;br /&gt;
If you omit some parameters, Scons will either use the previously defined values or the default ones.&lt;br /&gt;
&lt;br /&gt;
Here is the explanation of parameters:&lt;br /&gt;
* &amp;lt;tt&amp;gt;BUILD=&amp;quot;release&amp;quot;&amp;lt;/tt&amp;gt; --- build release (i.e. optimized) executable&lt;br /&gt;
* &amp;lt;tt&amp;gt;TARGET_ARCH=&amp;quot;x64&amp;quot;&amp;lt;/tt&amp;gt; --- build for 64-bit platform (pass &amp;quot;x86&amp;quot; or &amp;quot;x32&amp;quot; for 32-bit build)&lt;br /&gt;
* &amp;lt;tt&amp;gt;-j6&amp;lt;/tt&amp;gt; --- run six instances of compiler in parallel for faster build (better specify the number of cores in your CPU)&lt;br /&gt;
* &amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt; --- put executables with debug information to ../darkmod (scons cannot access parent directory without it)&lt;br /&gt;
Run &amp;lt;tt&amp;gt;scons --help&amp;lt;/tt&amp;gt; for more information about arguments.&lt;br /&gt;
&lt;br /&gt;
Note: by default the deploy-ready executables are put into the current directory (which is source code root directory).&lt;br /&gt;
They are stripped of debug information, so you won&#039;t be able to debug them.&lt;br /&gt;
If you need debug information, make sure to specify &amp;quot;&amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt;&amp;quot; argument: then debuggable executables will be put into ../darkmod.&lt;br /&gt;
&lt;br /&gt;
Note: starting from version 2.06, fully functional 64-bit build is supported.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install scons                    //&#039;scons&#039; is currently not installed&lt;br /&gt;
  sudo apt-get install m4                       //&#039;SCons Environment&#039; object has no attribute &#039;M4&#039;&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that you can run scons build with one of the commands:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..    //on 32-bit OS&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; ..    //on 64-bit OS&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run build as usual:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you have still have problems with your build, please report to forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Linux Kali&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install build-essential manpages-dev &lt;br /&gt;
  sudo apt-get install scons    &lt;br /&gt;
  sudo apt install libx11-dev      &lt;br /&gt;
  sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
  sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
== Dead text below ==&lt;br /&gt;
&lt;br /&gt;
The remaining part of the article is most likely outdated and does not apply to version 2.06 (and later).&lt;br /&gt;
It would be probably better to simply delete it. Feel free to expand and do history digging if you like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Linux &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For Linux you&#039;ll need gcc and scons, plus a few packages depending on your distribution. There is a README.linux file contained in the source package you downloaded, check it out for some details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Debian Sqeeze 64 bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need the following packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs scons g++ g++-multilib m4 zip&lt;br /&gt;
 apt-get install libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
 apt-get install libc6-dev-i386 libxxf86vm-dev libopenal-dev libasound2-dev libxext-dev&lt;br /&gt;
&lt;br /&gt;
You must also edit &#039;&#039;&#039;sys/scons/SConscript.game&#039;&#039;&#039; and add the following lines near where &#039;&#039;local_env.Append&#039;&#039; is alread used:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append(LIBS = [&lt;br /&gt;
        File(&#039;/lib32/libpng12.so.0&#039;),&lt;br /&gt;
 ])&lt;br /&gt;
&lt;br /&gt;
Also change in the same file (a few lines above):&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng&#039; ] )&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng12&#039; ] )&lt;br /&gt;
&lt;br /&gt;
It might also be necessary to make the following symlink:&lt;br /&gt;
&lt;br /&gt;
 ln -s /lib32/libpng12.so.0 /lib32/libpng.so&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.10 64 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need the same packages as for the 32 bit Ubuntu variants, plus a few additional 32 bit compatibility packages (ia32-libs and libc6-dev-i386):&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev ia32-libs libc6-dev-i386&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.04 32 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After setting up a clean 10.04, these are the packages needed to get the source to compile. Copy &amp;amp; paste the following line:&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
Then run this command to start compiling:&lt;br /&gt;
 ./linuxBuild.sh&lt;br /&gt;
If the build fails, complaining that it can&#039;t find something, it needs more libraries. Execute the following line:&lt;br /&gt;
 sudo apt-get install m4 libxxf86vm-dev libopenal-dev libasound2-dev g++-multilib gcc-multilib zlib1g-dev libxext-dev&lt;br /&gt;
That should install all packages needed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For OS X you&#039;ll need gcc and scons, as with Linux. gcc should be included in your xcode installation, scons can be downloaded from the [http://www.scons.org/ scons project website]. The third-party libraries like boost, devil and libcurl are already included in the TDM source package, so it should compile out of the box. If you ever need to build one of them from scratch, see the subsections below.&lt;br /&gt;
&lt;br /&gt;
The sconscripts are prepared for both Intel and PPC target architectures, the MACOSX_TARGET_ARCH argument will control which architecture you&#039;re compiling for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for Intel architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for PPC architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling a universal binary &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using the following script to generate a universal binary. This script assumes that there are two separate TDM source folders, one in &amp;lt;tt&amp;gt;darkmod_src.i386&amp;lt;/tt&amp;gt; and one in &amp;lt;tt&amp;gt;darkmod_src.ppc&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Note: they are actual copies of the same TDM source package, I just used that as convenience such that I don&#039;t have to recompile the whole source tree after minor changes.&lt;br /&gt;
&lt;br /&gt;
 cd /Users/greebo&lt;br /&gt;
 cd darkmod_src.i386&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.ppc&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.i386&lt;br /&gt;
 lipo -arch i386 gamei386-base.dylib -arch ppc ../darkmod_src.ppc/gameppc-base.dylib -create -output game.dylib&lt;br /&gt;
 zip -d tdm_game03.pk4 game.dylib&lt;br /&gt;
 zip tdm_game03.pk4 game.dylib&lt;br /&gt;
&lt;br /&gt;
After this the &amp;lt;tt&amp;gt;darkmod_src.i386/tdm_game03.pk4&amp;lt;/tt&amp;gt; should contain the universal binary of the TDM game lib. The PK4 is about 6 to 7 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Installing scons &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the scons tarball from their website, unpack it to a folder and run the following commands (note that the exact scons version might differ):&lt;br /&gt;
 cd scons-2.0.1&lt;br /&gt;
 python setup.py install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building libcurl in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called &amp;quot;fat&amp;quot; binary you need to compile for both i386 and ppc targets.&lt;br /&gt;
&lt;br /&gt;
Build the i386 target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch i386&amp;quot; LDFLAGS=&amp;quot;-m32 -arch i386&amp;quot; ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.i386.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the powerpc target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; LDFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.ppc.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.&lt;br /&gt;
&lt;br /&gt;
 lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a&lt;br /&gt;
&lt;br /&gt;
The filesize of the newly created &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; should be around the sum of the single ppc and i386 libs, you can double-check that. Copy the &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; into your &amp;lt;tt&amp;gt;darkmod_src/macosx/libcurl/&amp;lt;/tt&amp;gt; and you&#039;re done with this step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building Boost static libs in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and name it &amp;lt;tt&amp;gt;user-config-darwin.jam&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 using darwin : 8.11 : /usr/bin/g++-4.0 :&lt;br /&gt;
     &amp;lt;architecture&amp;gt;&amp;quot;combined&amp;quot;&lt;br /&gt;
     &amp;lt;address-model&amp;gt;&amp;quot;32&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version-min&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;link&amp;gt;&amp;quot;static&amp;quot;&lt;br /&gt;
     &amp;lt;threading&amp;gt;&amp;quot;multi&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:&lt;br /&gt;
&lt;br /&gt;
 /path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stage&amp;quot; option only works in filesystem and system (not in thread, as of boost 1.45). You&#039;ll find the filesystem and system libs in the &amp;lt;tt&amp;gt;./stage&amp;lt;/tt&amp;gt; folder of your boost root, the &amp;lt;tt&amp;gt;libboost_thread.a&amp;lt;/tt&amp;gt; will be located in the &amp;lt;tt&amp;gt;bin.v2&amp;lt;/tt&amp;gt; folder after compilation. &lt;br /&gt;
&lt;br /&gt;
Copy all libboost*.a files to &amp;lt;tt&amp;gt;darkmod_src/macosx/boost/lib/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25457</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=25457"/>
		<updated>2019-08-04T10:33:03Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: /* Other distros */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.07 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.07) the corresponding sources are released as well.&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
*Download as a package: http://www.thedarkmod.com/downloads/&lt;br /&gt;
*Get the latest sources directly from SVN: https://svn.thedarkmod.com/svn/darkmod_src/trunk &lt;br /&gt;
&lt;br /&gt;
Be warned though that (unless you&#039;re a team member and working on the SVN asset base) these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;. The team cannot and will not support you in case you&#039;re running into troubles trying to get it to run.&lt;br /&gt;
&lt;br /&gt;
Download the sources and unpack them next to your darkmod/ directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\Doom3\darkmod       &amp;lt;-- your darkmod location&lt;br /&gt;
 C:\Games\Doom3\darkmod_src   &amp;lt;-- your source folder containing the solution, can be renamed&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.07 you&#039;ll need Visual Studio 2017 to compile the project.&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&amp;amp;rel=15 approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow.&lt;br /&gt;
* If compiling 2.07, make sure &amp;quot;Windows XP support for C++&amp;quot; is installed too (not needed for 2.08).&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file (in MSVC 2017 format) in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
Just as the original Doom 3, TDM is built using Scons build system.&lt;br /&gt;
&lt;br /&gt;
Being in the source code root directory (darkmod_src/), you can build TDM with a command like this:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; -j6 ..&lt;br /&gt;
&lt;br /&gt;
If you omit some parameters, Scons will either use the previously defined values or the default ones.&lt;br /&gt;
&lt;br /&gt;
Here is the explanation of parameters:&lt;br /&gt;
* &amp;lt;tt&amp;gt;BUILD=&amp;quot;release&amp;quot;&amp;lt;/tt&amp;gt; --- build release (i.e. optimized) executable&lt;br /&gt;
* &amp;lt;tt&amp;gt;TARGET_ARCH=&amp;quot;x64&amp;quot;&amp;lt;/tt&amp;gt; --- build for 64-bit platform (pass &amp;quot;x86&amp;quot; or &amp;quot;x32&amp;quot; for 32-bit build)&lt;br /&gt;
* &amp;lt;tt&amp;gt;-j6&amp;lt;/tt&amp;gt; --- run six instances of compiler in parallel for faster build (better specify the number of cores in your CPU)&lt;br /&gt;
* &amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt; --- put executables with debug information to ../darkmod (scons cannot access parent directory without it)&lt;br /&gt;
Run &amp;lt;tt&amp;gt;scons --help&amp;lt;/tt&amp;gt; for more information about arguments.&lt;br /&gt;
&lt;br /&gt;
Note: by default the deploy-ready executables are put into the current directory (which is source code root directory).&lt;br /&gt;
They are stripped of debug information, so you won&#039;t be able to debug them.&lt;br /&gt;
If you need debug information, make sure to specify &amp;quot;&amp;lt;tt&amp;gt;..&amp;lt;/tt&amp;gt;&amp;quot; argument: then debuggable executables will be put into ../darkmod.&lt;br /&gt;
&lt;br /&gt;
Note: starting from version 2.06, fully functional 64-bit build is supported.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install scons                    //&#039;scons&#039; is currently not installed&lt;br /&gt;
  sudo apt-get install m4                       //&#039;SCons Environment&#039; object has no attribute &#039;M4&#039;&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
After that you can run scons build with one of the commands:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..    //on 32-bit OS&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x64&amp;quot; ..    //on 64-bit OS&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then run build as usual:&lt;br /&gt;
&lt;br /&gt;
  scons BUILD=&amp;quot;release&amp;quot; TARGET_ARCH=&amp;quot;x86&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you have still have problems with your build, please report to forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Linux Kali&lt;br /&gt;
sudo apt-get install build-essential manpages-dev &lt;br /&gt;
sudo apt-get install scons    &lt;br /&gt;
sudo apt install libx11-dev      &lt;br /&gt;
sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
== Dead text below ==&lt;br /&gt;
&lt;br /&gt;
The remaining part of the article is most likely outdated and does not apply to version 2.06 (and later).&lt;br /&gt;
It would be probably better to simply delete it. Feel free to expand and do history digging if you like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:100%; overflow:auto;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Linux &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For Linux you&#039;ll need gcc and scons, plus a few packages depending on your distribution. There is a README.linux file contained in the source package you downloaded, check it out for some details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Debian Sqeeze 64 bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You need the following packages:&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs scons g++ g++-multilib m4 zip&lt;br /&gt;
 apt-get install libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
 apt-get install libc6-dev-i386 libxxf86vm-dev libopenal-dev libasound2-dev libxext-dev&lt;br /&gt;
&lt;br /&gt;
You must also edit &#039;&#039;&#039;sys/scons/SConscript.game&#039;&#039;&#039; and add the following lines near where &#039;&#039;local_env.Append&#039;&#039; is alread used:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append(LIBS = [&lt;br /&gt;
        File(&#039;/lib32/libpng12.so.0&#039;),&lt;br /&gt;
 ])&lt;br /&gt;
&lt;br /&gt;
Also change in the same file (a few lines above):&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng&#039; ] )&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 local_env.Append( LINKFLAGS = [ &#039;-lrt&#039;, &#039;-lpng12&#039; ] )&lt;br /&gt;
&lt;br /&gt;
It might also be necessary to make the following symlink:&lt;br /&gt;
&lt;br /&gt;
 ln -s /lib32/libpng12.so.0 /lib32/libpng.so&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.10 64 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need the same packages as for the 32 bit Ubuntu variants, plus a few additional 32 bit compatibility packages (ia32-libs and libc6-dev-i386):&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev ia32-libs libc6-dev-i386&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Ubuntu 10.04 32 Bit &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After setting up a clean 10.04, these are the packages needed to get the source to compile. Copy &amp;amp; paste the following line:&lt;br /&gt;
 sudo apt-get install g++ scons libglew1.5-dev libpng12-dev libjpeg62-dev&lt;br /&gt;
Then run this command to start compiling:&lt;br /&gt;
 ./linuxBuild.sh&lt;br /&gt;
If the build fails, complaining that it can&#039;t find something, it needs more libraries. Execute the following line:&lt;br /&gt;
 sudo apt-get install m4 libxxf86vm-dev libopenal-dev libasound2-dev g++-multilib gcc-multilib zlib1g-dev libxext-dev&lt;br /&gt;
That should install all packages needed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For OS X you&#039;ll need gcc and scons, as with Linux. gcc should be included in your xcode installation, scons can be downloaded from the [http://www.scons.org/ scons project website]. The third-party libraries like boost, devil and libcurl are already included in the TDM source package, so it should compile out of the box. If you ever need to build one of them from scratch, see the subsections below.&lt;br /&gt;
&lt;br /&gt;
The sconscripts are prepared for both Intel and PPC target architectures, the MACOSX_TARGET_ARCH argument will control which architecture you&#039;re compiling for.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for Intel architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling for PPC architecture &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To start compiling, enter the following command in the folder you extracted the TDM sources to:&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Compiling a universal binary &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been using the following script to generate a universal binary. This script assumes that there are two separate TDM source folders, one in &amp;lt;tt&amp;gt;darkmod_src.i386&amp;lt;/tt&amp;gt; and one in &amp;lt;tt&amp;gt;darkmod_src.ppc&amp;lt;/tt&amp;gt;. &lt;br /&gt;
Note: they are actual copies of the same TDM source package, I just used that as convenience such that I don&#039;t have to recompile the whole source tree after minor changes.&lt;br /&gt;
&lt;br /&gt;
 cd /Users/greebo&lt;br /&gt;
 cd darkmod_src.i386&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;i386&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.ppc&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; MACOSX_TARGET_ARCH=&amp;quot;ppc&amp;quot;&lt;br /&gt;
 cd ../darkmod_src.i386&lt;br /&gt;
 lipo -arch i386 gamei386-base.dylib -arch ppc ../darkmod_src.ppc/gameppc-base.dylib -create -output game.dylib&lt;br /&gt;
 zip -d tdm_game03.pk4 game.dylib&lt;br /&gt;
 zip tdm_game03.pk4 game.dylib&lt;br /&gt;
&lt;br /&gt;
After this the &amp;lt;tt&amp;gt;darkmod_src.i386/tdm_game03.pk4&amp;lt;/tt&amp;gt; should contain the universal binary of the TDM game lib. The PK4 is about 6 to 7 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Installing scons &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Get the scons tarball from their website, unpack it to a folder and run the following commands (note that the exact scons version might differ):&lt;br /&gt;
 cd scons-2.0.1&lt;br /&gt;
 python setup.py install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building libcurl in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the libcurl 7.21 source package, and extract it on your system. To produce a so-called &amp;quot;fat&amp;quot; binary you need to compile for both i386 and ppc targets.&lt;br /&gt;
&lt;br /&gt;
Build the i386 target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch i386&amp;quot; LDFLAGS=&amp;quot;-m32 -arch i386&amp;quot; ./configure --disable-ldap --build=i686-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.i386.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the powerpc target by entering:&lt;br /&gt;
&lt;br /&gt;
 env CFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; LDFLAGS=&amp;quot;-m32 -arch ppc&amp;quot; ./configure --disable-ldap --build=powerpc-unknown-linux-gnu --without-libidn --without-zlib --without-ssl&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
After make install the static library can be found in &amp;lt;tt&amp;gt;/usr/local/lib/libcurl.a&amp;lt;/tt&amp;gt;, copy that file to your curl folder and rename it to &amp;lt;tt&amp;gt;./libcurl.ppc.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally call lipo to combine these two into a fat binary by entering this in your curl folder.&lt;br /&gt;
&lt;br /&gt;
 lipo -arch i386 libcurl.i386.a -arch ppc libcurl.ppc.a -create -output libcurl.a&lt;br /&gt;
&lt;br /&gt;
The filesize of the newly created &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; should be around the sum of the single ppc and i386 libs, you can double-check that. Copy the &amp;lt;tt&amp;gt;libcurl.a&amp;lt;/tt&amp;gt; into your &amp;lt;tt&amp;gt;darkmod_src/macosx/libcurl/&amp;lt;/tt&amp;gt; and you&#039;re done with this step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Building Boost static libs in Mac OS X &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Download the boost 1.45 sources and extract them to your hard drive. Create a jam user config file to use the g++ 4.0 compiler instead of the default gcc 4.2 in Leopard: create a new file in your boost root folder and name it &amp;lt;tt&amp;gt;user-config-darwin.jam&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 using darwin : 8.11 : /usr/bin/g++-4.0 :&lt;br /&gt;
     &amp;lt;architecture&amp;gt;&amp;quot;combined&amp;quot;&lt;br /&gt;
     &amp;lt;address-model&amp;gt;&amp;quot;32&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;macosx-version-min&amp;gt;&amp;quot;10.4&amp;quot;&lt;br /&gt;
     &amp;lt;link&amp;gt;&amp;quot;static&amp;quot;&lt;br /&gt;
     &amp;lt;threading&amp;gt;&amp;quot;multi&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
Download a bjam binary for OS X to your machine, then build boost threads, filesystem and system:&lt;br /&gt;
&lt;br /&gt;
 /path/to/bjam --user-config=../../../user-config-darwin.jam architecture=combined link=static threading=multi address-model=32 release [stage]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;stage&amp;quot; option only works in filesystem and system (not in thread, as of boost 1.45). You&#039;ll find the filesystem and system libs in the &amp;lt;tt&amp;gt;./stage&amp;lt;/tt&amp;gt; folder of your boost root, the &amp;lt;tt&amp;gt;libboost_thread.a&amp;lt;/tt&amp;gt; will be located in the &amp;lt;tt&amp;gt;bin.v2&amp;lt;/tt&amp;gt; folder after compilation. &lt;br /&gt;
&lt;br /&gt;
Copy all libboost*.a files to &amp;lt;tt&amp;gt;darkmod_src/macosx/boost/lib/&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25411</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25411"/>
		<updated>2019-05-27T11:48:57Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shadow.vp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|ambientInteraction.vfp/ambient_cubic_light.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|ambientInteraction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test_direct.vfp/interaction_direct.vfp/cubic_light_point.vfp/cubic_light_proj.vfp/test_cubic_light_point.vfp/test_cubic_light_proj.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|interaction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test.vfp&lt;br /&gt;
interaction.vfp&lt;br /&gt;
|Unused (?) ARB2 shaders&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|soft_particle.vfp&lt;br /&gt;
cookMath_pass1.vfp&lt;br /&gt;
cookMath_pass2.vfp&lt;br /&gt;
brightPass_opt.vfp&lt;br /&gt;
blurx.vfp&lt;br /&gt;
blury.vfp&lt;br /&gt;
finalScenePass_opt.vfp&lt;br /&gt;
|Shaders to check&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25410</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25410"/>
		<updated>2019-05-27T11:46:39Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shadow.vp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|ambientInteraction.vfp/ambient_cubic_light.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|ambientInteraction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test_direct.vfp/interaction_direct.vfp/cubic_light_point.vfp/cubic_light_proj.vfp/test_cubic_light_point.vfp/test_cubic_light_proj.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|interaction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test.vfp&lt;br /&gt;
interaction.vfp&lt;br /&gt;
|Unused (?) ARB2 shaders&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|soft_particle.vfp&lt;br /&gt;
cookMath_pass1.vfp&lt;br /&gt;
cookMath_pass2.vfp&lt;br /&gt;
brightPass_opt.vfp&lt;br /&gt;
blurx.vfp&lt;br /&gt;
blury.vfp&lt;br /&gt;
finalScenePass_opt.vfp&lt;br /&gt;
|Shaders to check&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25409</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25409"/>
		<updated>2019-05-27T11:45:34Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shadow.vp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|ambientInteraction.vfp/ambient_cubic_light.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|ambientInteraction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test_direct.vfp/interaction_direct.vfp/cubic_light_point.vfp/cubic_light_proj.vfp/test_cubic_light_point.vfp/test_cubic_light_proj.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|interaction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test.vfp&lt;br /&gt;
interaction.vfp&lt;br /&gt;
|Unused (?) ARB2 shaders&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|soft_particle.vfp&lt;br /&gt;
cookMath_pass1.vfp&lt;br /&gt;
cookMath_pass2.vfp&lt;br /&gt;
brightPass_opt.vfp&lt;br /&gt;
blurx.vfp&lt;br /&gt;
blury.vfp&lt;br /&gt;
finalScenePass_opt.vfp&lt;br /&gt;
|Shaders to check&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25408</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25408"/>
		<updated>2019-05-27T11:43:24Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shadow.vp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|ambientInteraction.vfp/ambient_cubic_light.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|ambientInteraction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|test_direct.vfp/interaction_direct.vfp/cubic_light_point.vfp/cubic_light_proj.vfp/test_cubic_light_point.vfp/test_cubic_light_proj.vfp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|interaction.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|Unused (?) ARB2 shaders&lt;br /&gt;
|-&lt;br /&gt;
|test.vfp&lt;br /&gt;
|interaction.vfp&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|Shaders to check&lt;br /&gt;
|-&lt;br /&gt;
|soft_particle.vfp&lt;br /&gt;
|cookMath_pass1.vfp&lt;br /&gt;
|cookMath_pass2.vfp&lt;br /&gt;
|brightPass_opt.vfp&lt;br /&gt;
|blurx.vfp&lt;br /&gt;
|blury.vfp&lt;br /&gt;
|finalScenePass_opt.vfp&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25407</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25407"/>
		<updated>2019-05-27T11:32:47Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|shadow.vp&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25406</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25406"/>
		<updated>2019-05-27T11:31:46Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(extra material stages)&lt;br /&gt;
|Replacement for material stage frob highlight. The ARB2 version does not seem to be used anywhere?&lt;br /&gt;
|WIP (2019.05.26)&lt;br /&gt;
|frob.?s&lt;br /&gt;
|Any map +r_newFrob 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Material stages TG_SKYBOX_CUBE/TG_WOBBLESKY_CUBE&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|cubemap.?s&lt;br /&gt;
|(insert map name here - Hidden Hands 1?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;fogLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|fog.?s&lt;br /&gt;
|(insert map name here - Heart of Lone Salvation?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(legacy gl texgen&#039;s)&lt;br /&gt;
|Replacement for deprecated texgen code. Light material &amp;quot;blendLight&amp;quot;&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|blend.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(shadow.vp)&lt;br /&gt;
|ARB2 to GLSL manual conversion&lt;br /&gt;
|Stable in 2.07&lt;br /&gt;
|stencilshadow.?s&lt;br /&gt;
|(insert map name here - Closemouthed Shadows?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25405</id>
		<title>Replacing ARB shaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Replacing_ARB_shaders&amp;diff=25405"/>
		<updated>2019-05-27T07:06:27Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This table should summarize the current state for every ARB shader.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Filename&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;100px&amp;quot;|Status&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;200px&amp;quot;|Replacement&lt;br /&gt;
!bgcolor=#d0d0e0|Testing instructions &amp;amp; Comments&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|heatHazeWithDepth.vfp &lt;br /&gt;
|Material&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|heatHazeWithDepth.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
everything behind glass should be warped as you strafe along it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|environment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|environment.?s&lt;br /&gt;
|&amp;lt;tt&amp;gt;map test/glass&amp;lt;/tt&amp;gt;&lt;br /&gt;
fake yellow reflections should be visible on the windows&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|bumpyEnvironment.vfp&lt;br /&gt;
|Ambient&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|bumpyEnvironment.?s&lt;br /&gt;
|PD2: All the Way Up / &amp;lt;tt&amp;gt;setviewpos 4700 -250 -250&amp;lt;/tt&amp;gt; / [http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-3#entry435255 link]&lt;br /&gt;
Potions should look properly: see t_useGLSL 0, r_uniformTransforms 0 for reference&lt;br /&gt;
Be sure to check that fake reflection texture is oriented the same way.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|Designed for use in the &#039;old stage&#039; routine (draw_common.cpp) but at some point became the &#039;default&#039; shader for GUI&#039;s, etc&lt;br /&gt;
|OK (2019.05.26)&lt;br /&gt;
|oldStage.?s&lt;br /&gt;
|Check any map (e.g. test/glass) + main menu&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|(fixed pipeline)&lt;br /&gt;
|DepthPass&lt;br /&gt;
|OK (2019.05.27)&lt;br /&gt;
|depthAlpha.?s&lt;br /&gt;
|Check any map (e.g. test/glass).&lt;br /&gt;
Used for depth prepass, so if it uses incompatible vertex transform, everything would depth-fight like crazy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of shader &#039;&#039;&#039;Type&#039;&#039;&#039;s:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Material&#039;&#039;&#039;: shader filename is referenced in a stage of stock material definition.&lt;br /&gt;
: Currently, each of these shaders exists in both ARB and GLSL version, and GLSL version is used only if &amp;lt;tt&amp;gt;r_forceGlglPrograms&amp;lt;/tt&amp;gt; is set.&lt;br /&gt;
* &#039;&#039;&#039;FM&#039;&#039;&#039;: shader supplied or overrided by a particular FM --- most likely, specified in material definition.&lt;br /&gt;
* &#039;&#039;&#039;Ambient&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, independent of any light source.&lt;br /&gt;
* &#039;&#039;&#039;Interaction&#039;&#039;&#039;: shader is loaded directly by C++ code and used during rendering, in a light-surface interaction.&lt;br /&gt;
* &#039;&#039;&#039;Postprocessing&#039;&#039;&#039;: shader used for full-screen effects after main rendering is over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://forums.thedarkmod.com/topic/19801-arb-to-glsl-migration/page-5#entry437704 This post] explains different modes for testing.&lt;br /&gt;
In order to set OK &#039;&#039;&#039;Status&#039;&#039;&#039; to a shader, please check that it works properly with following settings:&lt;br /&gt;
* r_useGLSL 1&lt;br /&gt;
* r_forceGlslPrograms 1 (this is more complicated...)&lt;br /&gt;
* r_uniformTransforms 0 and 1 (both cases)&lt;br /&gt;
&lt;br /&gt;
Also set the date when you checked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Replacement&#039;&#039;&#039; should specify which files contain the equivalent or superseding code in GLSL.&lt;br /&gt;
If the replacing code is active only with some settings, write those settings under filename.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Testing instructions&#039;&#039;&#039; must explain how to properly test this shader to ensure that replacement works correctly.&lt;br /&gt;
Write exact FM/map, coordinates, settings, what to see/expect, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Talk:The_Dark_Mod_-_Compilation_Guide&amp;diff=19977</id>
		<title>Talk:The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Talk:The_Dark_Mod_-_Compilation_Guide&amp;diff=19977"/>
		<updated>2018-05-10T11:58:08Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Memo to myself, once the GPL-based TDM sources have been released:&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 11.10 x64 ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install g++ scons ia32-libs subversion m4 g++-multilib libglew1.6-dev &lt;br /&gt;
 libjpeg62-dev libpng12-dev libxxf86vm-dev libalut-dev libasound2-dev&lt;br /&gt;
&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 11.10 32 Bit ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install g++ scons m4 libglew1.6-dev libjpeg62-dev libpng12-dev libxxf86vm-dev libalut-dev libasound2-dev&lt;br /&gt;
&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Greebo|greebo]] 09:45, 4 January 2012 (EST)&lt;br /&gt;
&lt;br /&gt;
== Parallel Compiling ==&lt;br /&gt;
&lt;br /&gt;
To enable parallel building, use the JOBS=&amp;quot;N&amp;quot; option:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; JOBS=&amp;quot;8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2.06 on Windows ==&lt;br /&gt;
* DirectX SDK no longer used/needed&lt;br /&gt;
* gamex86.dll no longer produced. ExtLibs.dll was added on the other hand.&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Talk:The_Dark_Mod_-_Compilation_Guide&amp;diff=19976</id>
		<title>Talk:The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Talk:The_Dark_Mod_-_Compilation_Guide&amp;diff=19976"/>
		<updated>2018-05-10T11:56:50Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Memo to myself, once the GPL-based TDM sources have been released:&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 11.10 x64 ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install g++ scons ia32-libs subversion m4 g++-multilib libglew1.6-dev &lt;br /&gt;
 libjpeg62-dev libpng12-dev libxxf86vm-dev libalut-dev libasound2-dev&lt;br /&gt;
&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 11.10 32 Bit ==&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install g++ scons m4 libglew1.6-dev libjpeg62-dev libpng12-dev libxxf86vm-dev libalut-dev libasound2-dev&lt;br /&gt;
&lt;br /&gt;
Then just run the scons command to start compiling:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Greebo|greebo]] 09:45, 4 January 2012 (EST)&lt;br /&gt;
&lt;br /&gt;
== Parallel Compiling ==&lt;br /&gt;
&lt;br /&gt;
To enable parallel building, use the JOBS=&amp;quot;N&amp;quot; option:&lt;br /&gt;
&lt;br /&gt;
 scons BUILD=&amp;quot;release&amp;quot; BUILD_GAMEPAK=&amp;quot;1&amp;quot; JOBS=&amp;quot;8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2.06 on Windows ==&lt;br /&gt;
DirectX SDK no longer used/needed&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=19182</id>
		<title>Performance Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=19182"/>
		<updated>2017-04-17T08:12:24Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article relates to performance issues &#039;&#039;for players&#039;&#039;. For performance information &#039;&#039;for mappers&#039;&#039;, see [[Performance: Essential Must-Knows]]&lt;br /&gt;
&lt;br /&gt;
== Show FPS ==&lt;br /&gt;
&lt;br /&gt;
First, you can check how many {{abbr|FPS|frames per second}} are achieved by opening the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
 com_showFPS 1&lt;br /&gt;
&lt;br /&gt;
== Optimizing the OS performance ==&lt;br /&gt;
&lt;br /&gt;
=== Stop running programs in the background ===&lt;br /&gt;
&lt;br /&gt;
Programs running in the background might either eat up memory that is needed for Doom3, and thus cause swapping to the hard disk, or they might consume CPU time or other resources. &lt;br /&gt;
&lt;br /&gt;
This can cause either general slowdowns or &#039;&#039;hickups&#039;&#039; during game play.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Ensure that Programs are the main priority in the OS ===&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Advanced Tab again.&lt;br /&gt;
&lt;br /&gt;
You will see a section Processor Scheduling&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;Programs&amp;quot; then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== White-list TheDarkMod.exe in Security Software ===&lt;br /&gt;
&lt;br /&gt;
Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren&#039;t constantly scanning or interacting&lt;br /&gt;
&lt;br /&gt;
with TheDarkMod.exe. Add it to your security white-list.&lt;br /&gt;
&lt;br /&gt;
=== Priority and Affinity ===&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod to High Priority ====&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
You can also edit your Desktop shortcut to start in High priority:&lt;br /&gt;
&lt;br /&gt;
* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
* On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod Affinity ====&lt;br /&gt;
&lt;br /&gt;
If you have a limited number of cores or heavy background tasks are always consuming the&lt;br /&gt;
default cores, you can set The Dark Mod to run on a specific core via &amp;quot;affinity&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* Click the Performance Tab and look at the CPU display to see which cores are the least busy&lt;br /&gt;
* (On Windows 10, click the &amp;quot;Open Resource Monitor&amp;quot; link and then click the CPU tab and expand the right pane)&lt;br /&gt;
* Close the Resource Monitor and click the Processes Tab in Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe&lt;br /&gt;
* Mouse-over then click &amp;quot;Set Affinity&amp;quot; and uncheck cores you want to prevent TDM from using&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
As with Priority you can set Affinity in your shortcut.&lt;br /&gt;
&lt;br /&gt;
Example Target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /affinity 1 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The affinity number is not matched to the number in your performance screen.&lt;br /&gt;
For example &amp;quot;Core 0&amp;quot; in Task Manager is affinity 1. The values are in Octal so&lt;br /&gt;
the numbers go up:&lt;br /&gt;
&lt;br /&gt;
* Core 0 is 1&lt;br /&gt;
* Core 1 is 2&lt;br /&gt;
* Core 2 is 4&lt;br /&gt;
* Core 3 is 8&lt;br /&gt;
* Core 4 is 10&lt;br /&gt;
* Core 5 is 20&lt;br /&gt;
&lt;br /&gt;
To select multiple cores you need to use odd numbers.&lt;br /&gt;
&lt;br /&gt;
For example /affintiy 5 will enable Core 0 and Core 2. &lt;br /&gt;
&lt;br /&gt;
For a typical dual core CPU with Hyperthreading these will be your real cores &lt;br /&gt;
&lt;br /&gt;
whilst 1 and 3 will be virtual cores.&lt;br /&gt;
&lt;br /&gt;
==== Combined Example ====&lt;br /&gt;
&lt;br /&gt;
You can include both priority and affinity switches in your shortcut&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C:\Windows\System32\cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High /affinity 5 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two &#039;&#039;&#039;launch cvars&#039;&#039;&#039; ( See [[#Conventions|Conventions]]).&lt;br /&gt;
&lt;br /&gt;
As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it&#039;s best to&lt;br /&gt;
&lt;br /&gt;
use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).&lt;br /&gt;
&lt;br /&gt;
==== Process Management Note ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also either &amp;quot;End Task&amp;quot; on processes that you know you don&#039;t need or set them to &amp;quot;below normal&amp;quot; or &amp;quot;low&amp;quot; priority.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Moving these low priority processes to a different core via affinity is also an option.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it&#039;s best to set these to &amp;quot;low priority&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you are unsure what a process does, do not change it until you&#039;ve researched the process.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Desktop Effects ===&lt;br /&gt;
&lt;br /&gt;
(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Visual Effects tab.&lt;br /&gt;
&lt;br /&gt;
Check &amp;quot;Adjust for Best Performance&amp;quot; then click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Driver Considerations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(IdTech4) The Dark Mod is based on OpenGL 2.0. GPU manufacturers have largely ignored&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;issues with this older specification so a number of workarounds have been compiled&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by the community to attend to erroneous behaviors or poor performance.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Disable Catalyst AI ====&lt;br /&gt;
&lt;br /&gt;
(This is probably deprecated.)&lt;br /&gt;
&lt;br /&gt;
[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Rename the executable ====&lt;br /&gt;
&lt;br /&gt;
Most modern drivers have built-in profiles for the executable names of commercial games.&lt;br /&gt;
&lt;br /&gt;
Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations&lt;br /&gt;
&lt;br /&gt;
or even a Crossfire profile (I believe DarkAthena.exe had one.)&lt;br /&gt;
&lt;br /&gt;
Known working renames:&lt;br /&gt;
&lt;br /&gt;
DarkAthena.exe (thus far the most consistent improvement)&lt;br /&gt;
&lt;br /&gt;
Wolf2MP.exe&lt;br /&gt;
&lt;br /&gt;
Amnesia.exe&lt;br /&gt;
&lt;br /&gt;
Brink.exe&lt;br /&gt;
&lt;br /&gt;
Prey.exe&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Index Buffers ==== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useIndexBuffers &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
(Notes: This tweak will be set as default in v2.05)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable the Streamer Service ====&lt;br /&gt;
&lt;br /&gt;
Open your run dialog ({{key|Windows}} + {{key|R}}) or command prompt and type services.msc&lt;br /&gt;
&lt;br /&gt;
On the Extended Tab locate &amp;quot;Nvidia Streamer Network Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{RMB} Right-click it and choose &amp;quot;Stop&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once the service is stopped, {{RMB}} right click it again and choose Properties&lt;br /&gt;
&lt;br /&gt;
On the General Tab set Startup Type = Disabled then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
Do the same for &amp;quot;Nvidia Streamer Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also perform these steps for any services that you know can be manually started&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;or are not needed for your daily usage. (Obviously) Do not disable any service that you don&#039;t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;recognize or know is safe to disable.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Threaded Optimizations ====&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can also reduce or eliminate driver crashes or rendering anomalies.&lt;br /&gt;
&lt;br /&gt;
==== Lower in-driver quality settings ====&lt;br /&gt;
&lt;br /&gt;
AMD, Nvidia, and Intel all give users the option to lower texture quality and&lt;br /&gt;
&lt;br /&gt;
also have various quality &amp;quot;optimization&amp;quot; levels for texture LOD Bias and Anisotropy (Filtering).&lt;br /&gt;
&lt;br /&gt;
==== Try different driver versions ====&lt;br /&gt;
&lt;br /&gt;
Sometimes updating to the latest driver version or reverting to an older version&lt;br /&gt;
&lt;br /&gt;
will improve performance. Try a few revisions or ask about known good driver versions.&lt;br /&gt;
&lt;br /&gt;
This applies to both GPU drivers and &amp;quot;Motherboard Chipset Drivers&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Optimizing Dark Mod settings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The settings changes below generally can be changed independently of one another.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This means that if your want better settings in one aspect (such as AA) you can&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== Conventions ===&lt;br /&gt;
&lt;br /&gt;
Most of the changes demonstrated in this article are via &amp;quot;Console variables&amp;quot; [[Cvars_in_The_Dark_Mod|CVARS]].&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;seta&amp;quot; prefix is intended to save these settings permanently so that they are retained on restart and that&lt;br /&gt;
is what is used by Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Temporary Testing ====&lt;br /&gt;
&lt;br /&gt;
To temporarily test any settings, you can drop the &amp;quot;seta&amp;quot; and simply invoke the cvar and it&#039;s value (without double quotes) in&lt;br /&gt;
the console.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Open the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cm_backFaceCull 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Some CVAR changes in the console, such as vid_mode (resolution), r_multisamples (AA), r_swapInterval (V-Synch), image_anisotropy (AF)&lt;br /&gt;
cannot be changed without also invoking vid_restart.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See also: [[#Toggle_settings_in_realtime|Toggle settings in realtime]]&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== Launch Options ====&lt;br /&gt;
&lt;br /&gt;
You can also add the value as part of your of your target in your shortcut:&lt;br /&gt;
&lt;br /&gt;
Example with two cvars:&lt;br /&gt;
&lt;br /&gt;
*  {{RMB}} Right click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
*  On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
See also [[#Set_TheDarkMod_to_High_Priority|Set TheDarkMod to High Priority]]&lt;br /&gt;
&lt;br /&gt;
=== Run The Dark Mod in fullscreen ===&lt;br /&gt;
&lt;br /&gt;
Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.&lt;br /&gt;
&lt;br /&gt;
One reason for this is that windowed mode is forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_fullscreen &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Post-Processing ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu make sure post-processing is disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Set Object Detail to Low ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu lower the Object detail slider below normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_lod_bias &amp;quot;0.5&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg (see also [[Object_detail]] )&lt;br /&gt;
&lt;br /&gt;
=== Set the ambient shading to &amp;quot;Faster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Inside the settings, change the ambient rendering method to &amp;quot;Faster&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_ambient_method &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
(Note: Some preliminary tests in v2.05 show that the Enhanced Ambient is now faster than the &amp;quot;fast&amp;quot; texture based Ambient.)&lt;br /&gt;
&lt;br /&gt;
=== Set the interaction.vfp to &#039;Standard&#039; ===&lt;br /&gt;
&lt;br /&gt;
In the video settings menu, change the interaction shader to Standard.  Lighting will not look as good, but you may gain a few frames per second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_interaction_vfp_type &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Lower Anti-aliasing ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, set AA to a lower value or 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_multiSamples &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Note: Nvidia&#039;s in driver FXAA anti-aliasing setting is substantially faster than the multi-samples settings&lt;br /&gt;
in game. &lt;br /&gt;
&lt;br /&gt;
Doom 3 is far less susceptible to AA artifacts so this may be an acceptable alternative especially&lt;br /&gt;
if you are are running the game at native resolution (or nearly native). &lt;br /&gt;
&lt;br /&gt;
AMD has MLAA which may also work well in the same way.)&lt;br /&gt;
&lt;br /&gt;
=== Force Refresh Timing ===&lt;br /&gt;
&lt;br /&gt;
Some newer video cards may not properly report the refresh rate to this engine (typically digital output like DVI, HDMI, or DisplayPort)&lt;br /&gt;
This can cause lag, stutter, and uneven frame pacing.&lt;br /&gt;
&lt;br /&gt;
create an autoexec.cfg in your darkmod directory and set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_displayRefresh &amp;quot;60&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Obviously increase to match your available mode.)&lt;br /&gt;
&lt;br /&gt;
=== Disable V-sync ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, disable vsync&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_swapInterval &amp;quot;0&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
The Dark Mod has extremely variable FPS compared to modern titles due to it&#039;s substantial&lt;br /&gt;
CPU heavy renderer. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend disabling V-Sync altogether or forcing variable&lt;br /&gt;
V-sync tech such as G-Sync or Freesync in your driver settings while disabling it in-game.&lt;br /&gt;
&lt;br /&gt;
===Field of View Decrease===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.&lt;br /&gt;
&lt;br /&gt;
You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:&lt;br /&gt;
&lt;br /&gt;
 g_fov 85&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta g_fov &amp;quot;85&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine, you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...&lt;br /&gt;
&lt;br /&gt;
 g_fov 50&lt;br /&gt;
&lt;br /&gt;
or bind a toggle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle g_fov 50 90&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg so you can tap a key to go between FOV ranges.&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc. Not noticed any problem with restricted view.&lt;br /&gt;
&lt;br /&gt;
=== Reduce your resolution! ===&lt;br /&gt;
&lt;br /&gt;
On older cards, Doom3&#039;s render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most. For instance, at 1600x1200 the game needs to draw &#039;&#039;&#039;four times&#039;&#039;&#039; as many pixels as when running 800x600. The result with 800x600 will not look as bad as one might think &amp;amp;ndash; but the frame rate improvements might make it much more playable.&lt;br /&gt;
&lt;br /&gt;
If you cannot set the resolution you want in the settings menu then enter it in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
To edit Darkmod.cfg:&lt;br /&gt;
&lt;br /&gt;
* Uninstall any current mission in the New Mission menu.&lt;br /&gt;
* Close Dark Mod&lt;br /&gt;
* Edit Darkmod.cfg in the darkmod folder&lt;br /&gt;
* Re-install the mission.&lt;br /&gt;
* Whenever you UNinstall and install another mission, these changes will migrate to those FMs as well.&lt;br /&gt;
&lt;br /&gt;
(Alternatively, edit both the Darkmod.cfg in the darkmod folder AND the one in the current FM game folder, eg, fms\chalice.)&lt;br /&gt;
&lt;br /&gt;
Search down for these cvars first and replace them with the values shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;640&amp;quot;&lt;br /&gt;
 seta r_customWidth &amp;quot;480&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternate for wide screen monitors:&lt;br /&gt;
&lt;br /&gt;
16:9 ratio&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
seta r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
seta r_customheight &amp;quot;720&amp;quot;&lt;br /&gt;
seta r_aspectratio &amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also: [[Resolutions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Lower Anisotropic Filtering ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, lower or disable AF&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_anisotropy &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
(Note: This has very little performance benefit for most GPU hardware. This is also one of the few graphic settings&lt;br /&gt;
that can be adjusted without requiring a vid_restart or restarting the engine.)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Slow loading times ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Loading times for The Dark Mod are known to be on the long side. The main culprit is that the engine encodes mip-maps&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;when loading textures. In the future, we may be able to address this by compressing the normal maps or encoding them&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;in a format that includes mip-maps.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some users have reported modest benefits to loading time when upgrading to an SSD but given the bottle-neck above CPU&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;and RAM upgrades would likely be more beneficial.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Sometimes, beyond the normal expectation of slow loading, the load times are egregiously slow. In those cases it&#039;s&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;best to review the tuning options and workarounds below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. &lt;br /&gt;
One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: &lt;br /&gt;
if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt; The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0.&lt;br /&gt;
&lt;br /&gt;
NEW INFO 2: v2.05 will have a new image_mipmapmode cvar. 0 = Software (original), 1 = Legacy GL, 2 Modern (default).&lt;br /&gt;
&amp;lt;br&amp;gt; This will offload Mipmap generation to the video driver. Depending on the quality of your GPU driver this may improve or&lt;br /&gt;
&amp;lt;br&amp;gt; degrade texture loading performance. In my testing, mode 2 is a little slower than mode 0 on initial load but is substantially&lt;br /&gt;
&amp;lt;br&amp;gt; faster on reload or loading new FM&#039;s that use the same textures )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Disabling compression may lead to Malloc errors due to memory consumption. &lt;br /&gt;
&lt;br /&gt;
You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. [[#Image downsizing|Image Downsizing]]&lt;br /&gt;
&lt;br /&gt;
See [[#Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop|Malloc Failure Errors]]&lt;br /&gt;
&lt;br /&gt;
== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ==&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;Darkmod.cfg&#039;&#039;&#039; inside your darkmod folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useCachedDynamicModels &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useShadowVertexProgram &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useEntityCulling &amp;quot;1&amp;quot;&lt;br /&gt;
 seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt;The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0 as shown above. &lt;br /&gt;
&lt;br /&gt;
Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to&lt;br /&gt;
get past [[FAQ#Getting_.22Malloc_Failure_for_.23.23.23.23.23.23.23.22_crash-to-desktop | malloc errors]] for going over your memory limits.&lt;br /&gt;
&lt;br /&gt;
=== Configure Video RAM ===&lt;br /&gt;
&lt;br /&gt;
Change: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;128&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to the appropriate value (in MB) for your GPU in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
Eg. A 2GB video card would have 2048 there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;2048&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
===Lightgem interleaved calculation===&lt;br /&gt;
&lt;br /&gt;
By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once &lt;br /&gt;
&amp;lt;br&amp;gt; per several frames by setting tdm_lg_interleave console parameter to values higher than 1. &lt;br /&gt;
&amp;lt;br&amp;gt; For example, typing:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_interleave 3&lt;br /&gt;
&lt;br /&gt;
in console tells TDM to recalculate lightgem value every third frame.&lt;br /&gt;
&lt;br /&gt;
This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines&lt;br /&gt;
when your FPS is below 25 to 30FPS.&lt;br /&gt;
&lt;br /&gt;
NEW INFO:&lt;br /&gt;
&lt;br /&gt;
In v2.05, there is a new tdm_lg_interleave_min cvar which checks your current FPS and if you are below the configured value&lt;br /&gt;
&amp;lt;br&amp;gt; it reverts tdm_lg_interleave to 1 to reduce stutter at lower FPS values. The default value is 40 (eg. 40FPS).&lt;br /&gt;
&amp;lt;br&amp;gt; As the cost of lightgem calculation is (also) substantially lower in v2.05, you may be able to set this to 1 for most missions.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt; In testing, the only mission I found that suffered from &amp;quot;tdm_lg_interleave ( &amp;gt; 1) stuttering&amp;quot; was &amp;quot;Penny Dreadful 3: Erasing the Trail&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt; For that mission, I set tdm_lg_interleave_min to 50 to cure the stutter. &lt;br /&gt;
&amp;lt;br&amp;gt; This setting can also be used to boost already high FPS values for the new unbounded FPS options ( [[Performance_Tweaks#Disable_FPS_Lock | com_FixeTic 1]] ).&lt;br /&gt;
&amp;lt;br&amp;gt; (eg. If you have 90FPS set tdm_lg_interleave to 7 and tdm_lg_interleave_min to 75 to attempt a push towards 120FPS)&lt;br /&gt;
&lt;br /&gt;
===Split Lightgem===&lt;br /&gt;
&lt;br /&gt;
You can also split the calculation across frames so that part is done in one frame and part is done in the next:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_split 1&lt;br /&gt;
&lt;br /&gt;
Some folks have reported that this causes flicker but that was in older builds. &lt;br /&gt;
&lt;br /&gt;
I haven&#039;t seen any problems with this in recent builds. &lt;br /&gt;
&lt;br /&gt;
This will give a modest boost compared to interleave and both can be used together or independently.&lt;br /&gt;
&lt;br /&gt;
Eg: &lt;br /&gt;
&lt;br /&gt;
Keep tdm_lg_interleave 1 for to prevent stutter at low FPS but set tdm_lg_split to gain a little boost.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
Set tdm_lg_split to 1 to get you from 26 FPS to 28 FPS as a baseline, then set tdm_lg_interleave to 2 to&lt;br /&gt;
gain a substantial boost (up to double FPS) but since the baseline is close to 30FPS the risk of stutter is&lt;br /&gt;
substantially reduced.&lt;br /&gt;
&lt;br /&gt;
NEW INFO:&lt;br /&gt;
&lt;br /&gt;
In v2.05 tdm_lg_split will be enabled (1) by default.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also [[#Weak_Lightgem | Weak Lightgem]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Image downsizing ===&lt;br /&gt;
&lt;br /&gt;
As a last resort, you may enable image downsizing:  in Darkmod.cfg, set &#039;&#039;&#039;image_downSize&#039;&#039;&#039; to &#039;&#039;&#039;1&#039;&#039;&#039; and then set a limit with &#039;&#039;&#039;image_downSizeLimit&#039;&#039;&#039;, e.g., &#039;&#039;&#039;&amp;quot;image_downSizeLimit&amp;quot; &amp;quot;256&amp;quot;&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSize &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This reduces texture memory requirements and may completely alleviate hard drive thrashing.  &lt;br /&gt;
There are similar cvars for bump and specular maps as well. &lt;br /&gt;
&lt;br /&gt;
Example: Downsize Normal Maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Downsize Specular maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeSpecular &amp;quot;0&amp;quot;&lt;br /&gt;
seta image_downSizeSpecularLimit &amp;quot;64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: We recommend that you disable post-processing before using image_downsize.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; If you set image_downsizeLimit below 512, part or all of the screen wont render when post-processing enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If any image_downSizeLimit is set below your screen resolution, you will see visual errors when post-processing is enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Drop in Frame Rates when Viewing Water===&lt;br /&gt;
&lt;br /&gt;
Some players have reported a drastic drop in performance when an agitated water surface is in view. This on a Radeon card. Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_skipPostProcess &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set a key-bind to toggle this instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
See also [[FAQ#Underwater_performance_poor|Underwater performance poor]]&lt;br /&gt;
&lt;br /&gt;
=== Disabling standard graphics features ===&lt;br /&gt;
&lt;br /&gt;
At the cost of some pretty severe scene quality, you can disable a number of independent graphic features&lt;br /&gt;
&lt;br /&gt;
that are non-essential to play.&lt;br /&gt;
&lt;br /&gt;
==== Disable Soft Particles ====&lt;br /&gt;
&lt;br /&gt;
The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.&lt;br /&gt;
&lt;br /&gt;
This is offset by the fact that v2.03 and higher don&#039;t render particles during the lightgem calculation.&lt;br /&gt;
&lt;br /&gt;
Still, if you want an extra boost then set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useSoftParticles &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Fog ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipFogLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable BlendLights ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBlendLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Shadow====&lt;br /&gt;
&lt;br /&gt;
The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console: &lt;br /&gt;
&lt;br /&gt;
 g_showplayershadow 0&lt;br /&gt;
&lt;br /&gt;
Or, in Darkmod.cfg (see above) change the following line from &amp;quot;1&amp;quot; to &amp;quot;0&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 seta g_showplayershadow &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Lantern Shadow====&lt;br /&gt;
&lt;br /&gt;
You may notice a drop in performance while using the player lantern.&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows. This helps improve performance slightly when using the lantern.&lt;br /&gt;
&lt;br /&gt;
==== Disable Particles ====&lt;br /&gt;
&lt;br /&gt;
This will seriously mar your image quality. Flames, glares, and smoke will all be gone.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipParticles &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Specular Maps ====&lt;br /&gt;
&lt;br /&gt;
Specular gives materials their shine. This option will make all surfaces shine-free.&lt;br /&gt;
&lt;br /&gt;
Note: This may not work with the Enhanced Ambient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipSpecular &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Normal Maps ====&lt;br /&gt;
&lt;br /&gt;
The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.&lt;br /&gt;
&lt;br /&gt;
If you disable this your game will become really ugly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBump &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable FPS Lock ====&lt;br /&gt;
&lt;br /&gt;
(New in upcoming v2.05) Run one game tick per graphics frame, rather than fixed 60 ticks per second.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_fixedTic &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Sky ====&lt;br /&gt;
&lt;br /&gt;
(New in upcoming v2.05) Pitch black sky with no clouds, Moon, or stars&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta g_enablePortalSky &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Lip Sync ====&lt;br /&gt;
&lt;br /&gt;
AI will not play lipsync animations&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_ai_opt_nolipsync &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
== Lower Sound Quality ==&lt;br /&gt;
&lt;br /&gt;
You can force 22khz audio processing to reduce the CPU overhead of audio processing.&lt;br /&gt;
&lt;br /&gt;
Obviously, EAX effects will increase CPU load for audio so you should consider disabling&lt;br /&gt;
&lt;br /&gt;
those before lowering audio quality. If normal audio plays fine but EAX causes performace,&lt;br /&gt;
&lt;br /&gt;
this change might give you a boost while EAX is enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta s_force22kHz &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Weak Lightgem ==&lt;br /&gt;
&lt;br /&gt;
Setting: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_lg_weak &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.&lt;br /&gt;
It&#039;s a far less accurate lightgem but may allow weaker systems to play the game as a second to last resort.&lt;br /&gt;
&lt;br /&gt;
(Note: The cost of lightgem calculation has been substantially lowered in the upcoming TDM v2.05. This may be an obsolete option in future releases.)&lt;br /&gt;
&lt;br /&gt;
==Gameplay Performance Tips==&lt;br /&gt;
&lt;br /&gt;
If you have done everything else you can and performance is still poor then one or two things you might do in game to help:&lt;br /&gt;
&lt;br /&gt;
* Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.&lt;br /&gt;
* Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)&lt;br /&gt;
* Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.&lt;br /&gt;
* Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.&lt;br /&gt;
&lt;br /&gt;
== Hardware Considerations ==&lt;br /&gt;
&lt;br /&gt;
The Dark Mod 1.0 was released in 2009. The average mission designer and player of that time had a Geforce 6600GT and AMD Athlon 64 X2 2GHZ.&lt;br /&gt;
&lt;br /&gt;
While some missions were playable all the way down to a P4 2.8GHZ with an FX5200, this is well below the expected audience for this project.&lt;br /&gt;
&lt;br /&gt;
Current Intel integrated GPU&#039;s have better performance than the Geforce 8800 that was a high-end card in 2009.&lt;br /&gt;
Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade your BIOS ===&lt;br /&gt;
&lt;br /&gt;
Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from&lt;br /&gt;
allowing the CPU or GPU to meet their potential. &lt;br /&gt;
&lt;br /&gt;
If your manufacturer has an updated motherboard BIOS available, consider applying it.&lt;br /&gt;
&lt;br /&gt;
=== Last resort: Upgrade your hardware ===&lt;br /&gt;
&lt;br /&gt;
Modern games need a lot of computing power, and while you don&#039;t need the absolutely newest hardware to play them, upgrading single components of your machine can help tremendously:&lt;br /&gt;
&lt;br /&gt;
* If you got &#039;&#039;&#039;less than 2 GByte&#039;&#039;&#039; main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.&lt;br /&gt;
* If you got a graphic card from NVidia older than the GF 7x00 series, consider upgrading it.&lt;br /&gt;
&lt;br /&gt;
Upgrading your CPU is possible in most cases but can be quite complicated &lt;br /&gt;
&lt;br /&gt;
and the cost might be so high that upgrading your whole PC might be a better value. &lt;br /&gt;
&lt;br /&gt;
Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.&lt;br /&gt;
&lt;br /&gt;
Some users have reported that SSD has improved loading times but the bigger problem with load times &lt;br /&gt;
&lt;br /&gt;
is Mip-Map generation which is CPU \ Memory bandwidth limited.&lt;br /&gt;
&lt;br /&gt;
== Toggle settings in realtime ==&lt;br /&gt;
&lt;br /&gt;
With the exception of Resolution, AA, and AF settings; most of the above settings can be changed in realtime&lt;br /&gt;
in the console or via a bind in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
For example, you could bind both post-processing and enhanced interaction to the Z key to enable and disable them both by pressing that key&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1; toggle tdm_interaction_vfp_type 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Blurry Briefing and Menu Screens==&lt;br /&gt;
&lt;br /&gt;
* Obsolete info. This is fixed in TDM 2.05&lt;br /&gt;
&lt;br /&gt;
If you get blurry briefing and menu screens then in Darkmod.cfg make sure you do NOT have image_downSize 0. &lt;br /&gt;
&lt;br /&gt;
Instead set it to 1. But see also [[#Image downsizing|Image Downsizing]] as there is a patch available to allow&lt;br /&gt;
&lt;br /&gt;
image_downsize without making menus blurry.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[http://www.tweakguides.com/Doom3_8.html | Tweakguides Doom 3]&lt;br /&gt;
&lt;br /&gt;
See also the [[FAQ]].&lt;br /&gt;
&lt;br /&gt;
{{installation}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=18877</id>
		<title>Performance Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=18877"/>
		<updated>2016-12-20T20:52:25Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article relates to performance issues &#039;&#039;for players&#039;&#039;. For performance information &#039;&#039;for mappers&#039;&#039;, see [[Performance: Essential Must-Knows]]&lt;br /&gt;
&lt;br /&gt;
== Show FPS ==&lt;br /&gt;
&lt;br /&gt;
First, you can check how many {{abbr|FPS|frames per second}} are achieved by opening the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
 com_showFPS 1&lt;br /&gt;
&lt;br /&gt;
== Optimizing the OS performance ==&lt;br /&gt;
&lt;br /&gt;
=== Stop running programs in the background ===&lt;br /&gt;
&lt;br /&gt;
Programs running in the background might either eat up memory that is needed for Doom3, and thus cause swapping to the hard disk, or they might consume CPU time or other resources. &lt;br /&gt;
&lt;br /&gt;
This can cause either general slowdowns or &#039;&#039;hickups&#039;&#039; during game play.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Ensure that Programs are the main priority in the OS ===&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Advanced Tab again.&lt;br /&gt;
&lt;br /&gt;
You will see a section Processor Scheduling&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;Programs&amp;quot; then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== White-list TheDarkMod.exe in Security Software ===&lt;br /&gt;
&lt;br /&gt;
Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren&#039;t constantly scanning or interacting&lt;br /&gt;
&lt;br /&gt;
with TheDarkMod.exe. Add it to your security white-list.&lt;br /&gt;
&lt;br /&gt;
=== Priority and Affinity ===&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod to High Priority ====&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
You can also edit your Desktop shortcut to start in High priority:&lt;br /&gt;
&lt;br /&gt;
* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
* On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod Affinity ====&lt;br /&gt;
&lt;br /&gt;
If you have a limited number of cores or heavy background tasks are always consuming the&lt;br /&gt;
default cores, you can set The Dark Mod to run on a specific core via &amp;quot;affinity&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* Click the Performance Tab and look at the CPU display to see which cores are the least busy&lt;br /&gt;
* (On Windows 10, click the &amp;quot;Open Resource Monitor&amp;quot; link and then click the CPU tab and expand the right pane)&lt;br /&gt;
* Close the Resource Monitor and click the Processes Tab in Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe&lt;br /&gt;
* Mouse-over then click &amp;quot;Set Affinity&amp;quot; and uncheck cores you want to prevent TDM from using&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
As with Priority you can set Affinity in your shortcut.&lt;br /&gt;
&lt;br /&gt;
Example Target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /affinity 1 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The affinity number is not matched to the number in your performance screen.&lt;br /&gt;
For example &amp;quot;Core 0&amp;quot; in Task Manager is affinity 1. The values are in Octal so&lt;br /&gt;
the numbers go up:&lt;br /&gt;
&lt;br /&gt;
* Core 0 is 1&lt;br /&gt;
* Core 1 is 2&lt;br /&gt;
* Core 2 is 4&lt;br /&gt;
* Core 3 is 8&lt;br /&gt;
* Core 4 is 10&lt;br /&gt;
* Core 5 is 20&lt;br /&gt;
&lt;br /&gt;
To select multiple cores you need to use odd numbers.&lt;br /&gt;
&lt;br /&gt;
For example /affintiy 5 will enable Core 0 and Core 2. &lt;br /&gt;
&lt;br /&gt;
For a typical dual core CPU with Hyperthreading these will be your real cores &lt;br /&gt;
&lt;br /&gt;
whilst 1 and 3 will be virtual cores.&lt;br /&gt;
&lt;br /&gt;
==== Combined Example ====&lt;br /&gt;
&lt;br /&gt;
You can include both priority and affinity switches in your shortcut&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C:\Windows\System32\cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High /affinity 5 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two &#039;&#039;&#039;launch cvars&#039;&#039;&#039; ( See [[#Conventions|Conventions]]).&lt;br /&gt;
&lt;br /&gt;
As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it&#039;s best to&lt;br /&gt;
&lt;br /&gt;
use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).&lt;br /&gt;
&lt;br /&gt;
==== Process Management Note ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also either &amp;quot;End Task&amp;quot; on processes that you know you don&#039;t need or set them to &amp;quot;below normal&amp;quot; or &amp;quot;low&amp;quot; priority.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Moving these low priority processes to a different core via affinity is also an option.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it&#039;s best to set these to &amp;quot;low priority&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you are unsure what a process does, do not change it until you&#039;ve researched the process.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Desktop Effects ===&lt;br /&gt;
&lt;br /&gt;
(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Visual Effects tab.&lt;br /&gt;
&lt;br /&gt;
Check &amp;quot;Adjust for Best Performance&amp;quot; then click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Driver Considerations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(IdTech4) The Dark Mod is based on OpenGL 2.0. GPU manufacturers have largely ignored&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;issues with this older specification so a number of workarounds have been compiled&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by the community to attend to erroneous behaviors or poor performance.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Disable Catalyst AI ====&lt;br /&gt;
&lt;br /&gt;
(This is probably deprecated.)&lt;br /&gt;
&lt;br /&gt;
[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Rename the executable ====&lt;br /&gt;
&lt;br /&gt;
Most modern drivers have built-in profiles for the executable names of commercial games.&lt;br /&gt;
&lt;br /&gt;
Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations&lt;br /&gt;
&lt;br /&gt;
or even a Crossfire profile (I believe DarkAthena.exe had one.)&lt;br /&gt;
&lt;br /&gt;
Known working renames:&lt;br /&gt;
&lt;br /&gt;
DarkAthena.exe (thus far the most consistent improvement)&lt;br /&gt;
&lt;br /&gt;
Wolf2MP.exe&lt;br /&gt;
&lt;br /&gt;
Amnesia.exe&lt;br /&gt;
&lt;br /&gt;
Brink.exe&lt;br /&gt;
&lt;br /&gt;
Prey.exe&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Index Buffers ==== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useIndexBuffers &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
(Note: This tweak may not work with upcoming changes to The Dark Mod so revert it before upgrading)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable the Streamer Service ====&lt;br /&gt;
&lt;br /&gt;
Open your run dialog ({{key|Windows}} + {{key|R}}) or command prompt and type services.msc&lt;br /&gt;
&lt;br /&gt;
On the Extended Tab locate &amp;quot;Nvidia Streamer Network Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{RMB} Right-click it and choose &amp;quot;Stop&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once the service is stopped, {{RMB}} right click it again and choose Properties&lt;br /&gt;
&lt;br /&gt;
On the General Tab set Startup Type = Disabled then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
Do the same for &amp;quot;Nvidia Streamer Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also perform these steps for any services that you know can be manually started&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;or are not needed for your daily usage. (Obviously) Do not disable any service that you don&#039;t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;recognize or know is safe to disable.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Threaded Optimizations ====&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can also reduce or eliminate driver crashes or rendering anomalies.&lt;br /&gt;
&lt;br /&gt;
==== Lower in-driver quality settings ====&lt;br /&gt;
&lt;br /&gt;
AMD, Nvidia, and Intel all give users the option to lower texture quality and&lt;br /&gt;
&lt;br /&gt;
also have various quality &amp;quot;optimization&amp;quot; levels for texture LOD Bias and Anisotropy (Filtering).&lt;br /&gt;
&lt;br /&gt;
==== Try different driver versions ====&lt;br /&gt;
&lt;br /&gt;
Sometimes updating to the latest driver version or reverting to an older version&lt;br /&gt;
&lt;br /&gt;
will improve performance. Try a few revisions or ask about known good driver versions.&lt;br /&gt;
&lt;br /&gt;
This applies to both GPU drivers and &amp;quot;Motherboard Chipset Drivers&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Optimizing Dark Mod settings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The settings changes below generally can be changed independently of one another.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This means that if your want better settings in one aspect (such as AA) you can&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== Conventions ===&lt;br /&gt;
&lt;br /&gt;
Most of the changes demonstrated in this article are via &amp;quot;Console variables&amp;quot; [[Cvars_in_The_Dark_Mod|CVARS]].&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;seta&amp;quot; prefix is intended to save these settings permanently so that they are retained on restart and that&lt;br /&gt;
is what is used by Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Temporary Testing ====&lt;br /&gt;
&lt;br /&gt;
To temporarily test any settings, you can drop the &amp;quot;seta&amp;quot; and simply invoke the cvar and it&#039;s value (without double quotes) in&lt;br /&gt;
the console.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Open the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cm_backFaceCull 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Some CVAR changes in the console, such as vid_mode (resolution), r_multisamples (AA), r_swapInterval (V-Synch), image_anisotropy (AF)&lt;br /&gt;
cannot be changed without also invoking vid_restart.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See also: [[#Toggle_settings_in_realtime|Toggle settings in realtime]]&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== Launch Options ====&lt;br /&gt;
&lt;br /&gt;
You can also add the value as part of your of your target in your shortcut:&lt;br /&gt;
&lt;br /&gt;
Example with two cvars:&lt;br /&gt;
&lt;br /&gt;
*  {{RMB}} Right click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
*  On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
See also [[#Set_TheDarkMod_to_High_Priority|Set TheDarkMod to High Priority]]&lt;br /&gt;
&lt;br /&gt;
=== Run The Dark Mod in fullscreen ===&lt;br /&gt;
&lt;br /&gt;
Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.&lt;br /&gt;
&lt;br /&gt;
One reason for this is that windowed mode is forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_fullscreen &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Post-Processing ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu make sure post-processing is disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Set Object Detail to Low ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu lower the Object detail slider below normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_lod_bias &amp;quot;0.5&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg (see also [[Object_detail]] )&lt;br /&gt;
&lt;br /&gt;
=== Set the ambient shading to &amp;quot;Faster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Inside the settings, change the ambient rendering method to &amp;quot;Faster&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_ambient_method &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Set the interaction.vfp to &#039;Standard&#039; ===&lt;br /&gt;
&lt;br /&gt;
In the video settings menu, change the interaction shader to Standard.  Lighting will not look as good, but you may gain a few frames per second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_interaction_vfp_type &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Lower Anti-aliasing ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, set AA to a lower value or 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_multiSamples &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Disable V-sync ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, disable vsync&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_swapInterval &amp;quot;0&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
The Dark Mod has extremely variable FPS compared to modern titles due to it&#039;s substantial&lt;br /&gt;
CPU heavy renderer. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend disabling V-Sync altogether or forcing variable&lt;br /&gt;
V-sync tech such as G-Sync or Freesync in your driver settings while disabling it in-game.&lt;br /&gt;
&lt;br /&gt;
===Field of View Decrease===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.&lt;br /&gt;
&lt;br /&gt;
You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:&lt;br /&gt;
&lt;br /&gt;
 g_fov 85&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta g_fov &amp;quot;85&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine, you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...&lt;br /&gt;
&lt;br /&gt;
 g_fov 50&lt;br /&gt;
&lt;br /&gt;
or bind a toggle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle g_fov 50 90&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg so you can tap a key to go between FOV ranges.&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc. Not noticed any problem with restricted view.&lt;br /&gt;
&lt;br /&gt;
=== Reduce your resolution! ===&lt;br /&gt;
&lt;br /&gt;
On older cards, Doom3&#039;s render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most. For instance, at 1600x1200 the game needs to draw &#039;&#039;&#039;four times&#039;&#039;&#039; as many pixels as when running 800x600. The result with 800x600 will not look as bad as one might think &amp;amp;ndash; but the frame rate improvements might make it much more playable.&lt;br /&gt;
&lt;br /&gt;
If you cannot set the resolution you want in the settings menu then enter it in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
To edit Darkmod.cfg:&lt;br /&gt;
&lt;br /&gt;
* Uninstall any current mission in the New Mission menu.&lt;br /&gt;
* Close Dark Mod&lt;br /&gt;
* Edit Darkmod.cfg in the darkmod folder&lt;br /&gt;
* Re-install the mission.&lt;br /&gt;
* Whenever you UNinstall and install another mission, these changes will migrate to those FMs as well.&lt;br /&gt;
&lt;br /&gt;
(Alternatively, edit both the Darkmod.cfg in the darkmod folder AND the one in the current FM game folder, eg, fms\chalice.)&lt;br /&gt;
&lt;br /&gt;
Search down for these cvars first and replace them with the values shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;640&amp;quot;&lt;br /&gt;
 seta r_customWidth &amp;quot;480&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternate for wide screen monitors:&lt;br /&gt;
&lt;br /&gt;
16:9 ratio&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
seta r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
seta r_customheight &amp;quot;720&amp;quot;&lt;br /&gt;
seta r_aspectratio &amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also: [[Resolutions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Lower Anisotropic Filtering ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, lower or disable AF&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_anisotropy &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Slow loading times ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Loading times for The Dark Mod are known to be on the long side. The main culprit is that the engine encodes mip-maps&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;when loading textures. In the future, we may be able to address this by compressing the normal maps or encoding them&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;in a format that includes mip-maps.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some users have reported modest benefits to loading time when upgrading to an SSD but given the bottle-neck above CPU&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;and RAM upgrades would likely be more beneficial.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Sometimes, beyond the normal expectation of slow loading, the load times are egregiously slow. In those cases it&#039;s&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;best to review the tuning options and workarounds below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. &lt;br /&gt;
One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: &lt;br /&gt;
if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt; The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Disabling compression may lead to Malloc errors due to memory consumption. &lt;br /&gt;
&lt;br /&gt;
You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. [[#Image downsizing|Image Downsizing]]&lt;br /&gt;
&lt;br /&gt;
See [[#Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop|Malloc Failure Errors]]&lt;br /&gt;
&lt;br /&gt;
== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ==&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;Darkmod.cfg&#039;&#039;&#039; inside your darkmod folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useCachedDynamicModels &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useShadowVertexProgram &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useEntityCulling &amp;quot;1&amp;quot;&lt;br /&gt;
 seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt;The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0 as shown above. &lt;br /&gt;
&lt;br /&gt;
Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to&lt;br /&gt;
get past [[FAQ#Getting_.22Malloc_Failure_for_.23.23.23.23.23.23.23.22_crash-to-desktop | malloc errors]] for going over your memory limits.&lt;br /&gt;
&lt;br /&gt;
=== Configure Video RAM ===&lt;br /&gt;
&lt;br /&gt;
Change: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;128&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to the appropriate value (in MB) for your GPU in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
Eg. A 2GB video card would have 2048 there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;2048&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
===Lightgem interleaved calculation===&lt;br /&gt;
&lt;br /&gt;
By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once per several frames by setting tdm_lg_interleave console parameter to values higher than 1. For example, typing:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_interleave 3&lt;br /&gt;
&lt;br /&gt;
in console tells TDM to recalculate lightgem value every third frame.&lt;br /&gt;
&lt;br /&gt;
This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines&lt;br /&gt;
when your FPS is below 25 to 30FPS.&lt;br /&gt;
&lt;br /&gt;
You can also split the calculation across frames so that part is done in one frame and part is done in the next:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_split 1&lt;br /&gt;
&lt;br /&gt;
Some folks have reported that this causes flicker but that was in older builds. &lt;br /&gt;
&lt;br /&gt;
I haven&#039;t seen any problems with this in recent builds. &lt;br /&gt;
&lt;br /&gt;
This will give a modest boost compared to interleave and both can be used together or independently.&lt;br /&gt;
&lt;br /&gt;
Eg: &lt;br /&gt;
&lt;br /&gt;
Keep tdm_lg_interleave 1 for to prevent stutter at low FPS but set tdm_lg_split to gain a little boost.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
Set tdm_lg_split to 1 to get you from 26 FPS to 28 FPS as a baseline, then set tdm_lg_interleave to 2 to&lt;br /&gt;
gain a substantial boost (up to double FPS) but since the baseline is close to 30FPS the risk of stutter is&lt;br /&gt;
substantially reduced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also [[#Weak_Lightgem | Weak Lightgem]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Image downsizing ===&lt;br /&gt;
&lt;br /&gt;
As a last resort, you may enable image downsizing:  in Darkmod.cfg, set &#039;&#039;&#039;image_downSize&#039;&#039;&#039; to &#039;&#039;&#039;1&#039;&#039;&#039; and then set a limit with &#039;&#039;&#039;image_downSizeLimit&#039;&#039;&#039;, e.g., &#039;&#039;&#039;&amp;quot;image_downSizeLimit&amp;quot; &amp;quot;256&amp;quot;&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSize &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This reduces texture memory requirements and may completely alleviate hard drive thrashing.  &lt;br /&gt;
There are similar cvars for bump and specular maps as well. &lt;br /&gt;
&lt;br /&gt;
Example: Downsize Normal Maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Downsize Specular maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeSpecular &amp;quot;0&amp;quot;&lt;br /&gt;
seta image_downSizeSpecularLimit &amp;quot;64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This may result in very blurry briefing and menu screens.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This patch will prevent that until the fix is included in a TDM release:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://forums.thedarkmod.com/topic/11058-things-that-could-be-improved/page-73#entry392752&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: We recommend that you disable post-processing before using image_downsize.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; If you set image_downsizeLimit below 512, part or all of the screen wont render when post-processing enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If any image_downSizeLimit is set below your screen resolution, you will see visual errors when post-processing is enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Drop in Frame Rates when Viewing Water===&lt;br /&gt;
&lt;br /&gt;
Some players have reported a drastic drop in performance when an agitated water surface is in view. This on a Radeon card. Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_skipPostProcess &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set a key-bind to toggle this instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
See also [[FAQ#Underwater_performance_poor|Underwater performance poor]]&lt;br /&gt;
&lt;br /&gt;
=== Disabling standard graphics features ===&lt;br /&gt;
&lt;br /&gt;
At the cost of some pretty severe scene quality, you can disable a number of independent graphic features&lt;br /&gt;
&lt;br /&gt;
that are non-essential to play.&lt;br /&gt;
&lt;br /&gt;
==== Disable Soft Particles ====&lt;br /&gt;
&lt;br /&gt;
The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.&lt;br /&gt;
&lt;br /&gt;
This is offset by the fact that v2.03 and higher don&#039;t render particles during the lightgem calculation.&lt;br /&gt;
&lt;br /&gt;
Still, if you want an extra boost then set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useSoftParticles &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Fog ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipFogLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable BlendLights ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBlendLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Shadow====&lt;br /&gt;
&lt;br /&gt;
The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console: &lt;br /&gt;
&lt;br /&gt;
 g_showplayershadow 0&lt;br /&gt;
&lt;br /&gt;
Or, in Darkmod.cfg (see above) change the following line from &amp;quot;1&amp;quot; to &amp;quot;0&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 seta g_showplayershadow &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Lantern Shadow====&lt;br /&gt;
&lt;br /&gt;
You may notice a drop in performance while using the player lantern.&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows. This helps improve performance slightly when using the lantern.&lt;br /&gt;
&lt;br /&gt;
==== Disable Particles ====&lt;br /&gt;
&lt;br /&gt;
This will seriously mar your image quality. Flames, glares, and smoke will all be gone.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipParticles &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Specular Maps ====&lt;br /&gt;
&lt;br /&gt;
Specular gives materials their shine. This option will make all surfaces shine-free.&lt;br /&gt;
&lt;br /&gt;
Note: This may not work with the Enhanced Ambient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipSpecular &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Normal Maps ====&lt;br /&gt;
&lt;br /&gt;
The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.&lt;br /&gt;
&lt;br /&gt;
If you disable this your game will become really ugly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBump &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable FPS Lock ====&lt;br /&gt;
&lt;br /&gt;
Run one game tick per graphics frame, rather than fixed 60 ticks per second.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_fixedTic &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Sky ====&lt;br /&gt;
&lt;br /&gt;
Pitch black sky with no clouds, Moon, or stars&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta g_enablePortalSky &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
== Lower Sound Quality ==&lt;br /&gt;
&lt;br /&gt;
You can force 22khz audio processing to reduce the CPU overhead of audio processing.&lt;br /&gt;
&lt;br /&gt;
Obviously, EAX effects will increase CPU load for audio so you should consider disabling&lt;br /&gt;
&lt;br /&gt;
those before lowering audio quality. If normal audio plays fine but EAX causes performace,&lt;br /&gt;
&lt;br /&gt;
this change might give you a boost while EAX is enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta s_force22kHz &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Weak Lightgem ==&lt;br /&gt;
&lt;br /&gt;
Setting: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_lg_weak &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.&lt;br /&gt;
It&#039;s a far less accurate lightgem but may allow weaker systems to play the game as a second to last resort.&lt;br /&gt;
&lt;br /&gt;
==Gameplay Performance Tips==&lt;br /&gt;
&lt;br /&gt;
If you have done everything else you can and performance is still poor then one or two things you might do in game to help:&lt;br /&gt;
&lt;br /&gt;
* Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.&lt;br /&gt;
* Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)&lt;br /&gt;
* Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.&lt;br /&gt;
* Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.&lt;br /&gt;
&lt;br /&gt;
== Hardware Considerations ==&lt;br /&gt;
&lt;br /&gt;
The Dark Mod 1.0 was released in 2009. The average mission designer and player of that time had a Geforce 6600GT and AMD Athlon 64 X2 2GHZ.&lt;br /&gt;
&lt;br /&gt;
While some missions were playable all the way down to a P4 2.8GHZ with an FX5200, this is well below the expected audience for this project.&lt;br /&gt;
&lt;br /&gt;
Current Intel integrated GPU&#039;s have better performance than the Geforce 8800 that was a high-end card in 2009.&lt;br /&gt;
Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade your BIOS ===&lt;br /&gt;
&lt;br /&gt;
Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from&lt;br /&gt;
allowing the CPU or GPU to meet their potential. &lt;br /&gt;
&lt;br /&gt;
If your manufacturer has an updated motherboard BIOS available, consider applying it.&lt;br /&gt;
&lt;br /&gt;
=== Last resort: Upgrade your hardware ===&lt;br /&gt;
&lt;br /&gt;
Modern games need a lot of computing power, and while you don&#039;t need the absolutely newest hardware to play them, upgrading single components of your machine can help tremendously:&lt;br /&gt;
&lt;br /&gt;
* If you got &#039;&#039;&#039;less than 2 GByte&#039;&#039;&#039; main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.&lt;br /&gt;
* If you got a graphic card from NVidia older than the GF 7x00 series, consider upgrading it.&lt;br /&gt;
&lt;br /&gt;
Upgrading your CPU is possible in most cases but can be quite complicated &lt;br /&gt;
&lt;br /&gt;
and the cost might be so high that upgrading your whole PC might be a better value. &lt;br /&gt;
&lt;br /&gt;
Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.&lt;br /&gt;
&lt;br /&gt;
Some users have reported that SSD has improved loading times but the bigger problem with load times &lt;br /&gt;
&lt;br /&gt;
is Mip-Map generation which is CPU \ Memory bandwidth limited.&lt;br /&gt;
&lt;br /&gt;
== Toggle settings in realtime ==&lt;br /&gt;
&lt;br /&gt;
With the exception of Resolution, AA, and AF settings; most of the above settings can be changed in realtime&lt;br /&gt;
in the console or via a bind in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
For example, you could bind both post-processing and enhanced interaction to the Z key to enable and disable them both by pressing that key&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1; toggle tdm_interaction_vfp_type 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Blurry Briefing and Menu Screens==&lt;br /&gt;
&lt;br /&gt;
If you get blurry briefing and menu screens then in Darkmod.cfg make sure you do NOT have image_downSize 0. &lt;br /&gt;
&lt;br /&gt;
Instead set it to 1. But see also [[#Image downsizing|Image Downsizing]] as there is a patch available to allow&lt;br /&gt;
&lt;br /&gt;
image_downsize without making menus blurry.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[http://www.tweakguides.com/Doom3_8.html | Tweakguides Doom 3]&lt;br /&gt;
&lt;br /&gt;
See also the [[FAQ]].&lt;br /&gt;
&lt;br /&gt;
{{installation}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=18876</id>
		<title>Performance Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Performance_Tweaks&amp;diff=18876"/>
		<updated>2016-12-20T20:50:23Z</updated>

		<summary type="html">&lt;p&gt;Duzenko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article relates to performance issues &#039;&#039;for players&#039;&#039;. For performance information &#039;&#039;for mappers&#039;&#039;, see [[Performance: Essential Must-Knows]]&lt;br /&gt;
&lt;br /&gt;
== Show FPS ==&lt;br /&gt;
&lt;br /&gt;
First, you can check how many {{abbr|FPS|frames per second}} are achieved by opening the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
 com_showFPS 1&lt;br /&gt;
&lt;br /&gt;
== Optimizing the OS performance ==&lt;br /&gt;
&lt;br /&gt;
=== Stop running programs in the background ===&lt;br /&gt;
&lt;br /&gt;
Programs running in the background might either eat up memory that is needed for Doom3, and thus cause swapping to the hard disk, or they might consume CPU time or other resources. &lt;br /&gt;
&lt;br /&gt;
This can cause either general slowdowns or &#039;&#039;hickups&#039;&#039; during game play.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Ensure that Programs are the main priority in the OS ===&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Advanced Tab again.&lt;br /&gt;
&lt;br /&gt;
You will see a section Processor Scheduling&lt;br /&gt;
&lt;br /&gt;
Choose &amp;quot;Programs&amp;quot; then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== White-list TheDarkMod.exe in Security Software ===&lt;br /&gt;
&lt;br /&gt;
Make sure that Windows Defender or Anti-Virus, Anti-Spyware, etc aren&#039;t constantly scanning or interacting&lt;br /&gt;
&lt;br /&gt;
with TheDarkMod.exe. Add it to your security white-list.&lt;br /&gt;
&lt;br /&gt;
=== Priority and Affinity ===&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod to High Priority ====&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe and mouse-over Set Priority and choose High&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
You can also edit your Desktop shortcut to start in High priority:&lt;br /&gt;
&lt;br /&gt;
* {{RMB}} Right-click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
* On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
==== Set TheDarkMod Affinity ====&lt;br /&gt;
&lt;br /&gt;
If you have a limited number of cores or heavy background tasks are always consuming the&lt;br /&gt;
default cores, you can set The Dark Mod to run on a specific core via &amp;quot;affinity&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Launch TheDarkMod&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to exit fullscreen&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: Do not start a mission or test map yet. If the 3D render is initialized it will take a long time to exit fullscreen and return to it.)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* {{key|Ctrl}} + {{key|Alt}} + {{key|Del}} to open your Task Manager&lt;br /&gt;
* Click the Performance Tab and look at the CPU display to see which cores are the least busy&lt;br /&gt;
* (On Windows 10, click the &amp;quot;Open Resource Monitor&amp;quot; link and then click the CPU tab and expand the right pane)&lt;br /&gt;
* Close the Resource Monitor and click the Processes Tab in Task Manager&lt;br /&gt;
* {{RMB}} Right-click on TheDarkMod.exe the choose &amp;quot;Go to Details&amp;quot;&lt;br /&gt;
* (On the details\processes pane) {{RMB}} Right-click on TheDarkMod.exe&lt;br /&gt;
* Mouse-over then click &amp;quot;Set Affinity&amp;quot; and uncheck cores you want to prevent TDM from using&lt;br /&gt;
* {{key|Alt}} + {{key|Enter}} to return to fullscreen&lt;br /&gt;
&lt;br /&gt;
As with Priority you can set Affinity in your shortcut.&lt;br /&gt;
&lt;br /&gt;
Example Target:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /affinity 1 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The affinity number is not matched to the number in your performance screen.&lt;br /&gt;
For example &amp;quot;Core 0&amp;quot; in Task Manager is affinity 1. The values are in Octal so&lt;br /&gt;
the numbers go up:&lt;br /&gt;
&lt;br /&gt;
* Core 0 is 1&lt;br /&gt;
* Core 1 is 2&lt;br /&gt;
* Core 2 is 4&lt;br /&gt;
* Core 3 is 8&lt;br /&gt;
* Core 4 is 10&lt;br /&gt;
* Core 5 is 20&lt;br /&gt;
&lt;br /&gt;
To select multiple cores you need to use odd numbers.&lt;br /&gt;
&lt;br /&gt;
For example /affintiy 5 will enable Core 0 and Core 2. &lt;br /&gt;
&lt;br /&gt;
For a typical dual core CPU with Hyperthreading these will be your real cores &lt;br /&gt;
&lt;br /&gt;
whilst 1 and 3 will be virtual cores.&lt;br /&gt;
&lt;br /&gt;
==== Combined Example ====&lt;br /&gt;
&lt;br /&gt;
You can include both priority and affinity switches in your shortcut&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
C:\Windows\System32\cmd.exe /c start &amp;quot;TheDarkMod&amp;quot; /High /affinity 5 &amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start TheDarkMod with high priority on Cores 0 and 2 (real cores) and add two &#039;&#039;&#039;launch cvars&#039;&#039;&#039; ( See [[#Conventions|Conventions]]).&lt;br /&gt;
&lt;br /&gt;
As you can see, you can make a huge launch string but once you go past 2 or 3 cvars it&#039;s best to&lt;br /&gt;
&lt;br /&gt;
use Darkmod.cfg unless you wish to make multiple launchers for testing (etc).&lt;br /&gt;
&lt;br /&gt;
==== Process Management Note ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also either &amp;quot;End Task&amp;quot; on processes that you know you don&#039;t need or set them to &amp;quot;below normal&amp;quot; or &amp;quot;low&amp;quot; priority.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Moving these low priority processes to a different core via affinity is also an option.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some processes, such as OneDrive.exe (which is integrated into the OS) will keep restarting so it&#039;s best to set these to &amp;quot;low priority&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If you are unsure what a process does, do not change it until you&#039;ve researched the process.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Desktop Effects ===&lt;br /&gt;
&lt;br /&gt;
(If you are willing to sacrifice you desktop visual behavior and effects for better TDM performance. Note: This can be reverted.)&lt;br /&gt;
&lt;br /&gt;
To begin the process, type sysdm.cpl in Run box ({{key|Windows}} + {{key|R}}) and hit {{key|Enter}} to open the System Properties. &lt;br /&gt;
&lt;br /&gt;
Select the Advanced tab and under Performance, {{LMB}} click on Settings. &lt;br /&gt;
&lt;br /&gt;
In the Performance Options box, select the Visual Effects tab.&lt;br /&gt;
&lt;br /&gt;
Check &amp;quot;Adjust for Best Performance&amp;quot; then click Apply.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Driver Considerations ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(IdTech4) The Dark Mod is based on OpenGL 2.0. GPU manufacturers have largely ignored&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;issues with this older specification so a number of workarounds have been compiled&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by the community to attend to erroneous behaviors or poor performance.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Disable Catalyst AI ====&lt;br /&gt;
&lt;br /&gt;
(This is probably deprecated.)&lt;br /&gt;
&lt;br /&gt;
[[FAQ#Disable_Catalyst_AI_in_recent_AMD_ATI_drivers|Disable Catalyst AI in recent AMD Drivers]]&lt;br /&gt;
&lt;br /&gt;
==== (AMD\ATI) Rename the executable ====&lt;br /&gt;
&lt;br /&gt;
Most modern drivers have built-in profiles for the executable names of commercial games.&lt;br /&gt;
&lt;br /&gt;
Renaming TheDarkMod.exe to the name of a commercial OpenGL game may gain you some optimizations&lt;br /&gt;
&lt;br /&gt;
or even a Crossfire profile (I believe DarkAthena.exe had one.)&lt;br /&gt;
&lt;br /&gt;
Known working renames:&lt;br /&gt;
&lt;br /&gt;
DarkAthena.exe (thus far the most consistent improvement)&lt;br /&gt;
&lt;br /&gt;
Wolf2MP.exe&lt;br /&gt;
&lt;br /&gt;
Amnesia.exe&lt;br /&gt;
&lt;br /&gt;
Brink.exe&lt;br /&gt;
&lt;br /&gt;
Prey.exe&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Index Buffers ==== &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useIndexBuffers &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
(Note: This tweak may not work with upcoming changes to The Dark Mod so revert it before upgrading)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable the Streamer Service ====&lt;br /&gt;
&lt;br /&gt;
Open your run dialog ({{key|Windows}} + {{key|R}}) or command prompt and type services.msc&lt;br /&gt;
&lt;br /&gt;
On the Extended Tab locate &amp;quot;Nvidia Streamer Network Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{RMB} Right-click it and choose &amp;quot;Stop&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once the service is stopped, {{RMB}} right click it again and choose Properties&lt;br /&gt;
&lt;br /&gt;
On the General Tab set Startup Type = Disabled then {{LMB}} click Apply.&lt;br /&gt;
&lt;br /&gt;
Do the same for &amp;quot;Nvidia Streamer Service&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You can also perform these steps for any services that you know can be manually started&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;or are not needed for your daily usage. (Obviously) Do not disable any service that you don&#039;t&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;recognize or know is safe to disable.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== (Nvidia) Disable Threaded Optimizations ====&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can also reduce or eliminate driver crashes or rendering anomalies.&lt;br /&gt;
&lt;br /&gt;
==== Lower in-driver quality settings ====&lt;br /&gt;
&lt;br /&gt;
AMD, Nvidia, and Intel all give users the option to lower texture quality and&lt;br /&gt;
&lt;br /&gt;
also have various quality &amp;quot;optimization&amp;quot; levels for texture LOD Bias and Anisotropy (Filtering).&lt;br /&gt;
&lt;br /&gt;
==== Try different driver versions ====&lt;br /&gt;
&lt;br /&gt;
Sometimes updating to the latest driver version or reverting to an older version&lt;br /&gt;
&lt;br /&gt;
will improve performance. Try a few revisions or ask about known good driver versions.&lt;br /&gt;
&lt;br /&gt;
This applies to both GPU drivers and &amp;quot;Motherboard Chipset Drivers&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
See also [[#Upgrade_your_BIOS|Upgrade your BIOS]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Optimizing Dark Mod settings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The settings changes below generally can be changed independently of one another.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This means that if your want better settings in one aspect (such as AA) you can&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;try reducing quality or disabling another aspect (such as post-processing, image_downsize, v-sync, etc)&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
=== Conventions ===&lt;br /&gt;
&lt;br /&gt;
Most of the changes demonstrated in this article are via &amp;quot;Console variables&amp;quot; [[Cvars_in_The_Dark_Mod|CVARS]].&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;seta&amp;quot; prefix is intended to save these settings permanently so that they are retained on restart and that&lt;br /&gt;
is what is used by Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Temporary Testing ====&lt;br /&gt;
&lt;br /&gt;
To temporarily test any settings, you can drop the &amp;quot;seta&amp;quot; and simply invoke the cvar and it&#039;s value (without double quotes) in&lt;br /&gt;
the console.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Open the console with {{key|Ctrl}}+{{key|Alt}}+{{key|~}} (tilde, {{key|^}} on German keyboards) and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cm_backFaceCull 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Some CVAR changes in the console, such as vid_mode (resolution), r_multisamples (AA), r_swapInterval (V-Synch), image_anisotropy (AF)&lt;br /&gt;
cannot be changed without also invoking vid_restart.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See also: [[#Toggle_settings_in_realtime|Toggle settings in realtime]]&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==== Launch Options ====&lt;br /&gt;
&lt;br /&gt;
You can also add the value as part of your of your target in your shortcut:&lt;br /&gt;
&lt;br /&gt;
Example with two cvars:&lt;br /&gt;
&lt;br /&gt;
*  {{RMB}} Right click your Desktop shortcut to TheDarkMod and select Properties&lt;br /&gt;
*  On the Shortcut Tab enter the following into the &amp;quot;Target:&amp;quot; field&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;C:\darkmod\TheDarkMod.exe&amp;quot; +cm_backFaceCull 1 +r_useEntityCulling 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Assuming you installed into C:\darkmod)&lt;br /&gt;
&lt;br /&gt;
* Then {{LMB}} click the Change Icon button and browse for the Darkmod.ico icon in your darkmod install path&lt;br /&gt;
* {{LMB}} Click Apply&lt;br /&gt;
&lt;br /&gt;
See also [[#Set_TheDarkMod_to_High_Priority|Set TheDarkMod to High Priority]]&lt;br /&gt;
&lt;br /&gt;
=== Run The Dark Mod in fullscreen ===&lt;br /&gt;
&lt;br /&gt;
Running Darkmod in windowed mode might be quite a bit slower than fullscreen mode.&lt;br /&gt;
&lt;br /&gt;
One reason for this is that windowed mode is forced to V-sync. ( See [[#Disable V-sync | Disable V-sync]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_fullscreen &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Disable Post-Processing ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu make sure post-processing is disabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Set Object Detail to Low ===&lt;br /&gt;
&lt;br /&gt;
In the advanced video settings menu lower the Object detail slider below normal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_lod_bias &amp;quot;0.5&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg (see also [[Object_detail]] )&lt;br /&gt;
&lt;br /&gt;
=== Set the ambient shading to &amp;quot;Faster&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Inside the settings, change the ambient rendering method to &amp;quot;Faster&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta tdm_ambient_method &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Set the interaction.vfp to &#039;Standard&#039; ===&lt;br /&gt;
&lt;br /&gt;
In the video settings menu, change the interaction shader to Standard.  Lighting will not look as good, but you may gain a few frames per second.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_interaction_vfp_type &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Lower Anti-aliasing ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, set AA to a lower value or 0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_multiSamples &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
=== Disable V-sync ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, disable vsync&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_swapInterval &amp;quot;0&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
The Dark Mod has extremely variable FPS compared to modern titles due to it&#039;s substantial&lt;br /&gt;
CPU heavy renderer. &lt;br /&gt;
&lt;br /&gt;
We strongly recommend disabling V-Sync altogether or forcing variable&lt;br /&gt;
V-sync tech such as G-Sync or Freesync in your driver settings while disabling it in-game.&lt;br /&gt;
&lt;br /&gt;
===Field of View Decrease===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that this setting might occasionally produce odd effects such as a grabbed object seems to move a little on release.&lt;br /&gt;
&lt;br /&gt;
You can get a performance improvement if you decrease the field of view. By default this is 90 degrees but you might try entering in the console:&lt;br /&gt;
&lt;br /&gt;
 g_fov 85&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta g_fov &amp;quot;85&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
In addition, if you are playing a mission that is too good to miss and reach a very low performance area which is almost unplayable on your machine, you might consider setting the field of view extremely low temporarily to get you through then restore to 90 later...&lt;br /&gt;
&lt;br /&gt;
 g_fov 50&lt;br /&gt;
&lt;br /&gt;
or bind a toggle&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle g_fov 50 90&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg so you can tap a key to go between FOV ranges.&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
Note from Fidcal: I have played comfortably on g_fov 75 and even think perhaps it makes nearby objects more realistically close so you can get right up to a table, etc. Not noticed any problem with restricted view.&lt;br /&gt;
&lt;br /&gt;
=== Reduce your resolution! ===&lt;br /&gt;
&lt;br /&gt;
On older cards, Doom3&#039;s render engine is very expensive for every per pixel drawn, and reducing the resolution will help the most. For instance, at 1600x1200 the game needs to draw &#039;&#039;&#039;four times&#039;&#039;&#039; as many pixels as when running 800x600. The result with 800x600 will not look as bad as one might think &amp;amp;ndash; but the frame rate improvements might make it much more playable.&lt;br /&gt;
&lt;br /&gt;
If you cannot set the resolution you want in the settings menu then enter it in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
To edit Darkmod.cfg:&lt;br /&gt;
&lt;br /&gt;
* Uninstall any current mission in the New Mission menu.&lt;br /&gt;
* Close Dark Mod&lt;br /&gt;
* Edit Darkmod.cfg in the darkmod folder&lt;br /&gt;
* Re-install the mission.&lt;br /&gt;
* Whenever you UNinstall and install another mission, these changes will migrate to those FMs as well.&lt;br /&gt;
&lt;br /&gt;
(Alternatively, edit both the Darkmod.cfg in the darkmod folder AND the one in the current FM game folder, eg, fms\chalice.)&lt;br /&gt;
&lt;br /&gt;
Search down for these cvars first and replace them with the values shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;640&amp;quot;&lt;br /&gt;
 seta r_customWidth &amp;quot;480&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
alternate for wide screen monitors:&lt;br /&gt;
&lt;br /&gt;
16:9 ratio&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
seta r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
seta r_customheight &amp;quot;720&amp;quot;&lt;br /&gt;
seta r_aspectratio &amp;quot;1&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also: [[Resolutions]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Lower Anisotropic Filtering ===&lt;br /&gt;
&lt;br /&gt;
In the standard video settings, lower or disable AF&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_anisotropy &amp;quot;0&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Slow loading times ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Loading times for The Dark Mod are known to be on the long side. The main culprit is that the engine encodes mip-maps&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;when loading textures. In the future, we may be able to address this by compressing the normal maps or encoding them&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;in a format that includes mip-maps.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Some users have reported modest benefits to loading time when upgrading to an SSD but given the bottle-neck above CPU&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;and RAM upgrades would likely be more beneficial.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Sometimes, beyond the normal expectation of slow loading, the load times are egregiously slow. In those cases it&#039;s&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;best to review the tuning options and workarounds below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. &lt;br /&gt;
One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: &lt;br /&gt;
if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt; The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: Disabling compression may lead to Malloc errors due to memory consumption. &lt;br /&gt;
&lt;br /&gt;
You may be able to compensate by setting image_downsize options or use image_downsize instead of disabling compression. [[#Image downsizing|Image Downsizing]]&lt;br /&gt;
&lt;br /&gt;
See [[#Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop|Malloc Failure Errors]]&lt;br /&gt;
&lt;br /&gt;
== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ==&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;Darkmod.cfg&#039;&#039;&#039; inside your darkmod folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useCachedDynamicModels &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useShadowVertexProgram &amp;quot;1&amp;quot;&lt;br /&gt;
 seta r_useEntityCulling &amp;quot;1&amp;quot;&lt;br /&gt;
 seta cm_backFaceCull &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NEW INFO: The Dark Mod has never really used Normal Map compression because it is incompatible with heightmap images&lt;br /&gt;
&amp;lt;br&amp;gt; and it produces nasty artifacts for the texture scales we use.&lt;br /&gt;
&amp;lt;br&amp;gt;The current builds have had the RXGB swizzle disabled as of at least 2.0 standalone. (Probably as of v1.08 when the GPL executable sources were released.)&lt;br /&gt;
&amp;lt;br&amp;gt; There is no benefit to enabling normal map compression currently so feel free to set this to 0 as shown above. &lt;br /&gt;
&lt;br /&gt;
Note: image_preload can increase the memory usage at load time, some lowend users have disabled this ( 0 ) to&lt;br /&gt;
get past [[FAQ#Getting_.22Malloc_Failure_for_.23.23.23.23.23.23.23.22_crash-to-desktop | malloc errors]] for going over your memory limits.&lt;br /&gt;
&lt;br /&gt;
=== Configure Video RAM ===&lt;br /&gt;
&lt;br /&gt;
Change: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;128&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to the appropriate value (in MB) for your GPU in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
Eg. A 2GB video card would have 2048 there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_videoRam &amp;quot;2048&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
===Lightgem interleaved calculation===&lt;br /&gt;
&lt;br /&gt;
By default lightgem calculation occurs every frame. You can set lightgem calculation to happen only once per several frames by setting tdm_lg_interleave console parameter to values higher than 1. For example, typing:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_interleave 3&lt;br /&gt;
&lt;br /&gt;
in console tells TDM to recalculate lightgem value every third frame.&lt;br /&gt;
&lt;br /&gt;
This tweak can increase average FPS, but it often produces noticeable stuttering, especially on slow machines&lt;br /&gt;
when your FPS is below 25 to 30FPS.&lt;br /&gt;
&lt;br /&gt;
You can also split the calculation across frames so that part is done in one frame and part is done in the next:&lt;br /&gt;
&lt;br /&gt;
 tdm_lg_split 1&lt;br /&gt;
&lt;br /&gt;
Some folks have reported that this causes flicker but that was in older builds. &lt;br /&gt;
&lt;br /&gt;
I haven&#039;t seen any problems with this in recent builds. &lt;br /&gt;
&lt;br /&gt;
This will give a modest boost compared to interleave and both can be used together or independently.&lt;br /&gt;
&lt;br /&gt;
Eg: &lt;br /&gt;
&lt;br /&gt;
Keep tdm_lg_interleave 1 for to prevent stutter at low FPS but set tdm_lg_split to gain a little boost.&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
Set tdm_lg_split to 1 to get you from 26 FPS to 28 FPS as a baseline, then set tdm_lg_interleave to 2 to&lt;br /&gt;
gain a substantial boost (up to double FPS) but since the baseline is close to 30FPS the risk of stutter is&lt;br /&gt;
substantially reduced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;See also [[#Weak_Lightgem | Weak Lightgem]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Image downsizing ===&lt;br /&gt;
&lt;br /&gt;
As a last resort, you may enable image downsizing:  in Darkmod.cfg, set &#039;&#039;&#039;image_downSize&#039;&#039;&#039; to &#039;&#039;&#039;1&#039;&#039;&#039; and then set a limit with &#039;&#039;&#039;image_downSizeLimit&#039;&#039;&#039;, e.g., &#039;&#039;&#039;&amp;quot;image_downSizeLimit&amp;quot; &amp;quot;256&amp;quot;&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSize &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This reduces texture memory requirements and may completely alleviate hard drive thrashing.  &lt;br /&gt;
There are similar cvars for bump and specular maps as well. &lt;br /&gt;
&lt;br /&gt;
Example: Downsize Normal Maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Downsize Specular maps&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta image_downSizeSpecular &amp;quot;0&amp;quot;&lt;br /&gt;
seta image_downSizeSpecularLimit &amp;quot;64&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: This may result in very blurry briefing and menu screens.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This patch will prevent that until the fix is included in a TDM release:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
http://forums.thedarkmod.com/topic/11058-things-that-could-be-improved/page-73#entry392752&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note: We recommend that you disable post-processing before using image_downsize.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; If you set image_downsizeLimit below 512, part or all of the screen wont render when post-processing enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If any image_downSizeLimit is set below your screen resolution, you will see visual errors when post-processing is enabled.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Drop in Frame Rates when Viewing Water===&lt;br /&gt;
&lt;br /&gt;
Some players have reported a drastic drop in performance when an agitated water surface is in view. This on a Radeon card. Try entering this in the console. It disables the water visible surface effects but at least it might let you play normally...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 seta r_skipPostProcess &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_postprocess &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also set a key-bind to toggle this instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[#Toggle_settings_in_realtime|Toggle Settings in Realtime]]&lt;br /&gt;
&lt;br /&gt;
See also [[FAQ#Underwater_performance_poor|Underwater performance poor]]&lt;br /&gt;
&lt;br /&gt;
=== Disabling standard graphics features ===&lt;br /&gt;
&lt;br /&gt;
At the cost of some pretty severe scene quality, you can disable a number of independent graphic features&lt;br /&gt;
&lt;br /&gt;
that are non-essential to play.&lt;br /&gt;
&lt;br /&gt;
==== Disable Soft Particles ====&lt;br /&gt;
&lt;br /&gt;
The new Soft Particle effects in v2.03 and newer use a little more GPU than the previous particles.&lt;br /&gt;
&lt;br /&gt;
This is offset by the fact that v2.03 and higher don&#039;t render particles during the lightgem calculation.&lt;br /&gt;
&lt;br /&gt;
Still, if you want an extra boost then set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_useSoftParticles &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Fog ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipFogLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable BlendLights ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBlendLights &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Shadow====&lt;br /&gt;
&lt;br /&gt;
The player shadow slightly reduces performance. It has no game effect at all (not seen by AI for instance) apart from atmospheric effect so if you want to disable it enter in the console: &lt;br /&gt;
&lt;br /&gt;
 g_showplayershadow 0&lt;br /&gt;
&lt;br /&gt;
Or, in Darkmod.cfg (see above) change the following line from &amp;quot;1&amp;quot; to &amp;quot;0&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 seta g_showplayershadow &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Disable Player Lantern Shadow====&lt;br /&gt;
&lt;br /&gt;
You may notice a drop in performance while using the player lantern.&lt;br /&gt;
&lt;br /&gt;
Add &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; to entitydef light_lantern_moving in tdm_playertools_lantern.def and this stops the player lantern casting shadows. This helps improve performance slightly when using the lantern.&lt;br /&gt;
&lt;br /&gt;
==== Disable Particles ====&lt;br /&gt;
&lt;br /&gt;
This will seriously mar your image quality. Flames, glares, and smoke will all be gone.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipParticles &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Specular Maps ====&lt;br /&gt;
&lt;br /&gt;
Specular gives materials their shine. This option will make all surfaces shine-free.&lt;br /&gt;
&lt;br /&gt;
Note: This may not work with the Enhanced Ambient&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipSpecular &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Disable Normal Maps ====&lt;br /&gt;
&lt;br /&gt;
The main detail attribute for textures in Doom 3 \ Darkmod is the Normal Map.&lt;br /&gt;
&lt;br /&gt;
If you disable this your game will become really ugly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta r_skipBump &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
==== Disable FPS Lock ====&lt;br /&gt;
&lt;br /&gt;
Run one game tick per graphics frame, rather than fixed 60 ticks per second.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta com_fixedTic &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
== Lower Sound Quality ==&lt;br /&gt;
&lt;br /&gt;
You can force 22khz audio processing to reduce the CPU overhead of audio processing.&lt;br /&gt;
&lt;br /&gt;
Obviously, EAX effects will increase CPU load for audio so you should consider disabling&lt;br /&gt;
&lt;br /&gt;
those before lowering audio quality. If normal audio plays fine but EAX causes performace,&lt;br /&gt;
&lt;br /&gt;
this change might give you a boost while EAX is enabled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta s_force22kHz &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Weak Lightgem ==&lt;br /&gt;
&lt;br /&gt;
Setting: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
seta tdm_lg_weak &amp;quot;1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg will disable the renderer based lightgem and use a simpler math-based solution.&lt;br /&gt;
It&#039;s a far less accurate lightgem but may allow weaker systems to play the game as a second to last resort.&lt;br /&gt;
&lt;br /&gt;
==Gameplay Performance Tips==&lt;br /&gt;
&lt;br /&gt;
If you have done everything else you can and performance is still poor then one or two things you might do in game to help:&lt;br /&gt;
&lt;br /&gt;
* Close all doors after you have passed through. Generally the game has to process both areas until you close the door if the doorway is still in sight.&lt;br /&gt;
* Kill or KO every AI you can. You might not like to play that way but generally, AI still hog resources even out of sight (depending on how set up in the game.)&lt;br /&gt;
* Avoid alerts. A dozen guards searching for you will really slow things down on a low-end machine.&lt;br /&gt;
* Try to look down at the ground when moving along. Gazing up at a grand vista will slow you down. Best to do your gazing while standing still.&lt;br /&gt;
&lt;br /&gt;
== Hardware Considerations ==&lt;br /&gt;
&lt;br /&gt;
The Dark Mod 1.0 was released in 2009. The average mission designer and player of that time had a Geforce 6600GT and AMD Athlon 64 X2 2GHZ.&lt;br /&gt;
&lt;br /&gt;
While some missions were playable all the way down to a P4 2.8GHZ with an FX5200, this is well below the expected audience for this project.&lt;br /&gt;
&lt;br /&gt;
Current Intel integrated GPU&#039;s have better performance than the Geforce 8800 that was a high-end card in 2009.&lt;br /&gt;
Low-power mobile chips are known to throttle under heavy load, especially when using integrated graphics.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade your BIOS ===&lt;br /&gt;
&lt;br /&gt;
Sometimes bugs or unintended specification limits in the BIOS on an older motherboard will prevent it from&lt;br /&gt;
allowing the CPU or GPU to meet their potential. &lt;br /&gt;
&lt;br /&gt;
If your manufacturer has an updated motherboard BIOS available, consider applying it.&lt;br /&gt;
&lt;br /&gt;
=== Last resort: Upgrade your hardware ===&lt;br /&gt;
&lt;br /&gt;
Modern games need a lot of computing power, and while you don&#039;t need the absolutely newest hardware to play them, upgrading single components of your machine can help tremendously:&lt;br /&gt;
&lt;br /&gt;
* If you got &#039;&#039;&#039;less than 2 GByte&#039;&#039;&#039; main memory, consider upgrading your memory. This really helps to reduce swapping, which introduces quite noticeable slowdowns.&lt;br /&gt;
* If you got a graphic card from NVidia older than the GF 7x00 series, consider upgrading it.&lt;br /&gt;
&lt;br /&gt;
Upgrading your CPU is possible in most cases but can be quite complicated &lt;br /&gt;
&lt;br /&gt;
and the cost might be so high that upgrading your whole PC might be a better value. &lt;br /&gt;
&lt;br /&gt;
Upgrading the hard disk will usually not help much with gaming, unless you are running out of free space.&lt;br /&gt;
&lt;br /&gt;
Some users have reported that SSD has improved loading times but the bigger problem with load times &lt;br /&gt;
&lt;br /&gt;
is Mip-Map generation which is CPU \ Memory bandwidth limited.&lt;br /&gt;
&lt;br /&gt;
== Toggle settings in realtime ==&lt;br /&gt;
&lt;br /&gt;
With the exception of Resolution, AA, and AF settings; most of the above settings can be changed in realtime&lt;br /&gt;
in the console or via a bind in Darkmod.cfg.&lt;br /&gt;
&lt;br /&gt;
For example, you could bind both post-processing and enhanced interaction to the Z key to enable and disable them both by pressing that key&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;z&amp;quot; &amp;quot;toggle r_postprocess 0 1; toggle tdm_interaction_vfp_type 0 1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in Darkmod.cfg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Blurry Briefing and Menu Screens==&lt;br /&gt;
&lt;br /&gt;
If you get blurry briefing and menu screens then in Darkmod.cfg make sure you do NOT have image_downSize 0. &lt;br /&gt;
&lt;br /&gt;
Instead set it to 1. But see also [[#Image downsizing|Image Downsizing]] as there is a patch available to allow&lt;br /&gt;
&lt;br /&gt;
image_downsize without making menus blurry.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[http://www.tweakguides.com/Doom3_8.html | Tweakguides Doom 3]&lt;br /&gt;
&lt;br /&gt;
See also the [[FAQ]].&lt;br /&gt;
&lt;br /&gt;
{{installation}}&lt;/div&gt;</summary>
		<author><name>Duzenko</name></author>
	</entry>
</feed>