This commit is contained in:
Miloslav Ciz 2024-03-14 23:30:14 +01:00
parent 6ac96e5e81
commit a8a438148b
33 changed files with 1816 additions and 1753 deletions

View file

@ -10,7 +10,7 @@ The codebase (including Build engine) is roughly 100000 [LOC](loc.md) of [C](c.m
The original system requirements were roughly following: 66 MHz [CPU](cpu.md), 16 MB [RAM](ram.md) and 30 MB storage space.
Duke ran on **[Build](build.md) engine**, a legendary [software rendering](sw_rendering.md) [primitive 3D](pseudo_3d.md) engine that had limitations similar to those of [Doom](doom.md) engine, i.e. the camera could not truly rotate up or down (though it could fake this with kind of a "tilting") and things like rooms above other rooms in a level were allowed only in limited ways ([hacks](hacking.md) such as extra rendering passes or invisible teleports were used to allow this). The engine was similar to that of Doom, enemies and other objects were represented with 2D [sprites](sprite.md) and levels were based on the concept of sectors (a level was really made as a 2D map in which walls were assigned different heights and textures), however it had new features -- most notably [dynamic](dynamic.md) environment, meaning that levels could change on the fly without the need for [precomputation](precomputation.md), allowing e.g. destructible environments. How the fuck did they achieve this? Instead of [BSP](bsp.md) rendering (used by Doom) Build engine used **[portal rendering](portal_rendering.md)**: basically (put in a quite simplified way) there was just a set of sectors, some of which shared walls ("portals") -- rendering would first draw the sector the player stood in (from the inside of course) and whenever it encountered a portal wall (i.e. a wall that sees into another sector), it would simply [recursively](recursion.md) render that too in the same way -- turns out this was just fine. Other extra features of the engine included tilted floors and ceilings, fake looking up/down, 3rd person view etc. The Build engine was also used in many other games (most notably [Shadow Warrior](shadow_warrior.md) and [Blood](blood.md)) and later incorporated even more advanced stuff, such as [voxel](voxel.md) models, though these weren't yet present in Duke. Just like Doom, Build engine **only used [fixed point](fixed_point.md)**, no [float](float.md)! { Hmm, actually maybe there was a small exception, see the link below. ~drummyfish }
Duke ran on **[Build](build.md) engine**, a legendary [software rendering](sw_rendering.md) [primitive 3D](pseudo_3d.md) engine that had limitations similar to those of [Doom](doom.md) engine, i.e. the camera could not genuinely rotate up or down (though it could fake this with kind of a "tilting") and things like rooms above other rooms in a level were allowed only in limited ways ([hacks](hacking.md) such as extra rendering passes or invisible teleports were used to allow this). The engine was not unsimilar to that of Doom, enemies and other objects were represented with 2D [sprites](sprite.md) and levels were based on the concept of sectors (a level was really made as a 2D map in which walls were assigned different heights and textures), however it had new features -- most notably [dynamic](dynamic.md) environment, meaning that levels could change on the fly without the need for [precomputation](precomputation.md), allowing e.g. destructible environments. How the fuck did they achieve this? Instead of [BSP](bsp.md) rendering (used by Doom) Build engine used **[portal rendering](portal_rendering.md)**: basically (put in a quite simplified way) there was just a set of sectors, some of which shared walls ("portals") -- rendering would first draw the sector the player stood in (from the inside of course) and whenever it encountered a portal wall (i.e. a wall that sees into another sector), it would simply [recursively](recursion.md) render that too in the same way -- turns out this was just fine. Other extra features of the engine included tilted floors and ceilings, fake looking up/down, 3rd person view etc. The Build engine was also used in many other games (most notably [Shadow Warrior](shadow_warrior.md) and [Blood](blood.md)) and later incorporated even more advanced stuff, such as [voxel](voxel.md) models, though these weren't yet present in Duke. Just like Doom, Build engine **only used [fixed point](fixed_point.md)**, no [float](float.md)! { Hmm, actually maybe there was a small exception, see the link below. ~drummyfish }
{ Here are some details on the engine internals from a guy who specializes on this stuff: https://fabiensanglard.net/duke3d/build_engine_internals.php. ~drummyfish }