ai21.net
語言

夜班恐怖遊戲的雙模型對比

示範影片

夜班恐怖遊戲的雙模型對比 — 1

提示詞

Build a complete, polished browser horror game inspired by the "survive the night shift in a security office" genre (like Five Nights at Freddy's), but with a 100% ORIGINAL setting, characters, and name. Do not use any FNAF names, characters, locations, or assets.

## Concept
Title: "SUNNY HOLLOW: AFTER HOURS"
You are a night watchman at Sunny Hollow Studios, an abandoned 1990s children's TV studio. The show's animatronic puppet hosts were shut down after the show was cancelled (last live broadcast: May 17, 1996), but at night they still try to "finish the broadcast". Survive from 12 AM to 6 AM in a small control booth using cameras, shutters, door lights, a ceiling-vent seal and an audio lure, while managing a draining generator.

## Tech
- Single self-contained index.html (HTML + CSS + JS). Three.js r128 UMD from cdnjs (https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js). No external assets: all models are low-poly primitives, all textures are procedural canvas textures (felt, wood, rust, tiles, wallpaper, posters), all sound is generated with the Web Audio API.
- Desktop Chrome at 60 fps. Mouse controls plus keyboard shortcuts.
- Every room is its own THREE.Scene with its own camera, so only the viewed room is rendered. Pre-compile all shaders at boot (renderer.compile on every scene, with the puppets temporarily added) so the first camera flip doesn't hitch.
- Adaptive resolution: render the 3D into a render target at 0.85x. If the average frame time stays above 25 ms for 2.5 s, drop the internal scale by 0.15 (minimum 0.5).
- Add `[hidden]{display:none!important}` to the CSS so hidden overlay screens never block clicks.
- Save progress in localStorage (current night, beaten nights, stars, unlocks, custom-night sliders), wrapped in try/catch.

## Post-processing (full-screen shader)
VHS/CRT pass over everything: scanlines, film grain, chromatic aberration, a rolling tracking band, line jitter, vignette, a full-static mix, a red flash and a darkness fade. Use three presets: office (subtle), camera (strong scanlines, barrel distortion, green tint, more noise) and menu.

## Core loop
- 1 in-game hour = 60 real seconds (12 AM → 6 AM = 6 minutes).
- Mouse near the left/right 22% of the screen turns the view smoothly. Yaw is clamped to ±60°. Arrow keys work as a backup.
- Generator: 100% at start. Usage = 1 (base) + tablet 1 + each door light 1 + each closed shutter 2 + vent seal 1 + lure 1 (for 3 s). Drain = usage × 0.1% per second × night multiplier (N1 0.9, N2 0.95, N3 1.0, N4 1.03, N5 1.06, N6 1.14, custom 1.1). Show POWER LEFT % and colored usage bars.
- At 0%: shutters open, all lights die, cameras disabled. After 4–9 s Mr. Antler appears in the left doorway with eyes pulsing to a generated music-box melody (5–18 s), then 2 s of total darkness, then a jumpscare. If 6 AM arrives first, the player wins.
- 6 AM: chime, a "5 → 6 AM" rolling-digit screen, then the next night starts automatically.
- AI levels rise +1 at 2, 3 and 4 AM on nights 2+.

## Control booth (3D)
- Left and right doorways open onto dark corridors. Each doorway has a corrugated metal shutter that slides down, plus a wall panel with a red SHUTTER button and a white LIGHT button (hold).
- Without the light, a puppet in the doorway shows only faint glowing eyes. Office lights must have short range so the doorway stays dark.
- Desk: old CRT TV with rabbit ears (clickable), two static monitors, a spinning fan, a red phone (click to mute the call), a mug, papers, a desk lamp, a VENT SEAL lever box with an LED, and a tiny moose bobblehead.
- Front wall: a ceiling vent (real hole in the wall mesh, a duct behind it, angled slats, and a metal plate that slides down to seal it), a wall clock synced to game time, show posters, a "MAY 1996" calendar with the 17th circled, a kid's crayon drawing and a caution poster.
- A flickering fluorescent tube and hanging cables.

## Camera tablet
- Toggle with SPACE or by hovering the bottom bar.
- IMPORTANT, avoid a flicker bug: do NOT use mouseenter/mouseleave on the two bars (CAMERAS / LOWER sit in the same spot and ping-pong the tablet). Detect the bar zone from the pointer position inside a global pointermove handler. Flip once per visit (450 ms cooldown). Re-arm only after the mouse moves well above the bar (y < innerHeight − 110). Start each night disarmed.
- 0.22 s slide-up animation. The camera feed starts rendering once it's fully up.
- 8 cameras on a clickable schematic minimap (keys 1–8). Centered header shows "CAM 04 · WEST HALL" plus "● REC" and a timestamp. Slow camera pan in each room. A static burst on switch and whenever a puppet enters or leaves the viewed room.
- Tablet buttons: "♪ PLAY JINGLE [L]" (15 s cooldown bar) and "VENT: OPEN/SEALED [V]".
- Raising the tablet turns off held lights. Shutters can't be operated while it's up.

## Map
CAM 1 Main Stage (stage, painted sunny backdrop, teal curtains, talk-show desk, audience seats, APPLAUSE sign), CAM 2 Green Room, CAM 3 Prop Storage, CAM 4 West Hall, CAM 5 East Hall, CAM 6 Costume Closet, CAM 7 Vent Shaft (red emergency light), CAM 8 Broadcast Tower Room (equipment racks with LEDs, a wall of static/countdown CRTs, an ON AIR sign that lights up during the TV event).

## Antagonists (original, each with a unique mechanic)
Movement opportunity every ~5 s: move if random(0..20) < AI level.
1. MR. ANTLER: felt moose talk-show host (maroon blazer, yellow bow tie, palmate antlers, droopy eyelids, microphone). Route 1 → 2/3 → 4 → left door. He will NOT move while you watch his current camera. In the West Hall he walks toward the camera only while unwatched. At the door he waits lerp(10, 4.5, AI/20) s: shutter closed → loud bangs, he retreats to CAM 2/3. Open → jumpscare.
2. SPROCKET: tin robot co-host (rusty can head, bulb eyes, blinking antenna, chest dials, cassette slot). Route 1 → 8 → 5 → right door. Playing the jingle on a camera 1–2 steps behind him pulls him back there (15% chance the tape skips). Three successful lures within ~40 s each jam his tape for 25 s: red eyes, jittering, +5 aggression, lures stop working. At the right door he behaves like Antler (shutter blocks).
3. LULU: pink-striped sock marionette with button eyes, yarn hair and a wooden control bar with strings. Lives in CAM 6 with an unrest meter (+AI×0.14 per second unwatched, −9 per second while watched). Four visible poses (deeper in the closet → leaning out → staring at the camera); her pose only updates while unwatched. At 100 she enters the vent shaft, and her progress freezes while CAM 7 is watched. At the booth vent she scratches for 3.5–6 s: sealed → thump and she returns to the closet. Open → jumpscare.
4. THE UNDERSTUDY: faceless grey spare mascot suit, "SPARE #2" tag. Normally standing in CAM 3. When power is below 30% it can appear in a front corner of the booth (opposite the side you're facing), with flickering lights and breathing. Keep it out of view (turn away or raise the tablet) for 3 continuous seconds and it vanishes. Otherwise it gets you after lerp(12, 7, AI/20) s.
5. THE BROADCAST (night 5+): the booth TV turns on by itself with color bars and a countdown with beeps. Press T or click the TV before it ends. If it finishes, every camera shows "NO SIGNAL" for 10 s and Antler and Sprocket get +3 aggression meanwhile.

AI per night [Antler, Sprocket, Lulu, Understudy, Broadcast]:
N1 3,2,0,0,0 · N2 5,4,3,0,0 · N3 7,6,6,4,0 · N4 10,9,9,7,0 · N5 13,12,12,11,10 · N6 18,17,17,16,15.

## Jumpscares
The puppet lunges from 1.6 m to face distance in 0.22 s, head aligned to eye level, lit by a strong light. Camera shake, heavy chroma/jitter, a short red flash, and a loud synthesized screech (detuned sawtooths with LFO + distortion + noise). After ~1.35 s show "TECHNICAL DIFFICULTIES" over color bars and static, with who got you, a one-line tip, RETRY and MENU.

## Audio (all synthesized)
Generator hum, fan noise, camera hiss, light buzz, panned footsteps (Antler left, metallic clanks for Sprocket right), shutter slams, bangs, vent scratching, breathing, a cheerful-but-detuned show jingle (lowpassed and panned to the camera's side), the music box, a 6 AM chime with distant cheering, ambient creaks/drips/whispers/distant kids, and a menu drone. Start audio from the first click.

## Story
Each night a phone call types out 3–4 lines with a muffled formant "voice" synced word by word; it can be muted. The calls gradually reveal the lore: the nine-minute feed cut on May 17, 1996; the hosts found smiling at the camera; recordings of kids counting down; the previous watchman calling from inside the Tower Room on night 5. Night 6 is an automated station message.

## Menus and progression
- Boot screen "▶ PLAY TAPE".
- Main menu: a dark 3D stage with the hosts on the right side, a glitching yellow show logo, NEW GAME (with an erase confirmation), CONTINUE, NIGHT 6 and CUSTOM NIGHT (locked until earned), stars, and N1–N6 progress chips.
- An orientation screen with controls and host tips before night 1.
- Endings: beating night 5 shows a newspaper (studio to be demolished, the old watchman missing) and unlocks Night 6. Night 6 shows a creepy pay stub and unlocks Custom Night. A Custom Night at all-20 shows a sign-off card. One star for each.
- Custom night: sliders 0–20 for all five hosts, plus presets.
- P/Esc pauses the game; it also auto-pauses on blur.

## Style
Retro VHS look. VT323 for the UI, a chunky rounded display font for the show logo. Green/amber phosphor HUD: time and night top-right, power and usage bottom-left, key hints above them. Must also work at phone width without overflow.

## Easter eggs
- 6% chance per night that a West Hall poster reads "IT'S STILL ON AIR" with the hosts' eyes crossed out.
- Clicking the booth show poster honks.
- 1/1000 chance on switching to CAM 1 that a sun mascot appears on stage (saved as a ☀ on the menu).
- Typing "sunny" on the menu unlocks everything.

## Quality bar
- Fully playable start to finish with no console errors.
- Night 1 is beatable on the first try with plenty of power left. Night 5 needs skill. Night 6 is hard.
- Comment the code by section: utils/save, textures, puppet models, office, rooms, menu scene, post-processing, audio, game state & AI, input, UI, render loop.

中文翻譯

構建一個完整、精緻的瀏覽器恐怖遊戲,靈感來自「在安保辦公室裏熬過夜班」這一類型(如 Five Nights at Freddy's),但設定、角色和名稱必須 100% 原創。不得使用任何 FNAF 的名稱、角色、地點或素材。

## 概念
標題:"SUNNY HOLLOW: AFTER HOURS"
你是 Sunny Hollow Studios 的夜間看守,這是一家廢棄的 1990 年代兒童電視演播室。節目被取消後,這檔節目的動畫玩偶主持人被關停(最後一次直播:1996 年 5 月 17 日),但到了夜裏,它們仍試圖「完成播出」。在一間狹小的控制亭裏,利用攝像機、捲簾門、門燈、天花板通風口封蓋和音頻誘餌,從 12 AM 撐到 6 AM,同時管理不斷耗電的發電機。

## 技術
- 單個自包含的 index.html(HTML + CSS + JS)。Three.js r128 UMD 來自 cdnjs(https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js)。不使用外部素材:所有模型都是低多邊形基礎幾何體,所有貼圖都是程序化 Canvas 貼圖(毛氈、木頭、鏽跡、瓷磚、壁紙、海報),所有聲音都用 Web Audio API 生成。
- 桌面端 Chrome,60 fps。鼠標控制加鍵盤快捷鍵。
- 每個房間都是獨立的 THREE.Scene,並擁有自己的相機,因此只渲染正在觀看的房間。在啓動時預編譯所有着色器(對每個場景調用 renderer.compile,並臨時加入玩偶),這樣第一次切換鏡頭時不會卡頓。
- 自適應分辨率:先把 3D 渲染到 0.85 倍的渲染目標。如果平均幀時間持續 2.5 秒高於 25 ms,就把內部縮放降低 0.15(最低 0.5)。
- 在 CSS 中添加 `[hidden]{display:none!important}`,確保隱藏的覆蓋層界面永遠不會擋住點擊。
- 用 localStorage 保存進度(當前夜晚、已通關夜晚、星星、解鎖項、自定義夜晚滑塊),並包在 try/catch 中。

## 後期處理(全屏着色器)
對全部畫面疊加 VHS/CRT 效果:掃描線、膠片顆粒、色差、滾動的跟蹤條帶、行抖動、暗角、全雪花混合、紅色閃光和黑暗淡出。使用三種預設:office(輕微)、camera(強掃描線、桶形畸變、綠色色調、更多噪點)和 menu。

## 核心循環
- 遊戲內 1 小時 = 現實 60 秒(12 AM → 6 AM = 6 分鐘)。
- 鼠標靠近屏幕左/右側 22% 的區域時,視角會平滑轉動。偏航角限制在 ±60°。方向鍵可作爲備用操作。
- 發電機:初始 100%。耗電 = 1(基礎)+ 平板 1 + 每盞門燈 1 + 每扇關閉的捲簾門 2 + 通風口封蓋 1 + 誘餌 1(持續 3 秒)。耗電速度 = 耗電值 × 每秒 0.1% × 夜晚倍率(N1 0.9、N2 0.95、N3 1.0、N4 1.03、N5 1.06、N6 1.14、自定義 1.1)。顯示 POWER LEFT % 和帶顏色的耗電條。
- 電量降至 0% 時:捲簾門打開,所有燈光熄滅,攝像機禁用。4–9 秒後,Mr. Antler 出現在左側門口,雙眼隨着生成的八音盒旋律脈動(5–18 秒),隨後是 2 秒完全黑暗,然後一次驚嚇。如果 6 AM 先到,玩家獲勝。
- 6 AM:鐘聲、一個 "5 → 6 AM" 的滾動數字畫面,然後自動開始下一夜。
- 第 2 夜起,AI 等級會在 2 AM、3 AM 和 4 AM 各 +1。

## 控制亭(3D)
- 左右兩側的門口通向黑暗的走廊。每個門口都有一扇向下滑動的瓦楞金屬捲簾門,另有一塊牆面板,上面有紅色 SHUTTER 按鈕和白色 LIGHT 按鈕(按住)。
- 不開燈時,門口的玩偶只露出微弱的發光眼睛。辦公室燈光的照射範圍必須很短,使門口保持黑暗。
- 桌子:帶兔耳天線的舊 CRT 電視(可點擊)、兩臺雪花屏顯示器、一臺旋轉的風扇、一部紅色電話(點擊可靜音通話)、一個馬克杯、文件、一盞檯燈、一個帶 LED 的 VENT SEAL 拉桿盒,以及一個小小的駝鹿搖頭擺件。
- 前牆:一個天花板通風口(牆體網格上的真實孔洞,其後有管道、傾斜的百葉,以及一塊向下滑動將其封住的金屬板)、一個與遊戲時間同步的掛鐘、節目海報、一本 17 日被圈出的 "MAY 1996" 日曆、一張兒童蠟筆畫和一張警示海報。
- 一根閃爍的熒光燈管和懸垂的電纜。

## 攝像平板
- 用 SPACE 切換,或懸停底部欄。
- 重要:爲避免閃爍 bug,不要在兩條欄上使用 mouseenter/mouseleave(CAMERAS / LOWER 處在同一位置,會讓平板來回彈跳)。在全局 pointermove 處理器中根據指針位置檢測欄區域。每次進入只翻轉一次(450 ms 冷卻)。只有當鼠標移動到欄上方足夠高處(y < innerHeight − 110)後才重新武裝。每晚開始時處於未武裝狀態。
- 0.22 秒的上滑動畫。攝像機畫面在完全升起後纔開始渲染。
- 可點擊的示意圖小地圖上有 8 臺攝像機(按鍵 1–8)。居中標題顯示 "CAM 04 · WEST HALL",外加 "● REC" 和時間戳。每個房間的攝像機緩慢平移。切換時以及每當有玩偶進入或離開當前觀看的房間時,都會出現一陣雪花。
- 平板按鈕:"♪ PLAY JINGLE [L]"(15 秒冷卻條)和 "VENT: OPEN/SEALED [V]"。
- 舉起平板會關閉正被按住的燈。平板升起時無法操作捲簾門。

## 地圖
CAM 1 Main Stage(舞臺、繪製的陽光背景板、青綠色窗簾、脫口秀桌子、觀衆席、APPLAUSE 標牌),CAM 2 Green Room,CAM 3 Prop Storage,CAM 4 West Hall,CAM 5 East Hall,CAM 6 Costume Closet,CAM 7 Vent Shaft(紅色應急燈),CAM 8 Broadcast Tower Room(帶 LED 的設備機架、一整面雪花/倒計時 CRT 牆、在電視事件期間亮起的 ON AIR 標牌)。

## 敵對角色(原創,每個都有獨特機制)
每約 5 秒獲得一次移動機會:若 random(0..20) < AI 等級,則移動。
1. MR. ANTLER:毛氈駝鹿脫口秀主持人(栗色西裝外套、黃色領結、掌狀鹿角、下垂的眼瞼、麥克風)。路線 1 → 2/3 → 4 → 左門。當你正在觀看他當前所在的攝像機時,他絕不會移動。在 West Hall 中,他只在無人觀看時才朝攝像機走來。到達門口後,他會等待 lerp(10, 4.5, AI/20) 秒:捲簾門關閉 → 巨大的撞擊聲,他退回到 CAM 2/3。門敞開 → 驚嚇。
2. SPROCKET:鐵皮機器人搭檔主持(生鏽的罐頭腦袋、燈泡眼睛、閃爍的天線、胸前旋鈕、卡帶插槽)。路線 1 → 8 → 5 → 右門。在他身後 1–2 步遠的攝像機播放這段廣告曲,會把他拉回那裏(15% 概率磁帶跳帶)。約 40 秒內三次成功的引誘,每次都會卡住他的磁帶 25 秒:眼睛變紅、抖動、+5 攻擊性,引誘失效。在右門他的行爲與 Antler 相同(捲簾門可擋住)。
3. LULU:粉色條紋襪子提線木偶,紐釦眼睛、毛線頭髮,以及帶細線的木質控制桿。住在 CAM 6,帶有躁動值(無人觀看時每秒 +AI×0.14,被觀看時每秒 −9)。四種可見姿勢(更深入衣櫃 → 探出身子 → 盯着攝像機);她的姿勢只在無人觀看時更新。達到 100 時,她進入通風豎井;觀看 CAM 7 時,她的進度會凍結。到達控制亭通風口時,她會抓撓 3.5–6 秒:封住 → 砰的一聲,她回到衣櫃。敞開 → 驚嚇。
4. THE UNDERSTUDY:沒有面孔的灰色備用吉祥物套裝,掛着 "SPARE #2" 標籤。通常站在 CAM 3。當電量低於 30% 時,它可能出現在控制亭前方的一個角落(位於你所朝方向的對側),伴隨閃爍的燈光和呼吸聲。讓它保持在視野之外(轉身或舉起平板)連續 3 秒,它就會消失。否則它會在 lerp(12, 7, AI/20) 秒後抓住你。
5. THE BROADCAST(第 5 夜起):控制亭的電視會自行打開,顯示彩條和伴隨嗶聲的倒計時。在倒計時結束前按 T 或點擊電視。如果它播放完畢,所有攝像機都會顯示 "NO SIGNAL" 持續 10 秒,與此同時 Antler 和 Sprocket 獲得 +3 攻擊性。

每夜 AI [Antler, Sprocket, Lulu, Understudy, Broadcast]:
N1 3,2,0,0,0 · N2 5,4,3,0,0 · N3 7,6,6,4,0 · N4 10,9,9,7,0 · N5 13,12,12,11,10 · N6 18,17,17,16,15.

## 驚嚇
玩偶會在 0.22 秒內從 1.6 米處撲到面前距離,頭部與視線齊平,被強光照亮。鏡頭震動、強烈的色差/抖動、短暫的紅色閃光,以及響亮的合成尖嘯(失諧鋸齒波,帶 LFO + 失真 + 噪聲)。約 1.35 秒後,在彩條和雪花之上顯示 "TECHNICAL DIFFICULTIES",並附上是誰抓住了你、一行提示、RETRY 和 MENU。

## 音頻(全部合成)
發電機嗡鳴、風扇噪聲、攝像機嘶聲、燈光嗡響、帶聲像的腳步聲(Antler 的腳步聲在左,Sprocket 的金屬碰撞聲在右)、捲簾門砸落聲、撞擊聲、通風口抓撓聲、呼吸聲、歡快但失諧的節目廣告曲(低通濾波,並聲像偏向攝像機所在的一側)、八音盒、6 AM 的鐘聲與遠處的歡呼、環境中的吱嘎/滴水/低語/遠處孩童聲,以及菜單的低鳴。音頻從第一次點擊開始播放。

## 劇情
每晚,一通電話會逐字打出 3–4 行內容,配有悶響的共振峯「嗓音」,逐詞同步;通話可以靜音。這些通話會逐步揭示背景故事:1996 年 5 月 17 日那次長達九分鐘的信號中斷;主持人們被發現對着鏡頭微笑;孩子們倒計時的錄音;第 5 夜前任看守從 Tower Room 內部打來的電話。第 6 夜則是一段自動化的電視臺播報消息。

## 菜單與進度
- 啓動畫面 "▶ PLAY TAPE"。
- 主菜單:昏暗的 3D 舞臺,主持人們位於右側,一個故障閃爍的黃色節目標誌,NEW GAME(帶清除確認)、CONTINUE、NIGHT 6 和 CUSTOM NIGHT(在贏得前處於鎖定狀態)、星星,以及 N1–N6 進度標籤。
- 第 1 夜之前有一塊說明屏幕,包含操作方式和主持人提示。
- 結局:通關第 5 夜會顯示一張報紙(演播室將被拆除,老看守失蹤),並解鎖 Night 6。Night 6 會顯示一張詭異的工資單,並解鎖 Custom Night。全部爲 20 的 Custom Night 會顯示一張簽退卡。每個結局各得一顆星。
- 自定義夜晚:全部五位主持人各有 0–20 的滑塊,另有預設。
- P/Esc 暫停遊戲;窗口失焦時也會自動暫停。

## 風格
復古 VHS 外觀。UI 使用 VT323,節目標誌使用一種粗壯圓潤的展示字體。綠色/琥珀色磷光 HUD:時間和夜晚位於右上角,電量和耗電位於左下角,按鍵提示位於它們上方。在手機寬度下也必須正常工作且不溢出。

## 彩蛋
- 每晚有 6% 的概率,West Hall 的一張海報上寫着 "IT'S STILL ON AIR",主持人的眼睛被劃掉。
- 點擊控制亭裏的節目海報會發出喇叭聲。
- 切換到 CAM 1 時有 1/1000 的概率會讓一個太陽吉祥物出現在舞臺上(在菜單中保存爲 ☀)。
- 在菜單中輸入 "sunny" 即可解鎖全部內容。

## 質量標準
- 從頭到尾完全可玩,控制臺沒有報錯。
- 第 1 夜在首次嘗試時即可通關,且剩餘充足電量。第 5 夜需要技巧。第 6 夜很難。
- 按板塊爲代碼添加註釋:utils/save、textures、puppet models、office、rooms、menu scene、post-processing、audio、game state & AI、input、UI、render loop。

溯源

原作者
kepochnik
發佈日期
2026-10-17(由推文 ID 反解)
原始出處
查看原帖 ↗
收錄來源
zhuyansen/awesome-opus-5.5-video · 2111421758691827905 · 未聲明授權