mirror of
https://github.com/dhewm/iddevnet.git
synced 2024-11-24 21:32:49 +00:00
92 lines
4 KiB
HTML
92 lines
4 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
|||
|
<!-- saved from url=(0044)https://www.iddevnet.com/doom3/packfiles.php -->
|
|||
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
|||
|
<title>id.sdk [Pack Files]</title>
|
|||
|
<link rel="stylesheet" href="style.css">
|
|||
|
</head>
|
|||
|
|
|||
|
|
|||
|
<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
|
|||
|
|
|||
|
<table border=0 cellpadding=0 cellspacing=0 style="width: 100%; height: 99px">
|
|||
|
<tr>
|
|||
|
<td style="width: 171px"><img src="images/doom.jpg" style="width: 171px; height: 99px" alt=""></td>
|
|||
|
<td style="background: url(images/tile.gif)">
|
|||
|
<table border=0 cellpadding=0 cellspacing=0 width=600>
|
|||
|
<tr>
|
|||
|
<td style="height: 19px; background: url(images/sdk.gif) no-repeat"></td>
|
|||
|
<td rowspan=4 align=right><img src="images/id.gif" style="width: 42px; height: 99px" alt=""></td>
|
|||
|
</tr>
|
|||
|
<tr><td style="height: 29px; background: url(images/top.jpg) no-repeat"></td></tr>
|
|||
|
<tr><td style="height: 27px; background: url(images/middle.gif)" class="title"> Making DOOM 3 Mods : Pack Files</td></tr>
|
|||
|
<tr><td style="height: 24px; background: url(images/bottom.jpg) no-repeat"></td></tr>
|
|||
|
</table>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<table border=0 cellpadding=0 cellspacing=0 style="width: 770px">
|
|||
|
<tr>
|
|||
|
<td colspan=2 style="background: url(images/boxtop.gif);"><img src="images/span.jpg" style="width: 397px; height: 20px; float: left" alt=""></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td style="vertical-align: top; width: 152px; background: url(images/tileleft.gif)">
|
|||
|
<div class="leftMenu">
|
|||
|
<script src="menu.js"></script>
|
|||
|
</div>
|
|||
|
</td>
|
|||
|
<td class="mainContent">
|
|||
|
|
|||
|
<p>
|
|||
|
Every asset in the game is stored in a pack file for release. The pack files are just normal zip files with
|
|||
|
the .pk4 extension, which is the same system used in Quake III Arena. This means you can open the pack files
|
|||
|
in the base folder using a zip program and browse all the assets in the game.
|
|||
|
|
|||
|
</p><p>
|
|||
|
The pack file system offers 3 huge benefits:
|
|||
|
</p><ul>
|
|||
|
<li><b>Compression</b><br>
|
|||
|
The assets for Doom 3 are 3.6GB uncompressed, and only 1.44GB after being packed up.
|
|||
|
<br><br>
|
|||
|
</li><li><b>Checksum</b><br>
|
|||
|
Multiplayer servers check the signature (checksum) of the pack file on the client machine to ensure all clients
|
|||
|
are playing with the same versions of all files. This is known as having a pure server.
|
|||
|
<br><br>
|
|||
|
</li><li><b>Distribution</b><br>
|
|||
|
It's a lot easier to distribute a single large file rather than dozens of little files.
|
|||
|
</li></ul>
|
|||
|
|
|||
|
<p>
|
|||
|
During development you don't want to have to re-pack all the files every time you change something, so
|
|||
|
the game is set up to look for files in the directory to override files in the packs. However, it
|
|||
|
only does this in single player. If you want to use files from the directory in multiplayer, you need to disable
|
|||
|
pure (set si_pure 0) before starting the server. This is also true if you want clients to be able to use different
|
|||
|
files than the server.
|
|||
|
|
|||
|
</p><p>
|
|||
|
<img src="images/packfiles_a.png" border="1" align="right">
|
|||
|
A pack file has to have an internal directory structure that mirrors the file system. The easiest way to make sure
|
|||
|
this happens (using <a href="http://www.winzip.com/">winzip</a>) is to select the files and folders in your mod directory
|
|||
|
and choose 'Add to <modname>.zip' You can then rename it to <something>.pk4
|
|||
|
|
|||
|
</p><p>
|
|||
|
The game dll (gamex86.dll) cannot be in the same pack file as the other assets.
|
|||
|
It has to be in its own pack file along with a config.conf file.
|
|||
|
This is to easily support multiple platforms (mac, linux, windows).
|
|||
|
|
|||
|
<br>
|
|||
|
</p></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td colspan="2" bgcolor="#CCCCCC"><img src="images/span2.gif" style="width: 397px; height: 8px; float: left;"></td>
|
|||
|
</tr>
|
|||
|
</tbody></table>
|
|||
|
|
|||
|
<table border="0" cellpadding="0" cellspacing="0" width="770">
|
|||
|
<tbody><tr>
|
|||
|
<td align="left" class="legalese">Copyright <20> 2004 <a href="http://www.idsoftware.com/">id software</a></td>
|
|||
|
</tr>
|
|||
|
</tbody></table>
|
|||
|
|
|||
|
|
|||
|
</body></html>
|