Data Schema::Precache File - Subject9x/battleMETAL GitHub Wiki

Precache files are lists of files the game uses to determine what to load at startup. Quake C has a builtin function called precache_file() that loads the file into memory and reduces load times. As a time saver, necessary game files were precached in lists, instead of code. battleMETAL continues this practice by using precache files.

Example File - Menu System

These files are pretty straightforward.

  • use '//' for comments, otherwise file reader treats a line as an actionable value.
  • do not use a leading '/' for folders, the code already knows game roo / is where it should start.
  • Acceptable file types:
    • .png
    • .tga
    • .obj
    • .md3
    • .ogg
    • .wav

Each file is used by its parent module:

  • precache_server : server-side module.
  • precache_client : client-side module.
  • precache_menu : menu_system module.

A File precached in 1 module is not precached in another module.