Code Style

Table of Contents

1. Capitalization

  • classes and structs: CapitalizedWords
    • example: EventHandler, Array
    • exceptions: string, vector2, vector3, name
  • classes with prefix: prefix_CapitalizedWords
  • functions: camelCase
  • constants: ALL_CAPS
    • exceptions: CapitalizedWords if they contain no underscores
    • exceptions: enumeration-like: PREFIX_CapitalizedWords
  • class members: mCapitalizedWords
    • exceptions: camelCase if a class is plain data
  • local variables and parameters: camelCase
  • states: CapitalizedWords
  • properties: CapitalizedWords
  • console variables and aliases: snake_case
  • project names: CapitalizedWords
    • exceptions: external projects imported into DoomToolbox retain their names, e.g. libeye
    • Typist.pk3, 10.5x

2. Formatting

3. Abbreviations

Minimize the use of abbreviations. Capitalize abbreviations as single words (Http, Cvar).

4. Language

See ../.dir-locals.el for spellcheck settings.

5. Encoding

ASCII or UTF-8.

Created: 2026-04-14 Tue 16:11