How to make a horror game
Make a horror game around a clear objective, an approaching threat and a response the player can learn.
Make the return trip matter
Last Signal starts with the exit behind you and an amber fuse at the far end of a corridor. Walking out teaches the room's shape. The return trip uses the same space after the warning has awakened a shadow. You already know where safety is; the new question is whether you can get back.
This guide's original example uses one room and one encounter. The central pillar creates two routes and breaks the shadow's view. The fuse supplies a reason to approach danger. The blue exit makes success legible without a quest log. Start with those relationships before adding a second monster or a larger map.
Rosebud's horror guide uses the real maker example Cavernous Caution and organizes its steps around scene, sound, threat, interactions and ending. Its phrase Give players something to do
is a useful constraint: darkness needs an objective. Here, it is a fuse the player can retrieve and bring home.
The downloadable file is both the game and its source. Use this prompt to describe the same bounded project to Claude Code. Keep the state transitions explicit when adapting the setting.
Make Last Signal, a small top-down horror game in one HTML file. Retrieve a fuse from the far end of a corridor and return to the exit in 45 seconds. Crossing x = 7.5 triggers one visual knock warning; pursuit can start two seconds later. A central pillar blocks sight. Use optional synthesized sound, drawn shapes, keyboard and touch controls, win, loss, pause and a full restart. No flashing effects.Separate the warning from pursuit
Crossing x = 7.5 records a single warning timestamp. A text cue appears immediately; if sound is enabled, a low synthesized knock plays too. The shadow waits at least two seconds from that timestamp before it can pursue. Recording the warning once prevents the clock from restarting on every frame that the player remains in the trigger area.
Our scripted upper-route run produced the warning at 2.70 seconds, picked up the fuse at 3.91, began pursuit at 4.70 and escaped at 7.21. The chart shows actual events emitted by the game's rules. Moving by a different route changes those times because the warning is triggered by position.
To tune the encounter, change the delay from 2 to 3 seconds while leaving speed and layout fixed. Play the same approach again. That isolates how much preparation time the warning provides. A longer warning may make the chase clearer; whether it improves tension requires watching players, not inferring fear from the timer.
Give the player a hiding route
The pillar occupies x = 5 to 6 and y = 2.5 to 4.5. The game checks the line between the shadow and the player; when that line crosses the pillar, pursuit stops. This is the specific response the player can learn. The shadow is faster than a stationary player and slower than a running one, so an early retreat remains possible.
The simple sight test samples the segment in 40 intervals. That is enough for this room's one-unit-wide pillar and bounded distances. If you make thin doors, long corridors or many obstacles, replace it with an exact segment-versus-shape intersection or raycast. Keep a test with the player behind the obstacle so a visual wall cannot silently become transparent to the enemy.
Separate darkness from sight rules. The drawn vignette limits what looks bright around the player, but the pillar decides what the shadow can see. Making the scene darker does not change the pursuit logic. If you want a flashlight that affects the enemy, add an explicit cone or range test instead of relying on the picture.
Make sound a choice
Sound starts off. Pressing Sound on creates or resumes the audio context inside that click. MDN's Web Audio best practices states the browser rule directly: Create or resume context from inside a user gesture
. Starting an audio context during page load can leave it suspended.
The knock uses a sine oscillator falling from 110 Hz to 55 Hz, with its gain fading over 0.6 seconds. There is no downloaded sound file. The text cue appears even when the player has muted the game. Keep that pairing when replacing the synthesized cue with recorded audio, and keep a working mute control within reach.
Every shape and tone in Last Signal is produced by its own code. You can edit this teaching example without assembling a separate asset folder. A permission notice is included with these examples. If you replace the art or audio, keep the original maker's licence with each downloaded asset.
Use a still scene and readable controls before adding camera shake or visual distortion. The example has no flashing effects. A player needs to recognize the fuse, exit and threat before a chase can be a decision. If the first reaction is confusion about where to move, fix that route before adding more effects.
Reset the whole encounter
Watch for one easy restart bug: a restart that resets the player and the clock but leaves the fuse collected, so the next round begins with its objective already marked complete. Restart should assign a fresh initial state, including the fuse, the warning, the enemy position and the event history.
The repeatable checks guard against it: they exercise the collected-fuse restart, warning delay, blocked sight, timeout and a successful escape. They run the same inline rules as the game. Also play the rendered version: try losing after pickup, restarting, muting during a warning and leaving the tab during a chase.
For a real player session, give someone the objective and let them attempt it without coaching. Record where they first notice the threat, whether they understand the pillar, how they lose and whether they choose another round. Ask what they thought would happen before explaining your design. Keep their actual words beside the route and version tested.
After this room works, change its setting or expand one mechanic. The 3D guide explains camera, collision and lighting if the next version needs depth. The Claude Game Studio kit adds starters and asset packs, while the AI build walkthrough shows a larger game's design and repair process.
Questions
How do I make a horror game?
Give the player a specific objective, signal a threat, create a way to respond and make the ending depend on their actions. Last Signal uses a fuse-retrieval trip, a warning, a two-second delay and a pillar that blocks the shadow's sight.
How do I make a horror game without coding?
A hosted maker such as Rosebud offers a prompt-based route. With Claude Code, you can describe the rules and ask it to write the game files. In either route, play the result and check that warnings, encounters, endings and restart actually work.
How do I make a horror game in a browser?
Use Canvas or WebGL for the scene, JavaScript for triggers and movement, and Web Audio for optional sound. Last Signal is a standalone HTML example with no external art or library downloads. Its visual warning works when sound is off.
How do I make a horror game scary?
Start with a threat the player can anticipate and a decision they can act on. Change one variable, such as warning delay or sight distance, then watch real players attempt the same objective. Code timings can establish what happened; player reactions establish whether it created fear.

