(2^(-(3^(-1)))) FTW (Dungeons of Daggorath Reverse Engineering)

Here is a screen grab of a Youtube video playing a runthrough of Dungeons of Daggorath.

I’ll explain the little red lines and number after.

There are a number of things I know about Dungeons of Daggorath, but a few of them are germane to the technical details of rendering the view.

First, I know that the screen resolution on DoD was 256×192.  Although not really. It was in PMODE4, which was really PMODE3 with a call to POKE &hFF22,248 afterwards.

The viewport was, therefore, 256×148.

In measuring the various positions horizontally and vertically (in the picture above), I first spotted that the proportion of an inner “ring” to an outer one was about 0.8.

Further digging (in putting together a number of ring sizes), I determined that the proportion isn’t best represented as 0.8, but rather the cube root of one half (or (1/2)^(1/3), aka 2^(-(3^(-1))).

In the end, every three rings down the tunnel I go, the width and height of the ring is halved.

Question: Why is this useful?

If I am to render a blocky graphic QR world in the styling of DoD, I need to know these things.

DoD had a few other advantages that I don’t have, however.

All of the DoD levels were tunnels that crossed at various intervals.

Which means that the DoD renderer never had to look across an empty area.  It was always looking down a tunnel, and while the first block of an intersecting passageway was visible, the whole are was not.

In a QR code, large areas can be open.

But that’s ok.

Here’s why.

This is a quick little SVG mockup of two blocks rendered in a DoD-like environment. The red box is the viewport, and the frame is only showing on grid boundaries (not the half-grid like in DoD – thats the little horizontal line in the middle of a block on the ceiling).

In order to render the row of blocks I am right next to (forward), I only need three graphics, one for in front of me directly, and two for each side.

One row away, I’d need five graphics to be able to render all of them.

The next row is more like 7… haven’t figured it out yet.

But in the end, for about 15 pre-rendered images(or if I’m smart, about 8, and flip em horizontally), I can render a distance of 3 rows.

Which is cheap, rendering-wise.

Question: Why am I not doing 3D?

First, if you are asking this question, you cannot possibly understand.

Second, that sort of rendering pipeline matrixy crap is extreme overkill….

You can only face the four cardinal directions.

You can only move forward or backward one block at a time.

A final word:

I am not making Dungeons of Daggorath. I am making a game in the STYLE of DoD. Don’t get excited.

Also, I think it needs to be an Android game.

Also, I think it needs to ship.

For real, already. Time to put up or shut up, and I think a DoD style game could do well.

 

 

Advertisements

Tags: ,

One Response to “(2^(-(3^(-1)))) FTW (Dungeons of Daggorath Reverse Engineering)”

  1. thecodezone Says:

    Well there’s Daggorath. And there’s that Tharoggad sequel. So let’s try reading from the middle. Athdaggor, Gorathdag, Gadtharog. Roggadtha.

    You need a vector zombie kitten?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: