This commit is contained in:
Miloslav Ciz 2025-04-10 22:26:01 +02:00
parent 8ac0ebb55b
commit f19efc7b70
18 changed files with 1962 additions and 1936 deletions

View file

@ -42,7 +42,7 @@ Some **[interesting](interesting.md) trivia** about Doom include:
*See also [game engine](game_engine.md) for the list of different Doom engines. Tl;dr: to play doom nowadays use either Chocolate Doom or Crispy Doom.*
Doom source code is written in [C89](c.md) and is about 36000 [lines of code](loc.md) long, spread over some 124 files, of which some were auto-generated (e.g. the [AI](ai.md) [state machines](finite_state_machine.md)). The original system requirements stated roughly a 30 MHz [CPU](cpu.md) and 4 MB [RAM](ram.md) as a minimum. It had 27 levels (9 of which were shareware), 8 weapons and 10 enemy types. The engine wasn't really as flexible in a way "[modern](modern.md)" programmers expect, many things were hard coded, there was no [scripting](script.md) or whatever (see? you don't fucking need it), new games using the engine had to usually modify the engine internals.
Doom source code is written in [C89](c.md) and is about 36000 [lines of code](loc.md) long, spread over some 124 files, of which some were auto-generated (e.g. the [AI](ai.md) [state machines](finite_state_machine.md)). The original system requirements stated roughly a 30 MHz [CPU](cpu.md) and 4 MB [RAM](ram.md) as a minimum. It had 27 levels (9 of which were shareware), 8 weapons and 10 enemy types. The engine wasn't really as flexible in a way "[modern](modern.md)" programmers expect, many things were hard coded, there was no [scripting](script.md) or whatever (see? you don't fucking need it), new games using the engine had to usually modify the engine internals. Compared to its predecessor ([Wolf 3D](wolf3d.md)), successor ([Quake](quake.md)) and competition ([Duke 3D](duke3d.md)), Doom's code is arguably the nicest and closest to [LRS](lrs.md).
The code itself looks alright, files are nicely organized into groups by their prefix (`g_`: game, `r_`: rendering, `s`: sound etc.). The same goes for the function names. There seems to be tabs mixed with spaces though, sometimes a bit shitty formatting, but overall MUCH better than [duke 3D](duke3d.md)'s code (well, that doesn't say much though). [Comments](comment.md) are plentiful.