Textures in Doom are a notch more complex than sprites: they are compositions
of multiple sprites. There are also a couple of additional indirections, one
which seems to make more sense than the other.
The first indirection is the TEXTURE1 and TEXTURE2 lumps. While both flats and
sprites are lumps in the wad file in their own right, textures are nested one
level deeper. You have to read the TEXTURE1 and TEXTURE2 lumps to even find the
textures. I haven't been able to make a good guess as to why …
Continue readingSprites
Sprites in Doom are stored in a custom format, tailor made for the rendering
engine and in a sense even for the final output medium. It has taken me a
while to implement support for this format in wad-gfx (formerly doom-gfx),
not because of any complexity in the format, but because I had a hard time
figuring out how to most faithfully represent the source data in a normal
contemporary image file format.
Anamorphic pixels
If you were into computers back when Doom was released, it is not unlikely
…
Continue readingFlats
Of the different image formats in Doom, flats are the simplest. Now, all
images in Doom are flat, but flats are what they decided to call the textures
that go on the floors and ceilings. I'll save the wall textures and sprites
for another time.
Flats have predefined dimensions of 64 by 64 pixels. With 8 bits per pixel and
no compression or other fancy encoding, this works out to 4096 bytes, and
indeed all flats in doom.wad are 4096 bytes. The pattern is clear when
looking at the entries between …
Continue readingE1M1
I was gifted the Game Engine Black Book DOOM for Christmas, to my
great pleasure. It will let me finally satisfy the curiosity that has been
lingering in me since '93. And I suspect it is not entirely without some
expectation that I get this book now, after having recreated the rendering
engine from Wolfenstein 3D in a live-coding session at RevolverConf
2018.1.
My primary goal here is to implement a rendering engine of the same kind that
Doom sports. But I should note that this will be for my e…
Continue readingWikiLinks
I've been working on Sausagewiki for a while now, but I have only recently
discovered how best to enable prolific linking between articles. I have now
made it possible to link to an article by just writing its title in square
brackets inline in the text; I like [pie], I like [cake]. This is a bit of a
lucky combination of an extension to Markdown and the way URLs are generated
for articles in Sausagewiki. Let's look at the URLs first.
When designing the URL generation mechanism, I had some goals…
Continue reading