Skip to content

Vampire/Digital code world survivors-style idle game powered by coding - earn XP from real coding activity https://daredev256.github.io/vibe-coder/

License

Notifications You must be signed in to change notification settings

DareDev256/vibe-coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VIBE CODER ๐ŸŽฎโšก

A vampire survivors-style idle game where you earn XP from real coding activity. Code to conquer!

Phaser 3 Vite Electron Node Tests Deploy Play Online License

Vibe Coder gameplay โ€” Wave 7 with Double XP event, enemies, shrines, and procedural map
Wave 7 in Debug Zone โ€” Double XP event active, enemies swarming, shrines waiting

๐ŸŽฏ About

Vibe Coder is an idle survival game that rewards you for coding. Connect it to your development workflow and watch your character grow stronger as you write code. Every tool call, every prompt, every commit powers up your in-game character.

While you code, your character:

  • ๐ŸŽฏ Hunts enemies with smart auto-play AI (HUNT / EVADE / IDLE modes)
  • โš”๏ธ Auto-attacks with 30 weapons including 11 evolved combos
  • ๐Ÿ”„ Earns permanent prestige bonuses through the Rebirth system
  • ๐ŸŽฒ Discovers interactive shrines with risk/reward choices
  • ๐Ÿ’ฌ Comments on your coding with 90+ unique quotes

๐Ÿ’ฌ 90+ Speech Bubble Quotes

Your character reacts to everything with contextual commentary:

Category Examples
Combat (20) "Target acquired!", "Tactical retreat", "stretches"
Coding Activity (20) "Code go brrrr", "Ship it ship it!", "We cooking rn"
Time-of-Day (17) "3am coding hits different", "Saturday deploy? Bold move"
CLI-Specific (10) "Claude cooking!", "Codex in the house!", "Cursor flow!"
Title Screen (20+) "Bugs fear me", "npm install infinite", "ALL HAIL DareDev256"

How It Works

 You Code                    Vibe Coder
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  WebSocket   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Claude   โ”‚โ”€โ”€on-promptโ”€โ”€โ–ถโ”‚  XP Server (:3333)           โ”‚
โ”‚ Code     โ”‚  hook fires  โ”‚    โ”‚                          โ”‚
โ”‚          โ”‚              โ”‚    โ–ผ                          โ”‚
โ”‚ IDE      โ”‚โ”€โ”€HTTP POSTโ”€โ”€โ–ถโ”‚  Game Engine (Phaser 3)      โ”‚
โ”‚ Terminal โ”‚              โ”‚    โ”œโ”€ Auto-Play AI            โ”‚
โ”‚ etc.     โ”‚              โ”‚    โ”œโ”€ 19 Enemy Types + Bosses โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚    โ”œโ”€ Weapon Evolution        โ”‚
                          โ”‚    โ””โ”€ Prestige System         โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Core Gameplay

๐ŸŽฎ Smart Auto-Play AI

  • HUNT Mode โš”๏ธ - Actively pursues nearest enemy within optimal range
  • EVADE Mode ๐Ÿ›ก๏ธ - Circle-strafes when HP < 30% or swarmed by 4+ enemies
  • IDLE Mode ๐Ÿ˜ด - Gentle wander toward center when area is clear
  • Mode-specific speech bubbles and visual indicators

๐Ÿ‘พ 19 Enemy Types

Type Examples Unique Behaviors
Classic (6) Bug, Glitch, Memory Leak, Syntax Error, Infinite Loop, Race Condition Teleporting, orbiting, erratic speed
Coding (7) Segfault, Dependency Hell, Git Conflict, Stack Overflow, 404, CORS Error, Type Error Instant-kill zones, minion spawning, splitting, invisibility, shape-shifting
AI-Themed (6) Hallucination, Prompt Injection, Mode Collapse, Token Overflow, Context Loss, Overfitting Fake enemies, movement hijacking, self-cloning, movement prediction

๐Ÿ‘น 4 Epic Bosses + Mini-Boss

Boss Wave Special Ability
Stack Overflow 20 Spawns minions
Null Pointer 40 Teleportation
Memory Leak Prime 60 Splits on damage
Kernel Panic 80 Enrages at low HP
Deadlock Mini Freezes player on hit

โš”๏ธ 30 Weapons & Evolution System

