# Descent Protocol: Browser Raycaster FPS With an Autoplay Agent

Apps & experiments · Creator, sole engineer · live

A first-person shooter in the style of the 1993 raycaster era that runs entirely in the browser, plus an agent that plays it.

Open: https://doomslopus5-5.siddhvasudev.com

## The detail

There is no build step, no dependency and no binary asset. The engine, the maps, the textures, the creature sprites and the sound are all generated in code. It is an original game and contains nothing from any commercial title.

The engine does textured walls, perspective floor and ceiling casting, depth-sorted sprites, fog and sliding doors, with an adaptive quality ladder that walks up or down to hold frame rate. There are four weapons, four enemy types and a synthesised score.

Press one key and an agent plays the campaign: A* navigation, threat scoring, weapon selection, projectile dodging and stuck recovery, driving the same inputs a person does. The test suite includes a headless run in which the agent completes the game.

JavaScript, Canvas, Web Audio.

## What I did

- Wrote a raycasting engine with textured walls, floor and ceiling casting, sprites, fog and doors
- Generated every map, texture, sprite and sound in code, with no asset files
- Built an autoplay agent with A* navigation, threat scoring, weapon selection and dodging
- Added an adaptive quality ladder that holds frame rate
- Wrote 69 tests, including a headless run where the agent finishes the campaign
- Shipped it with no build step and no dependencies

## Stack

JavaScript, Canvas API, Game Development, Algorithms, Web Audio, Pathfinding

Case study: https://www.siddhvasudev.com/projects/descent-protocol-browser-raycaster-fps-with
