Great article. I particularly enjoyed the approach to creating gibs.
Although it was a tech demo, I created something like this around the mid 90s. One thing I did that I don't see mentioned in this article was I used 8x8 (or 16x16) light maps on the textures, which allowed me to easily have things like flickering torches and rockets that lit up the hallways as they shot down them. Lightmaps can also be used to "bake in" lighting if desired.
Since the light map is "only" 8x8 you can afford to do some math on each luxel (each unit in the light map) to calculate distance and line of sight to light sources to determine a brightness value. When rendering the texture, the luxel was used with a lookup table to determine the actual color of the pixel being drawn. The light maps were updated 15 times a second if I recall correctly to help performance. Thanks to DJGPP, I was using inline assembly for the rendering. Since floating point math was slow at the time I used fixed point math which optimized well. The rendering was surprisingly performant on computers of the day.
corysamatoday at 2:51 PM
If you want to play with software rendering, here's probably the shortest code that will get an ARGB8888 2D array from main memory to the screen efficiently for all platforms using SDL2 in C https://gist.github.com/CoryBloyd/6725bb78323bb1157ff8d4175d... you'll need to do the translation from a 320x200x8-bit palletized framebuffer to ARGB yourself ;)
I find the most interesting things are the internal tools -- like the Python script to generate the gib animation, or the other Python script to generate 2D spritesheet from Blender. OP is definitely a 10x engineer who can also do good arts. This is very rare IMO. I'm very surprised to find that OP has consistent art direction.
rob74today at 11:50 AM
This is taking a lot of inspiration from Doom, but the actual raycasting engine is more like Doom's predecessors, the most well-known of which is probably Wolfenstein 3D: perpendicular walls, constant floor and ceiling height. Wolf3D didn't have textured floors and ceilings because of performance reasons, but several other similar games had them. Doom and IIRC Duke Nukem as well used a BSP engine which was much more flexible (walls could intersect at any angle, variable floor and ceiling heights), although the levels were still "flat" (you couldn't have several "stories" inside a level, e.g. you couldn't design a bridge that you could walk over and under).
mkltoday at 1:42 PM
Graphics programming in the early to mid 1990s was pretty fun: write pixel data into the memory-mapped video RAM and it appears on the screen! A pointer to 0xA0000 was all you needed - no API or anything. The reason for the non-square-pixel 320Γ200 VGA mode they mention was that the video buffer took 64000 bytes, which fit into a 16-bit segment, making addressing it easy in 16-bit code/CPUs.
Terr_today at 5:59 PM
> Well, it would work, but the result would look terrible because pixel scale is no longer consistent.
This is my complaint with a lot of "graphical enhancement" mods for games like Deus Ex.
Unless they touch everything, the inconsistent level of detail is worse than consistently low-res meshes/textures.
nopurposetoday at 6:08 PM
What does he mean by inconsistent pixel scale when he talks against increasing sprite resolution?
rob74today at 12:22 PM
I just noticed that this might be one of the rare shooters with a female protagonist: the cat has a calico pattern, and those are almost always female (https://en.wikipedia.org/wiki/Calico_cat).
mrobtoday at 4:17 PM
In the final video, it looks like the destructible vases take several shots to destroy. IMO, they should only take one. Real life vases only take one, so requiring more makes the gun feel weak. It seems to be cosmetic anyway, so there's no game balance reason to require more.
ogurechnytoday at 3:57 PM
Step 0 is missing: having a great taste. One look at the video example is enough to figure out that the author keeps things in balance and in style. Explanations of why pixel grid mismatch looks wrong, or why mismatch between texture density and geometric complexity (in both ways) looks horrible, or why smoothing does not blend with pixel art are then made in retrospect.
Some details are a bit too cool for 1993, though, and assume high frame rate (won't work that well at low fps). Smooth weapon animations with a lot of frames, tiny per-pixel effects on bullet holes and flash sprites, smooth movement and object position calculations that use precise math instead of fast rough estimates resemble Chasm: The Rift or Quake (the concept of idle animations, e. g. objects moving in the starting view of difficulty selection room, assumes that there is some performance to waste on details that make the world less empty).
robterrelltoday at 3:23 PM
This is so great. Another fun trick we used in the 90s was palette animation -- by swapping the palette you can create incredibly cool effects at a low runtime cost.
wuliwongtoday at 5:21 PM
I am not even a noob with game development. I dabbled with Godot a couple years ago and was making a funny weight lifter game, some sorta stat management sim. It was actually pretty fun but I didn't get past some pretty early working versions.
I thought I could really level up with Claude and I started working on a boxing game. It's been a total disaster. .Β·Β°Υ(Λ α Λ)Υ°·.
mysterydiptoday at 12:05 PM
As a fellow 3d-engine-with-foolishly-unreasonable-constraints developer, I love the detail in the explanations here and seeing the process you went through.
gotskitoday at 1:12 PM
This is terrific. I love reading about the creative process involved in a project like this, finding cool solutions to self-imposed boundaries.
I think the mix of highly rational reasoning and "it just feels right" is a killer combo too, it gives a rigorous basis for a lot of the decisions made, while also allowing for a strongly personal aesthetic to emerge. Very cool indeed.
boricjtoday at 2:11 PM
I'm tinkering with a voxel space rendering tech demo as a PlayStation homebrew. After one weekend of work I'm getting decent results (like, 10-15 FPS) and I've yet to use the DMA, the GTE or even polylines primitives.
It's refreshing to dust up trigonometry and good old low-level optimization tricks. When the scratchbuffer has 1 KiB and the stack can only use a fraction of that, it makes me realize how spoiled I'm at work with the microcontrollers we have, with threads being allocated 8 KiB of stack and backtraces with over 50 functions of C++ templates on it.
phkahlertoday at 2:49 PM
>> What this actually means is, the constraints I have foolishly imposed upon myself are as follows....
Those kind of constraints can lead to increased creativity, and can also influence the overall style of a game. It's part of the reason early 80's arcade games had so much diversity.
trumpdongtoday at 11:52 AM
For some reason I irrationally like the posterization effect that's created when something is darkened to almost zero.
nticompasstoday at 12:00 PM
I respect the amount of work that goes into projects like this; I can't wait to be able to play it.
rezmasontoday at 2:41 PM
A great writeup of excellent work!
The flight simulator / magic carpet easter egg in Microsoft Excel 97 used that same shaded-colormap palette trick, plus some dithering:
I'm impressed by your sprite pipeline and gibs animations. Your attention to detail and navigation of constraints have really paid off, I can't wait to play this sometime
fabiensanglardtoday at 4:18 PM
Consider a premium, boxed version. I would buy it. And I think a lot other would. Maybe try a kickstarter to see how many are interested?
jonoxtobytoday at 3:46 PM
This is a great write-up of your process and behind-the-scenes peek at the making of what looks to be a really fun game! Can't wait to play and delve into the code once you release it.
blackhaztoday at 12:48 PM
Everything is perfect here. The hero, the graphics, the title... <3
kylemaxwelltoday at 2:40 PM
Every time I think about graphics programming, I think about how we did it in the mid 90s when I was in high school messing around with exactly these things. XOR operations to drive animations, writing directly to memory, etc. (Clearly I do backend stuff now...)
renyicircletoday at 1:22 PM
I really loved that article. Creating games always seemed so daunting to me since I don't know a lot about how it's done, there are so many different processes involved. The solutions described here are so satisfyingly compact and so easy to understand given the simple constraints, and yet they produce an actual game that looks nice.
progforlyfetoday at 1:37 PM
Much respect -- at first glance when I saw the animated gif I thought this was just a project making assets from scratch for an existing game engine (e.g. Doom or Wolf 3D) but then I realize it's creating all the game code from scratch too! (But using similar techniques from the old days). Amazing work.
reifcodetoday at 4:14 PM
one of my very first solo projects during high school was writing a wolfenstein-like raycaster from scratch. I still hold some very fond memories of programming it, arguably one of the moments I fell in love with the craft
trashbtoday at 1:00 PM
This game looks great I really like the style it is inspiring.
The author seems to consider open-sourcing the engine, I would also be interested in the mentioned scripts for asset creation. Those scripts would make a great toolset for asset creation in this style.
badsectoraculatoday at 12:50 PM
As a side note, the visual style in the game reminds me a lot of Exhumed / Powerslave :-).
sgttoday at 11:56 AM
Really cool. It's also something LLM's are ridiculously bad at, so you kinda have to do it properly.
Levitatingtoday at 1:35 PM
I love this! I have been working on a similar project, recreating the originale BBC Elite but with multiplayer networking. Though I have not limited myself as much (I use SDL).
cosiiinetoday at 1:42 PM
This is a wonderful deep dive into your project. I'm early days on creating pixel art style procedural art systems, and this gives me plenty to think about.
binaryturtletoday at 1:39 PM
With the title I was expecting some notes about DeluxePaint, but it was still a nice read nonetheless. Wish you much success with the game! :-)
hareltoday at 1:22 PM
This is beautiful. I wish one day I'll have to time for a project like that. Looking forward to buying it on Steam.
badsectoraculatoday at 12:31 PM
Nice, i've used similar approach for the lighting in Post Apocalyptic Petra[0] though i did use per-pixel LUT offset calculation[1] because it uses a generic 3D triangle rasterizer (the levels are based on grids like in Tomb Raider but they're rendered as triangles). Later i added sprite support for another gamejam but i never ended up finishing it and the sprite support is very rudimentary (and unoptimized - i just noticed i'm doing the LUT lookup for every pixel when drawing shaded sprites which isn't necessary).
I did write a tool for generating the sprites from 3D models though[2]. It uses plain old OpenGL 1.1 to draw the sprite and grabs the framebuffer directly. It is drawn fullbright so i can paint the lighting directly on the sprite's texture (using a Krita plugin i wrote[3][4] - the model is something i threw together with Blender's default generated UV since i didn't care for the details).
I wonder if doing some sort of postprocessing (after rendering with with shading) like you do with your game would help with the finer details since i also found that rendering from 3D models to sprites creates very "mushy" results most of the time because of all the details getting lost. I notice the colors also become more saturated after postprocessing in your examples, is this after it finds the closest color in the palette or the result of the postprocess? I'd like to keep the overall hue+saturation of the model so maybe doing post-processing on a grayscale render to shade the shadows/dark areas but keep highlights as-is and then multiplying that with the fullbright image would produce results that wont shift the saturation.
Wow, this takes me back of making my own software renderer and game engine as a teen in the 90s. Then OpenGL came out and fixed pipelines and some of the cool magic of doing anything with pixels disappeared (until pixel shaders came back). One cool rendering technique you don't see much today is voxel graphics.
wazooxtoday at 4:22 PM
That's beautiful. I hope it will run on a 486DX2 :D
zerrtoday at 12:53 PM
I hope they leveraged Mode X :)
relativeadvtoday at 5:01 PM
Bravo! Wonderful read.
The comments here are a cesspool unfortunately. People bickering about pronouns used for cats, how many shots it takes for a vase to explode, or whether or not some circa-1993 software was used or mentioned.
tobadzistsinitoday at 4:34 PM
Unpopular opinion but the author remarks that the cat is female but uses "it" as pronouns. Human garbage.
perfect_wavetoday at 6:01 PM
[dead]
xyzsparetimexyztoday at 12:05 PM
It'd be more interesting if you made a similar looking game using modern APIs imo
mg794613today at 4:12 PM
There is nothing wrong with using AI.
What I don't like is to see claims like "no AI slop"
And yet it's riddled with emdashes and language "by hand"
Seeing the skills of the writer, he definitely should be able to, but then I don't understand the claim.