Final project for the Interactive Graphics course, Sapienza University of Rome
⏳ The game may take a while to load, assets are heavy and patience is the virtue of the strong. Hang tight, it's worth it.
Dungeon Explorer is a first-person action-adventure game set in a medieval dungeon. The player must explore interconnected rooms, solve environmental puzzles by interacting with the surrounding world (pulling levers, lighting torches, and destroying obstacles) and defeat a guardian enemy to reach the exit
Each room requires completing a specific interaction to unlock the passage to the next:
- Room 1 — Pick up the axe, destroy the barrel, pull the lever, light the unlit wall torch
- Corridor — Dodge the swinging pendulum traps in the first section; avoid the rolling boulder in the second
- Room 2 — Step on the pressure plate (which locks the entrance door), defeat the ogre to open the exit
| Key / Input | Action |
|---|---|
W A S D |
Move |
Shift |
Sprint |
| Mouse | Look around |
E |
Interact / Pick up item |
Left click |
Attack (only with axe or sword equipped) |
Right click (hold) |
Block with shield (only with shield equipped) |
I |
Open / Close inventory |
| Mouse (in inventory) | Drag items between slots |
The inventory (I) consists of 4 slots:
- 🗡️ Primary Slot — reserved for weapons (axe, sword): the equipped item appears held in first-person on the right side
- 🛡️ Utility Slot — reserved for torch and shield: the equipped item appears held in first-person on the left side
- 🎒 Backpack Slot 1 / Slot 2 — free slots to store items and remove them from the first-person view
- Corridor pendulums —
root(ceiling anchor) →pendulumGroup(chain + blade) hierarchy; sinusoidal animation implemented in JavaScript rotates only the parent node, propagating to all children - Double door —
door.group→leftPivot/rightPivot→ door leaves; the opening animation rotates only the pivot nodes, the leaves follow through transform inheritance - Procedural barrel —
root→barrelCore+staveGroup+middleRingGroup+ rings + rivets; progressive destruction acts on specific hierarchical layers (staveGroup.visible,middleRingGroup.visible)
- Full PBR textures on floors, walls, and ceilings: albedo, normal map, roughness map; displacement map on floors only (96×96 vertex subdivision)
- PointLights on all wall torches and chandelier with multi-frequency flicker
- SpotLight on the held torch (hand-carried pickup), providing a directional warm cone of light
- Raycast interaction system (key
E) for picking up objects and activating mechanisms - Torch system: proximity-based ignition from ignition sources (lit wall torch → portable torch and vice versa)
- AABB collision detection with walls for player movement
- Combat system: axe/sword hitbox via raycast, timed damage windows, shield block system
- Inventory with typed slots and drag-and-drop between slots
- Pressure plate trigger that locks the Room 2 entrance door on contact
- Respawn system after player death
- Axe swing animation (eased rotation on root node)
- Sword swing animation (eased rotation on root node)
- Torch flame animation (scaling + sinusoidal rotation + ember particles)
- Torch lighting animation (
_litProgresswith ease-out curveMath.pow(p, 0.55), clamped deltaTime) - Pendulum animation (sinusoidal oscillation using
Math.sin(t)and deltaTime) - Rolling boulder animation (translation + self-axis rotation)
- Door opening animation (gradual pivot rotation using
moveTowards) - Lever animation (rotation on pivot node)
- Barrel destruction animation (progressive layer-based deformation over hit stages)
- Mob death and dissolve animation (opacity fade on
transparentmaterials) ⚠️ Locomotion and attack animations of the ogre (mob) are imported from GLTF/FBX files
- Dungeon (rooms, corridors, geometry) —
THREE.BoxGeometry/PlaneGeometry - Barrel — cylinder + staves + rings + rivets, entirely built with
THREE.CylinderGeometry/BoxGeometry/TorusGeometry - Pendulums — ceiling anchor + chain links + blade using
THREE.ExtrudeGeometry - Boulder —
THREE.SphereGeometry
- Three.js — WebGL rendering, scene management, materials, lights, animations
- GLTFLoader — 3D model loading (ogre, door, torches, ecc...)
- Web Audio API — ambient and gameplay audio system
| Name | Student ID | |
|---|---|---|
| Agostini Antonio | 1995653 | agostini.1995653@studenti.uniroma1.it |
| .@studenti.uniroma1.it |
The source code is released under the MIT License.
Third-party assets (3D models, textures, audio) and their respective licenses are listed in CREDITS.md.