ai21.net
言語

夜勤ホラーゲームの2モデル比較

夜勤ホラーゲームの2モデル比較 — 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"
あなたは、1990年代に放棄された子ども向けテレビスタジオ「Sunny Hollow Studios」の夜間警備員です。番組のアニマトロニクスのパペットホストたちは、番組が打ち切られた後(最後の生放送: 1996年5月17日)に停止されましたが、夜になると今も「放送を終わらせよう」としています。小さな制御ブースの中で、カメラ、シャッター、ドアライト、天井通気口の封鎖、音による誘引を使い、消耗していく発電機を管理しながら、午前0時から午前6時まで生き延びてください。

## 技術
- 単一の自己完結した index.html(HTML + CSS + JS)。cdnjs の Three.js r128 UMD(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 パスを全体に適用:走査線、フィルムグレイン、色収差、流れるトラッキングバンド、ラインジッター、ビネット、フルスタティックの混入、赤いフラッシュ、暗転フェード。プリセットは3種類:office(控えめ)、camera(強い走査線、樽型歪曲、緑の色味、より多いノイズ)、menu。

## コアループ
- ゲーム内の1時間 = 実時間60秒(午前0時 → 午前6時 = 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時が来ればプレイヤーの勝ち。
- 午前6時:チャイム、"5 → 6 AM" の回転数字スクリーン、その後は自動的に次の夜が始まる。
- 夜2以降は午前2時、3時、4時に AI レベルが +1 される。

## 制御ブース(3D)
- 左右の扉口は暗い廊下に通じている。各扉口には下りてくる波板金属のシャッターがあり、壁のパネルには赤い SHUTTER ボタンと白い LIGHT ボタン(押し続ける)がある。
- ライトを点けないと、扉口にいるパペットはかすかに光る目だけが見える。オフィスの照明は範囲を短くして、扉口が暗いままになるようにする。
- 机:ウサギの耳のアンテナが付いた古いブラウン管テレビ(クリック可能)、2台の静止モニター、回転する扇風機、赤い電話(クリックで通話をミュート)、マグカップ、書類、デスクランプ、LED 付きの VENT SEAL レバーボックス、小さなムースのボブルヘッド。
- 正面の壁:天井の通気口(壁メッシュに実際の穴があり、その奥にダクト、斜めのスリット、下りてきて封鎖する金属板)、ゲーム内時間に同期した掛け時計、番組のポスター、17日に丸が付いた "MAY 1996" のカレンダー、子どものクレヨン画、注意書きのポスター。
- ちらつく蛍光灯とぶら下がったケーブル。

## カメラタブレット
- SPACE キー、または下部バーにカーソルを合わせると切り替わる。
- 重要、ちらつきバグを避けること:2つのバー(CAMERAS / LOWER)に mouseenter/mouseleave を使わないこと(同じ位置にあり、タブレットがピンポン状態になる)。グローバルな pointermove ハンドラ内でポインタ位置からバーの領域を判定する。1回の訪問につき1回だけ反転(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 付きの機材ラック、スタティック/カウントダウンを映すブラウン管の壁、テレビイベント中に点灯する ON AIR の看板)。

## 敵キャラクター(オリジナル、それぞれ固有のメカニクス)
約5秒ごとに移動の機会:random(0..20) < AI レベルなら移動する。
1. MR. ANTLER:フェルト製のムースのトークショーホスト(えんじ色のブレザー、黄色の蝶ネクタイ、掌状の角、垂れ下がったまぶた、マイク)。ルート 1 → 2/3 → 4 → 左のドア。あなたが彼の現在のカメラを見ている間は移動しない。西ホールでは、見られていない間だけカメラの方へ歩く。ドアの前では lerp(10, 4.5, AI/20) 秒待つ:シャッターが閉じていれば → 大きな音で叩き、CAM 2/3 に退く。開いていれば → ジャンプスケア。
2. SPROCKET:ブリキのロボットの共同ホスト(錆びた缶の頭、電球の目、点滅するアンテナ、胸のダイヤル、カセットスロット)。ルート 1 → 8 → 5 → 右のドア。彼の1〜2歩後ろのカメラでジングルを流すと、彼はそこへ引き戻される(15% の確率でテープが飛ぶ)。約40秒以内に3回の誘引が成功するたびに、テープが25秒間ジャムする:赤い目、ジッター、攻撃性 +5、誘引が効かなくなる。右のドアでは Antler と同じように振る舞う(シャッターで遮られる)。
3. LULU:ピンクの縞模様の靴下のマリオネットで、ボタンの目、毛糸の髪、紐の付いた木の操作棒。CAM 6 にいて、不満メーターを持つ(見られていない間は毎秒 +AI×0.14、見られている間は毎秒 −9)。4つの見えるポーズ(クローゼットの奥 → 身を乗り出す → カメラをじっと見る)があり、彼女のポーズは見られていない間だけ更新される。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 を押すかテレビをクリックする。終わってしまうと、10秒間すべてのカメラが "NO SIGNAL" になり、その間 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 m から顔の距離まで突進し、頭は目の高さに合わせられ、強いライトで照らされる。カメラの揺れ、強いクロマ/ジッター、短い赤いフラッシュ、大きな合成された叫び声(デチューンしたノコギリ波 + LFO + ディストーション + ノイズ)。約1.35秒後、カラーバーとスタティックの上に "TECHNICAL DIFFICULTIES" を表示し、誰に捕まったか、1行のヒント、RETRY と MENU を出す。

## オーディオ(すべて合成)
発電機の唸り、扇風機のノイズ、カメラのヒス、照明のブーンという音、パンされた足音(Antler は左、Sprocket は右に金属的な音)、シャッターの閉まる音、叩く音、通気口を引っかく音、呼吸、明るいがデチューンされた番組ジングル(ローパスされ、カメラの側にパンされる)、オルゴール、遠くの歓声を伴う午前6時のチャイム、環境音のきしみ/水滴/ささやき/遠くの子どもの声、メニューのドローン。音声は最初のクリックから開始する。

## ストーリー
毎晩、電話が3〜4行を打ち出し、こもったフォルマントの「声」が1語ずつ同期する。ミュートも可能。通話は徐々に設定を明かしていく:1996年5月17日の9分間の放送中断;カメラに向かって笑っているのが見つかったホストたち;子どもがカウントダウンする録音;夜5に塔の部屋の中から電話してくる前の警備員。夜6は自動の局からのメッセージ。

## メニューと進行
- 起動画面 "▶ PLAY TAPE"。
- メインメニュー:暗い3Dステージでホストたちが右側に立ち、グリッチする黄色の番組ロゴ、NEW GAME(消去確認付き)、CONTINUE、NIGHT 6 と CUSTOM NIGHT(獲得するまでロック)、スター、N1〜N6 の進行チップ。
- 夜1の前に、操作方法とホストのヒントを示すオリエンテーション画面。
- エンディング:夜5をクリアすると新聞が表示され(スタジオは取り壊し予定、元警備員は行方不明)、夜6がアンロックされる。夜6では不気味な給与明細が表示され、カスタムナイトがアンロックされる。全項目20のカスタムナイトではサインオフカードが表示される。それぞれにスターが1つ。
- カスタムナイト:5体すべてのホストに0〜20のスライダー、加えてプリセット。
- P/Esc でゲームを一時停止;フォーカスが外れたときにも自動で一時停止する。

## スタイル
レトロな VHS の見た目。UI には VT323、番組ロゴには太く丸みのあるディスプレイフォント。緑/琥珀色のリン光 HUD:時間と夜は右上、電力と使用量は左下、その上にキーのヒント。スマートフォン幅でもはみ出さずに動作すること。

## イースターエッグ
- 1夜につき6% の確率で、西ホールのポスターが "IT'S STILL ON AIR" と読め、ホストたちの目が×で消されている。
- ブースの番組ポスターをクリックするとホーンが鳴る。
- CAM 1 に切り替えたとき 1/1000 の確率で、ステージに太陽のマスコットが現れる(メニューに ☀ として保存される)。
- メニューで "sunny" と入力するとすべてがアンロックされる。

## 品質基準
- 最初から最後まで完全にプレイ可能で、コンソールエラーがないこと。
- 夜1は電力に余裕を残して初回でクリア可能。夜5は技術が必要。夜6は難しい。
- コードはセクションごとにコメントを付ける:utils/save、テクスチャ、パペットモデル、オフィス、部屋、メニューシーン、ポストプロセス、オーディオ、ゲーム状態と AI、入力、UI、レンダーループ。

出典

原作者
kepochnik
公開日
2026-10-17(由推文 ID 反解)
原典
元の投稿を見る ↗
収録元
zhuyansen/awesome-opus-5.5-video · 2111421758691827905 · ライセンス未表明