Creating a Doom-style 3D engine in C HD
In this tool-assisted education video I walk through the creation of a Duke Nukem 3D style (or Doom-style) software-rendering pseudo-3D engine from scratch. It supports non-Euclidean geometry. Topics such as vector rotation and portal rendering are at the core. SUBTITLES ARE AVAILABLE. Twitter: https://twitter.com/RealBisqwit Patreon: https://patreon.com/Bisqwit (alternatives at https://iki.fi/bisqwit/donate.html) Twitch: https://twitch.tv/RealBisqwit Homepage: https://iki.fi/bisqwit/ Contribute subtitles: https://www.youtube.com/timedtext_video?vHQYsFshbkYw or: https://www.youtube.com/timedtext_cs_panel?c=UCKTehwyGCKF-b2wo0RKwrcg&tab=2 This homebrew software-rendering pseudo-3D engine bears many similarities to Duke Nukem 3D. The geometry can be tweaked at run time without performance penalties, to create things like ceiling crushers or rotating doors. For rendering, it only supports single-color floors, walls and ceilings, with optional depth shading. Unlike Duke3D, it also requires that each sector is convex. So far this engine does not support objects or sprites. It also does not support sloped surfaces or parallax ceilings. DOWNLOAD MATERIAL: - https://iki.fi/bisqwit/jkp/portalrendering.html SUPPORT / INSTRUCTIONS: The C program must be compiled with a C compiler supporting the C99 standard. If you attempt to compile it as C++, errors will be produced. If you attempt to compile it on a C89 compiler, errors will be produced. You must compile it as C using C99 standard or newer (on GCC, use the commandline option: -std=c99 or -std=c11). You also need libSDL 1.2. SDL 2.0 will not work. Add the options printed by pkg-config sdl --libs --cflags into your compiler commandline. The BASIC program is ideally run in QBASIC or QuickBASIC 4.5. It will not work in QB64 without modifications, because QB64 does not support DEF FN. It will not work in GW-BASIC, because of the structural programming statements. Music credits in order of appearance: - Lunar: Silver Star Story - Lunar Traffic theme (Noriyuki Iwadare) - Axelay - SPIDERS (Taro Kudou) - Tales of Phantasia - Final Act (Motoi Sakuraba and Shinji Tamura) - Tales of Phantasia - Ridge Racer (Shinji Hosoe) All these video game songs have been transformed into OPL3 songs with homebrew tools and played through ADLMIDI. Sorry about the fluctuating narration volume. I recorded pretty much every sentence separately over many days, and my microphone was positioned differently at different times, and sometimes it was day, sometimes night, sometimes I had morning voice, etc. I tried to compensate with both manual volume adjustment as well as running a compression filter over it all, but it was only after publication when I noticed how uneven it still is. My typical workflow for recording the narration involves the following: 1. Watching some of the video 2. Writing into a text file what I would like to say (this file will also form the basis of closed-captioning later). Much of the text comes from
Похожие видео
Показать еще