Category Count Examples
Ranged 9 Basic, Spread, Pierce, Homing, Freeze
Melee 4 Sword, Spear, Boomerang, Kunai
Rare 3 rm -rf, sudo, Fork Bomb
Legendary 3 Hunter's Warglaive, Void Reaper, Celestial Blade
Evolved 11 Combine 2 weapons for super forms

All 11 Weapon Evolution Recipes โ€” Collect both ingredients to evolve:

Recipe Result Special
Spread + Pierce LASER BEAM Multi-pierce
Orbital + Rapid PLASMA ORB 5 orbitals
Pierce + Rapid CHAIN LIGHTNING 3-chain arcs
Spread + Rapid BULLET HELL 8-projectile spray
Orbital + Spread RING OF FIRE 8-orbital ring
Homing + Pierce SEEKING MISSILE Piercing tracker
Bounce + Spread CHAOS BOUNCE 5-bounce scatter
AOE + Orbital DEATH AURA 150px kill zone
Freeze + Pierce ICE LANCE 3s freeze-through
Homing + Rapid SWARM 3 homing drones
Freeze + AOE BLIZZARD AoE freeze field

๐ŸŒ 6 Biome Stages

Each biome has distinct visuals, environmental hazards, and destructible objects:

Debug Zone โ†’ Memory Banks โ†’ Network Layer โ†’ Kernel Space โ†’ Cloud Cluster โ†’ Singularity

Map features: Walls (block movement + projectiles), hazard zones (5-20 damage), destructible crates (drop XP/weapons), and teleporter pairs for fast traversal.

๐Ÿ”„ Meta-Progression

๐Ÿ† Rebirth (Prestige) System

Reach wave milestones to permanently power up across all future runs:

Rank Wave Bonus
Junior Dev 50 +5% all stats, +10% XP
Mid-Level 100 +10% all stats, +20% XP, +1 starting weapon
Senior Dev 150 +15% all stats, +30% XP, +2 starting weapons
Tech Lead 200 +20% all stats, +40% XP, +3 starting weapons
Architect 250 +25% all stats, +50% XP, +3 starting weapons

Tracks lifetime stats: total rebirths, lifetime kills, highest wave ever reached.

๐Ÿ“Š 7 Permanent Upgrades

Spend XP on persistent buffs that carry across runs:

Upgrade Per Level Max Total Bonus
DAMAGE+ +10% 10 +100%
HEALTH+ +15% 10 +150%
SPEED+ +8% 8 +64%
ATTACK+ +12% 8 +96%
XP GAIN+ +15% 10 +150%
CRIT+ +5% 6 +30%
DURATION+ +20% 5 +100%

๐ŸŽ–๏ธ 3 Legendary Weapons

Ultra-rare permanent unlocks that persist forever:

Legendary Drop Rate Effect
Hunter's Warglaive 0.01% Twin spinning blades
Void Reaper 0.05% Soul-consuming scythe
Celestial Blade 0.03% Triple starlight orbitals

๐ŸŽฒ Run Variety

โš”๏ธ Run Modifiers

Mutators applied at run start that change how you play:

Modifier Effect
Glass Cannon 2x damage, 50% max health
Vampiric Enemies Enemies heal 10% of damage dealt
Weapon Frenzy -50% weapon duration, +50% drop rate
Bullet Hell +100% projectiles, +50% enemies
Marathon Waves 50% longer, +25% XP

๐ŸŽช Mid-Wave Events

15% chance per wave (starting wave 5) to trigger dynamic chaos:

Event Duration Effect
Boss Incoming ๐Ÿ’€ 30s Countdown, then mini-boss spawns
Double XP โญ 20s 2x XP from all sources
Curse ๐Ÿ˜ˆ 60s All enemies +50% speed
Jackpot ๐ŸŽฐ 30s Only rare weapon drops
Swarm ๐Ÿ› 15s 20 enemies spawn rapidly

๐Ÿ›๏ธ Interactive Shrines

2 shrines spawn per stage. Walk up and press E to activate:

Shrine Cost Reward
Power โš”๏ธ 25% HP +50% damage for 30s
Gamble ๐ŸŽฒ Free Random: Jackpot XP, Weapon, Heal, Curse, or Nothing
Wisdom ๐Ÿ“š 500 XP Instant level up
Protection ๐Ÿ›ก๏ธ Current weapon 10s invincibility
Chaos ๐ŸŒ€ 10% HP Random: Double XP, Speed, Invincibility, Enemy Freeze, Curse, or Boss

