Skip to content

CaspianA1/dungeon_dave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,119 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dungeon Dave!


  • A first-person shooter in the style of games like Doom and Quake.
  • The Dungeon Dave engine is built fully from scratch, ensuring optimal performance for all platforms.

Rendering Techniques

  • Normal Mapping (normal maps are generated at runtime from each object's albedo texture, via a heightmap + Gaussian blur + Sobel operator pipeline)

  • Parallax Occlusion Mapping (uses the same runtime-generated heightmaps - currently disabled though)

  • Exponential Shadow Mapping (for soft shadows)

  • Cascaded Shadow Mapping (with blended depth layers - this makes transitions between depth layers a smooth fade; all cascades are rendered in a single draw call via geometry shader invocation instancing, with the cascade count baked as a GLSL #define before compilation)

  • God Rays (based on this technique from Nvidia, but works in light-space rather than in screen-space, which allows for the light volumes to remain when the camera is turned away from the sun)

  • Precomputed Raytraced Ambient Occlusion (a vertex shader traces rays via Transform Feedback as an improvised GPU compute pass, caches results on disk, and at runtime the main shader tricubically interpolates from a 3D texture to fetch the values)

  • Tone Mapping (Reinhard Extended Luminance, applied in the fragment shader on floating-point PBR-computed values before output)

More To Know

  • The renderer is fully physically based, and employs a metallic/roughness material system.
  • The renderer is a typical forward renderer, and utilizes a depth prepass.
  • Shadows and god rays work correctly for translucent objects - billboards cast correctly shaped shadows via alpha-tested depth writes.
  • Billboard sprites are fully animated.
  • The voxelized world uses greedy meshing to minimize the size of the overall world mesh.
  • Per-sector AABB frustum culling is performed each frame.
  • The sun has configurable dynamic movement, oscillating between two defined directions, with live updates to shadows and god rays.
  • Textures use a pixel art UV filtering technique (by Inigo Quilez) with configurable bilinear percents per object type, to sharpen pixel art without hard aliased edges.
  • Levels use a set of original soundtracks developed by Adam Winograd. In-game sound effects use OpenAL for a surround-sound effect.
  • I drew most of the pixel art with Aseprite, including the skyboxes (which employ cylindrical projection).

Screenshots

Screenshot 2023-01-07 at 14 40 57

Screenshot 2022-12-14 at 01 05 02

Screenshot 2022-12-14 at 00 46 17


Dependencies

  • To install any dependencies, run install.sh. Note that only MacOS and Fedora Linux are officially supported.

Building

  • Simply run build.sh, passing the build type as the first argument (debug or release).
  • If you wish to run the project as well, you can specify the second argument to be run.

Movement Keybindings

  • Head movement: mouse/trackpad
  • Use weapon: click mouse/trackpad
  • Forward/backward: w/s
  • Strafe: a/d
  • Sprint for forward/backward movement: left/right shift
  • Jump: spacebar

Debug Keybindings

  • Fly: 1
  • Toggle wireframe mode: 2
  • Print position: 3
  • Print direction: 4
  • Print SDL error: 5
  • Print OpenGL error: 6
  • Print OpenAL error: 7
  • Print OpenAL context error: 8

About

A retro-inspired FPS platforming game. Engine and assets built from scratch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages