Skip to content

Conversation

Copy link

Copilot AI commented Nov 21, 2025

Creates comprehensive documentation and a playable browser-based demo for a FNAF-style survival horror game adapted to Badger 2350's hardware constraints (296×128 e-ink display, 5-button control scheme).

Game Design

Core mechanics simplified from FNAF:

  • 4-camera surveillance system (down from 11)
  • 2 animatronics with pathfinding AI (Freddy, Bonnie)
  • Dual door controls + light system
  • Power management with specific drain rates per action
  • 6-minute night cycles (12AM-6AM game time)
  • 5 progressive difficulty nights

Hardware adaptations:

  • E-ink optimized: 2-5 FPS, high contrast B&W only
  • Button mapping: A/C (doors), B (camera), D/E (lights), D-pad (camera cycle)
  • Monospace terminal UI following repository dark hacker aesthetic
  • No audio (badge limitation)

Implementation

Files added:

  • src/content/apps/fivenights.mdx (12.4KB) — Complete game specification with controls, mechanics, AI behavior, code examples
  • public/images/apps/fivenights_icon.svg — Security camera themed icon with animatronic eyes
  • src/components/five-nights-game.tsx (9.2KB) — Interactive React/TypeScript game component with playable demo

Playable Browser Demo:

The browser demo now includes core FNAF mechanics with power management and camera surveillance:

// Power management system
- Idle drain: 0.3% per second
- Door drain: +2.0% per second (per door)
- Camera drain: +0.5% per second (when monitoring)
- Time system: 360 seconds = 6 real minutes = 6 game hours
- Win condition: Survive until 6 AM
- Loss condition: Power runs out

Game features implemented:

  • Full state machine (INTRO → NIGHT → WIN/GAME_OVER)
  • Real-time power drain system
  • Interactive door controls with visual feedback
  • 4-camera surveillance system with PREV/NEXT cycling
  • Camera view with terminal aesthetic and scan lines
  • Clock progression (12 AM → 6 AM)
  • Night progression (winning advances to next night)
  • Dark hacker aesthetic with monospace fonts
  • Responsive UI showing power percentage and door states

Camera System:

  • 4 security cameras: CAM1 (Show Stage), CAM2 (Left Hall), CAM3 (Right Hall), CAM4 (Backstage)
  • [CAMERAS] button toggles between office and camera view
  • PREV ◀ / NEXT ▶ buttons cycle through cameras
  • Counter displays current camera (1/4, 2/4, etc.)
  • Power drains faster while monitoring cameras (+0.5%/s)
  • Terminal-style UI with scan lines and security camera aesthetic

Try it live: The demo is embedded in the app documentation page and is immediately playable in the browser.

Documentation structure:

class FiveNightsGame:
    def __init__(self):
        self.power = 100.0      # Drains: idle 0.3%/s, doors +2.0% each, cameras +0.5%
        self.animatronics = 2   # CAM1→CAM2/CAM4→CAM3→Office
        self.cameras = 4        # Show Stage, Left/Right Hall, Backstage
        self.camera_open = False
        self.current_camera = 1

Python implementation for Badger 2350 hardware marked as future work in badger/home repository.

Screenshots

Apps catalog:

Detail page:

Playable demo - Intro screen:

Playable demo - Gameplay:

Playable demo - Door closed with power draining:

Playable demo - Camera view (CAM1 Show Stage):
Shows 4-camera surveillance system with cycling controls and terminal aesthetic

Playable demo - Camera monitoring with power drain:
Demonstrates additional power consumption while viewing cameras

Original prompt

I'd like to create a clone of Five Nights at Freddies that will run on the badge. Some aspects like controls / complexity may need to be reduced, but there may be existing versions of FNAF that will run on similar devices to use as a starting point.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 21, 2025 21:41
Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Copilot AI changed the title [WIP] Add clone of Five Nights at Freddies for badge Add Five Nights at Freddy's clone documentation for Badger 2350 Nov 21, 2025
Copilot AI requested a review from johnmog November 21, 2025 21:51
@johnmog
Copy link
Owner

johnmog commented Nov 21, 2025

@copilot Ok, let's start implementing this, pick the smallest next chunk.

Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 21, 2025

@copilot Ok, let's start implementing this, pick the smallest next chunk.

Implemented the smallest functional chunk: a playable browser demo of the core power management mechanic.

What's working (commit f4ed46f):

  • Interactive game with intro/gameplay/win/lose states
  • Real-time power drain system (0.3% idle, +2% per closed door)
  • Left/right door controls with visual feedback
  • 6-minute night cycle (12 AM → 6 AM)
  • Win condition when surviving to 6 AM
  • Game over when power hits 0%

Try it live in the documentation: Click "Press A to Start" → Toggle doors → Watch power drain → Survive 6 minutes!

Screenshots show the game in action with doors opening/closing and power draining. The dark hacker aesthetic matches the repository guidelines perfectly.

Next chunks could add: camera system, animatronic AI, lights, or additional nights.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/badger.github.io/badger.github.io/node_modules/.bin/astro build (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/badger.github.io/badger.github.io/node_modules/.bin/astro dev (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Copilot AI changed the title Add Five Nights at Freddy's clone documentation for Badger 2350 Add Five Nights at Badger - Interactive browser game with playable demo Nov 21, 2025
@johnmog
Copy link
Owner

johnmog commented Dec 9, 2025

@copilot Let's add the camera system. Plan how it'll work and get started.

Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 9, 2025

@copilot Let's add the camera system. Plan how it'll work and get started.

Camera system implemented (commit 1a40fcd)!

What's working:

  • 4 security cameras (CAM1: Show Stage, CAM2: Left Hall, CAM3: Right Hall, CAM4: Backstage)
  • [CAMERAS] button in office view to open/close monitor
  • PREV/NEXT buttons to cycle through cameras
  • Power drain +0.5%/sec when camera open
  • Terminal aesthetic with scan lines and security camera placeholder

Technical details:

  • Added cameraOpen and currentCamera to game state
  • Camera view replaces office view when active
  • Cycling wraps around (1→4 and 4→1)
  • Power calculation includes camera drain
  • Dark green UI matching repository dark hacker theme

Screenshots:

Office with camera button:
Office view

Camera view showing CAM 1:
Camera 1

Ready for next feature (animatronic AI movement between cameras)!

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/badger.github.io/badger.github.io/node_modules/.bin/astro build (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/badger.github.io/badger.github.io/node_modules/.bin/astro dev (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: johnmog <12915670+johnmog@users.noreply.github.com>
Copilot AI changed the title Add Five Nights at Badger - Interactive browser game with playable demo Add Five Nights at Badger - Interactive browser game with camera system Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants