This commit is contained in:
Miloslav Ciz 2025-09-20 17:33:12 +02:00
parent 0e9129c535
commit 349045e2b8
28 changed files with 2076 additions and 2028 deletions

View file

@ -44,7 +44,7 @@ Some **[interesting](interesting.md) trivia** about Doom include:
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 conveniently 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.
The code itself looks alright, files are conveniently 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.
The game only used [fixed point](fixed_point.md), no [float](float.md)!
@ -78,4 +78,4 @@ Some **[interesting](interesting.md) places in code**: `m_random.c:31`: pseudora
- [Chasm: The Rift](chasm_the_rift.md)
- [raycasting](raycasting.md) (not used in Doom but achieves similar look)
- [Doomer](doomer.md)
- [Boomer](boomer.md)
- [Boomer](boomer.md)