project-image

Coding History: 3D from Mode7 to DOOM

Created by Eniko

A video series teaching the code behind the early evolution of 3D.

Latest Updates from Our Project:

Rotate the universe? Happy new year from Coding History
almost 2 years ago – Sat, Jan 14, 2023 at 04:32:01 AM

Hi folks and welcome to 2023. I wanted to wait until I had substantial progress to show to post the next update, and I've finished programming all the graphical sequences for the first video as well as created the thumbnail for it:

That text might sound like clickbait, but it's actually the core of the explanation for the 2D rotation formula.

Now all I have to do is record the sequences and voice over and edit those together to get the early access version out while I figure out what the best way to show all the backer credits is. Anyway, enjoy some gifs of the sequences I've programmed for the episode on rotation while you wait:

Production starting now
about 2 years ago – Sat, Oct 22, 2022 at 01:51:19 AM

Hi everyone! Good news and bad news. First, the good news. My recording equipment finally arrived!

The bad news is that it did so a few days before my mother (whom I hadn't seen since early 2018 on account of the pandemic) came to visit me, along with all of our other stuff. She's gone home now and I'm back to work, and now that I finally have my recording equipment I'm making it a priority to get the first video out as soon as possible.

I'm aiming to at a very minimum have a preview of the first video for backers with early access sometime next month. I'm sorry it took this long to get the ball rolling. The move from US to Cyprus was much more gruelling than I anticipated last year before omicron hit, but we're pretty much set up now aside from a couple smaller things, so things should be smoother from here on out.

Fighting with customs, and raycasters
over 2 years ago – Tue, Aug 16, 2022 at 05:03:19 AM

I was holding off on posting another update because I was really hoping I'd have better news, but our stuff is still stuck in customs. We've made some progress, but the process is extremely slow. To be honest at this stage I wish we'd just forked out the cash for VAT (which we shouldn't have to pay on our stuff since we're moving here) to get it over with. But alas.

So without my recording equipment here I've been blocked on actually creating an episode. Instead I've been putting some time into refreshing my knowledge on coding raycasting engines, and I present you the results of my experiments so far:

Raycaster with shiny lighting

And in gamedev tradition the code driving the light flicker effect is code that's been used in many Valve games, originally created by John Carmack for Quake. Although I didn't like any of the sequences they made for a sort of torch effect, so I made my own which is "mnkjcfcdafdehifkjlm".

On the bright side I do have an actual proper workspace set up, with a chair and a desk and monitors, so I can at least work without physical injury. In fact, I've been feeling very energized and ready to do work, so once my stuff actually gets here it shouldn't take too long for me to get a video out.

June update
over 2 years ago – Fri, Jul 01, 2022 at 12:08:24 AM

Hi everyone, sorry for the late update; but the update is late because I finally moved! Since moving I've had zero migraines, which is the good news. The bad news is that there's been a (read: several) snafu with shipping our stuff and now my recording stuff is in a box somewhere for a while longer and then has to get cleared through customs.


I know it's been a while since the campaign and there's still no videos so I wanted to talk honestly about what happened.


The original plan was to have the Kickstarter, get my booster shot for delta in late November (which I did) and then move in January. Spend a couple months getting set up here in Cyprus and then get a video out.


Omicron screwed all that up, and we didn't really have a safe window to get everything we needed to get done in the US done and get out to Europe until the start of this month, after a second booster shot when cases were in a brief lull. This also meant that I was stuck in St Louis, and unfortunately was suffering from near daily migraines for months with some of the worst migraine weather I experienced in my 6+ years there. Between the extended period of moving and the migraines I fell behind on everything I had to do and that includes Coding History.


I'm not going to lie, I still don't have my recording equipment or a proper space set up to work that doesn't hurt me physically (we've ordered a desk for me to use but the delivery has been... challenging) so it's going to be a little longer but once I'm set up I'm going to make it my priority to get Coding History videos out for you all.


Not suffering from daily migraines will help with that enormously. It's hard to think creatively when you can barely think at all.

April update
over 2 years ago – Mon, May 02, 2022 at 12:18:51 AM

In April I've done more work on some of the supporting code for the example projects and videos. This includes more work on the software rasterizing library, which you can now find on github. I've also had to make a tweening framework for the codebase because I couldn't find an existing C# tweening library that targets .NET framework rather than .NET core (and FNA recommends not using core yet). The tweening code will be part of the Coding History code that will be made public so it'll be free and open source.

Tweening code sample

I've also done more work on the script for the basics of 3D video but I've been pretty stuck on how to handle rotation. The math for rotation is pretty unintuitive, and if any viewers are anything like me, they'll want to understand how it works because otherwise it won't stick.

But I want to keep the basics of 3D video free of math as much as possible. So instead I've decided to make an appendix video purely on 2D rotation, since that's gonna be a very important concept going forward. The script for that is a lot easier to write and it'll be a good first video to make since it's not quite as important as the other ones, so if I mess up anything about the process it won't impact later, more important videos. I'm hoping to get that out fully done over the next month or so.

For the explanation I'm going to build off this explanation that Freya Holmér made. I've got a gif showing how it's not just the point that rotates, but it is in fact the whole coordinate system that rotates. Conveniently it also shows off the effect of the tweening code above!

Point (and its coordinate system) rotating around origin

And apparently animated gifs work again on Firefox, yay?