๐Ÿ“Š Game Over Stats Screen

On death, a full run recap overlay shows your performance before respawning:

  • Wave Reached / Time Survived / Enemies Killed / Level / Weapons Found / Stage
  • BITS earned with breakdown (wave + kills + xp bonuses)
  • NEW RECORD badge when you beat your high wave
  • Press any key to continue, or auto-dismisses after 8s

๐Ÿ’พ Save & Continue

  • Auto-saves at wave completion
  • CONTINUE option on title screen with "Wave X, Stage Y, Xm ago" summary
  • Saves expire after 24 hours

๐ŸŽฎ Controls

Key Action
WASD / Arrows Move
E Interact with Shrines
ESC / P Pause
M Toggle Music
SPACE Manual XP (offline mode)
G Secret: Unlock Hunter's Warglaive

Immortal Mode โ€” Toggle in Settings. Respawn on death instead of game over (50% XP penalty). Great for idle play while coding.

๐Ÿš€ Quick Start

Play Online (No Install)

โ–ถ๏ธ Play Vibe Coder Now

Press SPACE to manually gain XP, or connect the hooks for real coding rewards!

Local Development

npm install       # Install dependencies
npm run dev       # Start the game
npm run server    # (Optional) XP server for live coding rewards

Open http://localhost:5173 in your browser.

๐Ÿ–ฅ๏ธ Desktop App

Run Vibe Coder as a native desktop app with system tray integration!

Download

Check the Releases page for pre-built binaries:

  • macOS: .dmg installer (Universal - Intel + Apple Silicon)
  • Windows: .exe installer
  • Linux: .AppImage or .deb

Features

  • System Tray - Lives in your menu bar, always accessible
  • Built-in XP Server - No separate server needed
  • 4 Window Modes - Floating, Corner Snap, Desktop Widget, Mini HUD
  • Global Shortcuts - Cmd/Ctrl+Shift+V toggle, Cmd/Ctrl+Shift+W cycle modes

Build from Source

npm run electron:dev    # Development mode (hot reload)
npm run electron:build  # Build distributable

๐Ÿ”Œ AI Coding Tool Integration

Connect Vibe Coder to your AI coding assistant for real XP gains while coding!

Note: The online demo doesn't support live XP (requires local server). For the full experience, run locally with hooks connected.

Supported tools โ€” pre-built hooks included for each:

Tool Hook Script Bonus XP
Claude Code hooks/claude-code-hook.sh +15 per action
Codex hooks/codex-hook.sh +12 per action
Gemini hooks/gemini-hook.sh +12 per action
Cursor hooks/cursor-hook.sh +10 per action
Generic hooks/vibe-coder-hook.sh +8 per action

Quick Setup (Claude Code):

  1. Clone the repo and run npm install
  2. Start the XP server: npm run server
  3. Copy hooks/on-prompt.sh to ~/.claude/hooks/
  4. Start the game: npm run dev
  5. Code normally โ€” XP flows into the game automatically!

๐Ÿ“– Full Setup Guide โ€” Detailed instructions, troubleshooting, custom integrations

๐Ÿ“ Project Structure

vibe-coder/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.js               # Game config, upgrades, legendaries
โ”‚   โ”œโ”€โ”€ __tests__/             # Vitest unit tests (240 tests)
โ”‚   โ”œโ”€โ”€ scenes/
โ”‚   โ”‚   โ”œโ”€โ”€ BootScene.js       # Procedural texture generation
โ”‚   โ”‚   โ”œโ”€โ”€ TitleScene.js      # Menu, upgrades, weapon gallery
โ”‚   โ”‚   โ””โ”€โ”€ ArenaScene.js      # Main gameplay, enemies, bosses
โ”‚   โ”œโ”€โ”€ systems/
โ”‚   โ”‚   โ”œโ”€โ”€ EventManager.js    # Mid-wave random events
โ”‚   โ”‚   โ”œโ”€โ”€ MapManager.js      # Procedural map generation & biomes
โ”‚   โ”‚   โ”œโ”€โ”€ RebirthManager.js  # Prestige system (permanent bonuses)
โ”‚   โ”‚   โ”œโ”€โ”€ RunModifiers.js    # Run-start mutators
โ”‚   โ”‚   โ”œโ”€โ”€ SaveManager.js     # Run continuation & auto-save
โ”‚   โ”‚   โ””โ”€โ”€ ShrineManager.js   # Interactive risk/reward shrines
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ”œโ”€โ”€ SpatialHash.js     # O(n) spatial collision detection
โ”‚       โ”œโ”€โ”€ audio.js           # Procedural sound system
โ”‚       โ””โ”€โ”€ socket.js          # WebSocket XP client
โ”œโ”€โ”€ electron/                  # Desktop app (main, tray, windows)
โ”œโ”€โ”€ server/                    # Standalone XP server
โ”œโ”€โ”€ hooks/                     # Claude Code hooks
โ””โ”€โ”€ index.html

