No description
Find a file
Bill Currie 0ebb0717b0 [zone] Add failing test cases
The tests fail as they exercise how the cache *SHOULD* work rather than
how it does now.

The tests do currently pass for the pending work I've done on the cache
system, but while working on it, I remembered why I reworked cache
allocation...

The essential problem is that sounds are loaded into the cache, which is
fine for synchronous output targets, but has proven to be a minefield
for asynchronous output targets (JACK, ALSA).

The reason for the minefield is the hunk takes priority over the cache,
and is free to move cache blocks around, and *even dispose of them
entirely* in order to satisfy memory allocations from either end of the
hunk. Doing this in an entirely single-threaded process (as DOS Quake
was) is perfectly safe, as the users of the cache just reload the
pointer each time, and bail if it's null (meaning the block has been
freed), or even cause the data to be reloaded if possible (I'm a little
fuzzy on the details for that as I didn't write that code). However, in
multi-threaded code, especially real-time (JACK, possibly ALSA), it's a
recipe for disaster. The 4cab5b90e6 commit was a (mostly) successful
attempt to mitigate the problem by allocating the cache blocks from the
high-hunk (thus minimizing any movement caused by low-hunk allocations),
it resulted in cache allocates and regular high-hunk allocations somehow
getting intertwined: while investigating just how much memory ad_tears
needs (somewhere between 192MB and 256MB), I got "trashed sentinel"
errors and upon investigation, I found what looks very suspiciously like
audio data written across a hunk control block.

I've decided that the cache allocation *algorithm* should be reverted to
how it was originally designed by Id (details will remain "modern"), but
while working on the tests, I remembered why I had done the changes in
the first place (above story). Thus the work on reverting the cache
allocation can't go in until I get sound memory management independent
of the cache. The tests are going in now so I have a constant reminder :)
2022-06-03 12:52:59 +09:00
config.d [build] Ensure va_copy def comes after HAVE_VA_COPY 2022-03-30 23:29:17 +09:00
debian [build] Move to non-recursive make 2020-06-25 11:35:37 +09:00
desktop [build] Move to non-recursive make 2020-06-25 11:35:37 +09:00
doc [dox] Fix up some doxygen issues 2022-04-13 14:17:58 +09:00
hw [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
include [sys] Add some developer flags for cache/hunk/zone 2022-06-03 12:04:27 +09:00
libs [zone] Add failing test cases 2022-06-03 12:52:59 +09:00
m4 [build] Use AS_HELP_STRING on all the help strings 2021-12-24 06:45:13 +09:00
nq [nq] Remove some more bandaids 2022-05-26 17:10:23 +09:00
pkg-config [build] Move to non-recursive make 2020-06-25 11:35:37 +09:00
qtv [model] Move plane info into mnode_t, and visframe out 2022-05-22 12:41:23 +09:00
qw [gib] Clean up some header dependencies 2022-05-26 16:13:09 +09:00
RPM [build] Move to non-recursive make 2020-06-25 11:35:37 +09:00
ruamoko [gamecode] Add PR_Shutdown for tearing down a VM 2022-05-12 19:58:18 +09:00
tools Fix some MXE build issues 2022-05-22 11:59:53 +09:00
.gitignore [gamecode] Generate the new opcode table 2022-01-05 19:09:07 +09:00
bootstrap [build] Relax autoconf version requirement 2021-11-22 07:41:16 +09:00
configure.ac [build] Use AS_HELP_STRING on all the help strings 2021-12-24 06:45:13 +09:00
COPYING initial checkin of most recent newtree and nuq(?) source 2001-02-19 21:15:25 +00:00
INSTALL [build] Update for autoconf 2.71 2021-11-20 12:54:05 +09:00
Makefile.am [gamecode] Generate the new opcode table 2022-01-05 19:09:07 +09:00
NEWS Update for 0.7.2. 2013-01-23 12:01:36 +09:00
README.md Fix a typo 2022-04-01 10:40:26 +09:00
TODO Detect the silent death of the jack client thread. 2011-09-07 15:16:27 +09:00

QuakeForge

QuakeForge is descended from the original Quake engine as released by Id Software in December 1999, and can be used to play original Quake and QuakeWorld games and mods (including many modern mods). While this will always be the case, development continues.

However, QuakeForge is not just a Quake engine, but includes a collection of tools for creating Quake mods, and is progressing towards being a more general game engine.

Quake and QuakeWorld

Support for Quake and QuakeWorld is split into two program sets: nq for Quake and qw-client for QuakeWorld, with the target system as an additional suffix: -x11 For the X Window system (Linux, BSD, etc), -win for MS Windows (plus others that are not currently maintained).

Both nq and qw-client support multiple renderers: 8-bit software, 32-bit software, OpenGL 2, EGL (mostly, one non-EGL function is used), and Vulkan (very WIP), all within the one executable.

Dedicated servers for both Quake (nq-server) and QuakeWorld (qw-server) are included, as well as a master server for QuakeWorld (qw-master).

Tools

QuakeForge includes several tools for working with Quake data:

  • bsp2image produces wireframe images from Quake maps (bsp files)
  • io_mesh_qfmdl for importing and exporting Quake mdl files to/from Blender
  • io_qfmap for Quake map source files (WIP Blender addon)
  • pak create, list and extract Quake pak files. There's also zpak which can be used to compress the contents of pak files using gzip (QuakeForge has transparent support for gzip compressed files)
  • qfbsp for compiling map files to bsp files, includes support for vis clusters, and can be used to extract data and information from bsp files.
  • qfcc is QuakeForge's version of qcc, but is significantly more advanced, with support for standard C syntax, including most C types, as well as Objective-C object oriented programming (Ruamoko). Mmost of the advanced features require the QuakeForge engine, but qfcc can produce progs files compatible with the original Quake engine with limited support for some of the advanced featuers (C syntax, reduced global usage, some additional operators (eg, better bit operators, remainder (%)). Includes qfprogs for inspecting progs files.
  • qflight creates lightmaps for Quake maps
  • qfvis for compiling PVS data for Quake maps. One of the faster implementations available.
  • Plus a few others in various stages of usefulness: qflmp, qfmodelgen, qfspritegen, wad, qfwavinfo

Building

For now, please refer to INSTALL for information on building on Linux. Building for windows is done by cross-compiling using MXE. There are scripts in tools/mingw and tools/mingw64 that automate the process of configuring and building both the tools run on the build-host and the windows targets.