How egamijun/ikkou works
IKKOU is a browser-based, top-down horror game: the player enters through the Next.js page, the client mounts Phaser with a registered content bundle, and the main scene runs exploration until capture or escape. Room layouts and ghost definitions are authored as JSON and assembled into typed content. The gameplay scene owns movement, ghost pursuit and spotting, visibility rendering, keys, and floor changes; it also invokes procedural audio and dispatches to the appropriate ending scene. The excerpts show scene setup and key transitions, but not every gameplay method, so internal gameplay relationships are summarized rather than expanded.
Main entry points: MainScene.ts Gameplay scene · config.ts Phaser setup · index.ts Default bundle · GameCanvas.tsx Game canvas
Components 13
Web entry
- Home page
apps/game/src/app/page.tsx - Game canvas
apps/game/src/components/GameCanvas.tsx
Game content
- Default bundle
packages/content/src/index.ts - Room maps
packages/content/rooms - Ghost definitions
packages/content/ghosts - Content schemas
packages/content/src/types.ts
Game runtime
- Phaser setup
apps/game/src/game/config.ts - Boot scene
apps/game/src/game/scenes/BootScene.ts - Gameplay scene
apps/game/src/game/scenes/MainScene.ts - Procedural audio
apps/game/src/game/audio.ts
Game outcomes
- Capture ending
apps/game/src/game/scenes/GameOverScene.ts - Escape ending
apps/game/src/game/scenes/ClearScene.ts
Other components
- Player
Connections 18
- Player → Home page: opens
README.md - Home page → Game canvas: loads client
apps/game/src/app/page.tsx - Game canvas → Default bundle: uses bundle
apps/game/src/components/GameCanvas.tsx - Game canvas → Phaser setup: creates game
apps/game/src/components/GameCanvas.tsx - Default bundle → Room maps: registers maps
packages/content/src/index.ts - Default bundle → Ghost definitions: registers ghost
packages/content/src/index.ts - Default bundle → Content schemas: types as
packages/content/src/index.ts - Phaser setup → Boot scene: registers scene
apps/game/src/game/config.ts - Phaser setup → Gameplay scene: registers scene
apps/game/src/game/config.ts - Phaser setup → Capture ending: registers scene
apps/game/src/game/config.ts - Phaser setup → Escape ending: registers scene
apps/game/src/game/config.ts - Phaser setup → Default bundle: stores bundle
apps/game/src/game/config.ts - Boot scene → Gameplay scene: starts
apps/game/src/game/scenes/BootScene.ts - Gameplay scene → Procedural audio: invokes
apps/game/src/game/scenes/MainScene.ts - Gameplay scene → Capture ending: starts on capture
apps/game/src/game/scenes/MainScene.ts - Gameplay scene → Escape ending: starts on escape
apps/game/src/game/scenes/MainScene.ts - Capture ending → Gameplay scene: restarts
apps/game/src/game/scenes/GameOverScene.ts - Escape ending → Gameplay scene: restarts
apps/game/src/game/scenes/ClearScene.ts