๐Ÿ—๏ธ Technical Highlights

Decision Why
Zero external assets All graphics + audio generated procedurally at runtime via Canvas/Web Audio API โ€” no sprite sheets, no sound files, instant load
Spatial hashing O(n) collision detection via SpatialHash grid instead of O(nยฒ) pairwise checks โ€” handles 200+ entities at 60fps
Real-time XP pipeline WebSocket bridge turns any dev tool (Claude Code, IDE, CLI) into a game controller via simple HTTP POST
Procedural maps Each biome generates walls, hazards, destructibles, and teleporters at runtime โ€” no static level data
Single-source color system All 30 weapon colors derived from weaponTypes/evolutionRecipes โ€” zero duplication, impossible to mismatch
Data-driven enemy spawning Enemy wave timing, spawn weights, and textures all live in enemyTypes โ€” adding an enemy is a single line change
Hardened XP servers All HTTP endpoints validate input against strict allowlists, enforce body size limits, and set security headers (X-Content-Type-Options, X-Frame-Options, Referrer-Policy)
240 unit tests Core systems + game mechanics + shrine data + save lifecycle tested with Vitest

๐Ÿ”ง Tech Stack

  • Phaser 3 - Game engine
  • Vite - Build tool & dev server
  • Electron - Desktop app wrapper
  • Vitest - Unit testing (240 tests)
  • Web Audio API - Procedural sound generation
  • Canvas API - Procedural graphics (no external assets!)
  • WebSocket - Real-time XP streaming
  • Node.js - XP server backend

๐Ÿงช Testing

npm test            # Run all tests once
npm run test:watch  # Watch mode (re-runs on file changes)

240 unit tests across 8 test suites cover core game systems (SpatialHash, RunModifiers, SaveManager, EventManager, RebirthManager, ShrineManager), game mechanics (GameMechanics โ€” XP curves, player stat scaling, spawn pools, weapon balance, evolution recipes, crit chance), and combat edge cases (CombatEdgeCases โ€” health scaling caps, boss tier selection, crit pipeline, fork bomb decay, git-conflict splits, vampiric healing, wave XP stacking, spawn capping).

๐Ÿ“‹ Changelog

v0.8.0 โ€” Game Over Stats Screen: full run recap overlay on death showing wave, time survived, kills, level, weapons found, stage, and BITS earned with breakdown. NEW RECORD badge for high wave beats. Gameplay freezes during overlay.

v0.7.9 โ€” Fixed test stderr noise that caused Passion Agent false failures (console.error leaking from error-path tests), added CI test gate to deploy workflow.

v0.7.8 โ€” Security hardening: input validation with allowlists on all XP server endpoints, request body size limits, security headers, CORS restriction, .gitignore hardened for secrets, 4 npm dependency vulnerabilities patched.

v0.7.5 โ€” Added 50 unit tests: 31 ShrineManager tests (shrine definitions, gamble weight distribution, chaos effects, cost logic), 19 SaveManager persistence tests (save/load lifecycle, 24h expiry, corrupted JSON recovery).

v0.7.3 โ€” Fixed 3 memory leaks: pause menu keyboard handlers stacking, weapon drop infinite tweens persisting after destroy, shrine prompt tween surviving scene shutdown.

v0.7.2 โ€” Fixed 15 announcement texts invisible off-camera, event timer bar scale clamping, spawn pool crash guard.

See CHANGELOG.md for full version history.

๐Ÿ“„ License

MIT โ€” fork it, mod it, ship it.

๐ŸŽจ Credits

Built with Claude Code by DareDev256.

Hunter's Warglaive artwork inspired by Luu.


Code to Conquer! ๐Ÿš€