If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Warped walls recreation

While not the biggest fan of DK2 I do like its terrain, it only has a few different terrain types and yet manages to look pretty fancy. This is the first time I've stepped into 3D development and the first time I've used Godot. A bunch of my interests aligned for me to work on this thing, shaders are fun and I like DK clones.

From what I can tell DK2 uses simple cube collision boxes for the terrain;
1. In possession mode when you push diagonally against the wall your camera will move in a straight line, no bumps. As a Firefly you are unable to fly all the way up to the ceiling, blocked by a flat collision box.
2. If you possess a warlock and shoot a fireball at the side of a thin distorted rock terrain (dig around a rock tile without claiming to make it thin) your fireball will collide with air. Walk up to distorted terrain and it obviously has a flat collision box.
So I figured a shader that merely manipulates the positions of the vertices is good enough, it's a visual effect that stays within the collision box.

Re: Warped walls recreation

Re: Warped walls recreation

Originally Posted by burntonion

Apparently the implementation for DK2 was pretty complex: https://github.com/tonihele/OpenKeeper/issues/108
"Incremental Delaunay Triangulation" I have no idea what that is.
[...]
So I figured a shader that merely manipulates the positions of the vertices is good enough, it's a visual effect that stays within the collision box.

I think that's exactly what they did, it's straightforward and provided good performance. The whole triangulation idea was thought way too complicated.

My name is Robin Green and I worked on navigation tech at Bullfrog along with head of R&D Ian Shaw. Ian was the master of the Incremental Delaunay Triangulation system that allowed us to dig out mazes (and the underlying map-and-crowd-nav system was used on both DK2 and Theme Park World)

Notice how the diagonals in adjacent squares flip from top-left/bottom-right to top-right/bottom-left? That’s the key to incremental delaunay, knowing when to split and when to flip.

With that said, I think technology was different back then, shader magic was new stuff and internet solutions weren't widespread. So their implementation was likely much more complex than it needs to be (these days), due to technological restrictions at the time.https://en.wikipedia.org/wiki/Shader#History

The first video card with a programmable pixel shader was the Nvidia GeForce 3 (NV20), released in 2001.

2 years after DK2 came out.

Side note, I've got this cursed version of DK2 that has no wall warping when I run DKII.exe instead of DKII-DX.exe, which is interesting to see. (maybe it's like this on other people's computers? Otherwise it's a pretty funny coincidence that this happened to me)

Re: Warped walls recreation

I always like the clean look of the straight walls (not that first person picture though). In DK1 as well. They made some pretty art there that's hard too see, not just because of the size but because of the warping as well.

Re: Warped walls recreation

Originally Posted by YourMaster

I always like the clean look of the straight walls (not that first person picture though). In DK1 as well. They made some pretty art there that's hard too see, not just because of the size but because of the warping as well.

I doubt you're alone, there's probably quite a few people out there that think it looks old, ugly and would prefer perfect cubes like minecraft. That might be why the look really hasn't been replicated much in other games. Though that does allow DK to stand unique, I especially like DK1's lumpy floor and ceiling in first person. I think the warped look contributes to the evil theme (twisted like my SOUL... lol) and increases atmosphere by better representing cave walls carved roughly out of the earth.

By the way, unrelated to Dungeon Keeper I recently coded this: https://rainlizard.itch.io/another-mc-clone
So I now know how to cull all hidden faces in 3D (there was no culling in the Warped Walls Recreation project). I may work on another DK related project in the future.

Re: Warped walls recreation

Well, for DK2 I didn't much care for the graphics when the game was new either.
And yes, in first person it looks better, but the graphics are just all around of low quality, that the warping is too much and it goes beyond realism.

If you're looking for a project, I'm always happy to provide you with something on KeeperFX Unofficial of course.