Cortex Bot is a Quake (1996) deathmatch bot with human-like combat, navigation, and resource-management behavior. It compiles to progs.dat via fteqcc and can run standalone or be wired into an existing mod.
- Smart combat: weapon selection favors range and ammo, dodges rockets, leads targets, and retreats when outmatched.
- Advanced movement: uses whisker sensors, platform riding, rocket jumps, water handling, teleporters, and gap jumping to stay mobile.
- Resource tracking: watches item pickups, major power-up respawns, and prioritizes health, armor, and ammunition.
- Sound & state awareness: reacts to combat noises, keeps a hunting state machine, and exposes well-documented bot entity fields.
- Install
fteqccfrom https://www.fteqcc.org/ or via your package manager (apt install fteqcc). - From the repo root run:
fteqcc progs.src # or use the helper scripts: `build.bat` (Windows) or `./build.sh` (Linux/macOS) - Copy the generated
progs.datinto your Quakeid1folder (e.g.,C:\Games\Quake\id1or~/.quake/id1). - Launch Quake and start a deathmatch (
quake +deathmatch 1 +map dm4). - Open the console and run
impulse 100to spawn a Cortex Bot.
-
bot.qcimplements the AI flow with states such as ROAM, HUNT, COMBAT, RETREAT, FETCH, RIDING, and SOLVE. -
stubs.qcprovides stub implementations for standalone testing without a full Quake engine. -
progs.srcis the compilation order; keep all listed modules for a successful build. -
Integration notes (scoreboard hooks, impulse bindings, required engine functions) are preserved in
README-legacy.md. -
Configuration constants are near the top of
bot.qc(close/mid ranges, safe rocket distance, etc.). -
Recent helpers
Cortex_CoverDirectionandinwaterkeepCortex_FindCoverand weapon selection from relying on missing math/environment built-ins, so the bot only depends on standardself.waterlevelstate and the eight canonical cover directions.
ai.qc,fight.qc,combat.qc, etc. – modular QuakeC source files for different AI responsibilities.tools/meqcc14/meqcc.txt– reference for the compiler wrapper.progs.src– order enforced by the compiler.README-legacy.md,CHANGELOG.md,STATUS.md– historical context, release notes, and progress tracking.
- Run
build.bat(Windows) or./build.sh(Unix) to produceprogs.datlocally. - CI workflow already installs
fteqcc, builds the game code, and fails ifprogs.datis missing (see.github/workflows/ci.yml). - Update
STATUS.mdandCHANGELOG.mdwhenever features or bugs change. - On Windows, run the bundled compiler at
tools\\fteqcc_win64\\fteqcc64.exe progs.src(the same binary used here) to reproduceprogs.datgeneration; the current warnings now only cover the longstanding unreferenced locals and not missing math/environment helpers.
- Report bugs or suggest enhancements via Issues (templates guide the required details).
- Submit pull requests using the standard template so maintainers can quickly review the intent and testing steps.
- Review
CONTRIBUTING.mdfor branching strategy, coding tips, and testing expectations, and follow theCODE_OF_CONDUCT.mdpolicies when interacting. - Sensitive vulnerabilities belong in
SECURITY.md's reporting instructions instead of public issues.
This project is MIT licensed — see LICENSE for details.