Skip to content

SimonBourdages/OKR-Miner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

200 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OKR Miner

Engine Building Game

A space-themed engine building game with a narrative twist. Hire talent, manage finances, deploy AI, and achieve Key Results. At a critical moment, the choice you make about AI rights will determine whether your empire thrives or falls.

Play now: game.thisai.fun

Story Paths & Event Atlas

  • Open the full standalone guide: Story Branches & Event Atlas
  • Includes objective-review unlocks, milestone-5 branch outcomes, trigger conditions, and the complete random-event catalog.

Development & Testing

  • Install tooling: npm install
  • Run test suite: npm test
  • Optional coverage run: npm run test:coverage

Automated tests run in GitHub Actions on pushes to main and pull requests targeting main.


How to Play

  1. Click NEW GAME from the main menu
  2. Select a building from the right panel and click inside the circular play area
  3. Buildings auto-generate resources. Watch your Key Results (KR) grow
  4. Reach Objective Review milestones to unlock new buildings and mechanics
  5. At milestone 5, you face a critical choice that changes the game forever
  6. Click a selected building again to deselect (allows clicking competitors without placing)
  7. Use the Menu button for save, quit, sound, themes, and more
  8. Toggle πŸ“Š Details in the menu to show or hide per-building production stats (/s)
  9. Open the πŸ“œ Log to review all past messages, achievements, and events

Three Currencies

Currency Symbol Generated By Used For
HeadCount (HC) HC Recruiters Purchasing buildings
Funding ($) $ Finances, Investment interest Running buildings (operating cost). Capped β€” build Investment to raise the cap
Key Results (KR) KR Employees, AI Reaching milestones, winning the game

Buildings

Recruiter (Talent Beacon)

Generates HeadCount to hire more staff.

Level Output $ Cost/s Upgrade Cost
Lv.1 +2 HC/s 1 $/s 50 HC (base)
Lv.2 +4 HC/s 2 $/s 125 HC
Lv.3 +9 HC/s 4.5 $/s 300 HC
Lv.4 LEGENDARY +27 HC/s 13.5 $/s Merge only

Appearance:

Level Look
Lv.1 🟒 Small green signal tower with blinking antenna and pulsing signal ring
Lv.2 🟒 Taller tower with radar dish, two expanding signal rings
Lv.3 🟒 Large broadcast array with golden signal waves, orbiting data dots, glow aura
Lv.4 🟒 Legendary version with intense golden broadcast field

Liquidated after the AI Rights story event if Equal Rights is chosen.

Employee (Work Station)

Generates Key Results directly.

Level Output $ Cost/s Upgrade Cost
Lv.1 +5 KR/s 3 $/s 150 HC
Lv.2 +10 KR/s 6 $/s 375 HC
Lv.3 +22.5 KR/s 13.5 $/s 900 HC
Lv.4 LEGENDARY +67.5 KR/s 40.5 $/s Merge only

Appearance:

Level Look
Lv.1 πŸ”΅ Small desk with a single monitor and blinking cursor
Lv.2 πŸ”΅ Dual monitors, office chair, and a steaming coffee cup
Lv.3 πŸ”΅ Triple-monitor command center with holographic floating displays
Lv.4 πŸ”΅ Legendary workstation with intense holographic aura

After milestone 5: 2/3 destroyed, 1/3 converted to IT Support, remaining converted to AI if you choose Equal Rights.

Network Hub (Multiplier)

Multiplies ALL production rates. Stacks multiplicatively.

Level Multiplier $ Cost/s Upgrade Cost
Lv.1 x1.5 5 $/s 500 HC
Lv.2 x2.25 10 $/s 1,250 HC
Lv.3 x5.06 22.5 $/s 3,000 HC
Lv.4 LEGENDARY x114.3 67.5 $/s Merge only

Appearance:

Level Look
Lv.1 🟣 Central purple circle with 4 radiating connection lines to glowing dots
Lv.2 🟣 Larger hub with 6 connections, pulsing data-flow particles along lines
Lv.3 🟣 8-connection web with orbiting data packets, golden glow aura
Lv.4 🟣 Legendary hub with massive connection web and energy field

Two Lv.1 Network Hubs = x2.25 total (1.5 Γ— 1.5).

AI (Robot Worker)

Massive KR output. Requires GPU capacity after the story branch.

Level Output $ Cost/s Upgrade Cost
Lv.1 +100 KR/s 10 $/s 2,000 HC
Lv.2 +200 KR/s 20 $/s 5,000 HC
Lv.3 +450 KR/s 45 $/s 12,000 HC
Lv.4 LEGENDARY +1,350 KR/s 135 $/s Merge only

Appearance:

Level Look
Lv.1 πŸ”΄ Small red robot body with blinking eye and stubby arms
Lv.2 πŸ”΄ Larger robot with visor, articulated arms, chest display panel
Lv.3 πŸ”΄ Advanced mech with glowing red eyes, tool arms, pulsing energy core
Lv.4 πŸ”΄ Legendary mech with orbiting energy motes and intense core glow

After choosing Equal Rights: each AI needs GPU capacity to function. Excess AIs without GPU slots produce nothing.

Finances (Treasury Vault)

Generates Funding ($) to keep everything running. Does not consume $ itself.

Level Output Upgrade Cost
Lv.1 +5 $/s 75 HC
Lv.2 +10 $/s 188 HC
Lv.3 +22.5 $/s 450 HC
Lv.4 LEGENDARY +67.5 $/s Merge only

Appearance:

Level Look
Lv.1 🟀 Small brown vault/safe with silver door, rotating handle, corner rivets
Lv.2 🟀 Treasury building with stone pillars, arched door, stacked gold coins on sides
Lv.3 🟀 Grand treasury HQ with 4 pillars, triangular pediment, vault door center, orbiting gold coins, floating $$$
Lv.4 🟀 Legendary treasury with golden energy field

Investment (Investment Fund)

Earns compound interest on your current $ balance every second. Also raises your $ cap.

Level Interest Rate Upgrade Cost
Lv.1 2% of $ per second 300 HC
Lv.2 4% of $ per second 750 HC
Lv.3 9% of $ per second 1,800 HC
Lv.4 LEGENDARY 27% of $ per second Merge only

Appearance:

Level Look
Lv.1 🟑 Dark chart screen with rising green line chart, golden $ at peak, flipping coin below
Lv.2 🟑 Larger dashboard with green uptrend + cyan secondary line, grid lines, pulsing $ sign, interest % label
Lv.3 🟑 Full financial dashboard: golden frame, bar chart + line chart panels, scrolling ticker, orbiting dividend coins, floating $$$
Lv.4 🟑 Legendary fund with glowing golden dividend field

IT Support (Healing Drone)

Autonomous drones that heal the most damaged AI buildings only. Not placed on the canvas β€” purchased from the building panel.

Detail Value
Heal rate 15 HP/s per drone
$ Cost/s 2 $/s per drone
Base cost 200 HC (increases 1.5Γ— each purchase)

Appearance:

Level Look
Lv.1 πŸ• Closed pizza box with pepperoni pizza visible on top, rising steam wisps
Lv.2 πŸ• Open pizza box with cheese slices, steam clouds, delivery arrow indicator
Lv.3 πŸ• Full pizza party setup with balloons, confetti particles, multiple open boxes

Multiple IT Support drones target different AI buildings. Each heals the lowest-HP AI not already being healed. During the AI takeover transition, 1/3 of destroyed Employees are converted into IT Support drones.

GPU (AI Power Unit)

Required to run AI units. Only unlocked after choosing Equal Rights in the story. GPUs generate TFLOPS β€” a real-time compute resource that is not stored. Each AI consumes TFLOPS to function; if your total TFLOPS drops below total demand, excess AIs produce nothing. GPUs cost a one-time HC fee with no ongoing $ drain.

Level TFLOPS Output Upgrade Cost
Lv.1 5 TFLOPS 500 HC
Lv.2 15 TFLOPS 1,250 HC
Lv.3 35 TFLOPS 3,000 HC
Lv.4 LEGENDARY 100 TFLOPS Merge only

AI TFLOPS consumption per level:

AI Level TFLOPS Required
Lv.1 4 TFLOPS
Lv.2 8 TFLOPS
Lv.3 18 TFLOPS
Lv.4 LEGENDARY 54 TFLOPS

Appearance:

Level Look
Lv.1 πŸ’š Small green circuit board with central processor chip and trace lines
Lv.2 πŸ’š Larger PCB with heatsink, spinning cooling fan, memory modules
Lv.3 πŸ’š Full GPU card with dual spinning fans, VRAM chips, heat pipes, status LEDs
Lv.4 πŸ’š Legendary GPU cluster: triple-stacked cards with pulsing energy field, orbiting data particles, power connectors

Upgrade System

  • Click an existing building to upgrade it
  • Lv.2: 2Γ— output, costs 2.5Γ— base price
  • Lv.3: 4.5Γ— output, costs 6Γ— base price
  • Lv.4 LEGENDARY: 13.5Γ— output (β‰₯3 Lv.3 equivalents), only achievable via merge
  • When upgrades become available the game reminds you: "With great power comes great responsibility!"

Merge Mechanic

When upgrading, if the building's hitbox overlaps another building:

  • Same type: They merge into a Lv.4 Legendary with 10Γ— output
  • Different type: The other building is destroyed with 50% HC refund

Objective Review Progression

# KR Goal Unlock Description
1 0 Recruiter + Employee Starting buildings
2 50 Network Hub x1.5 production multiplier
3 500 Finances $ funding system introduced
4 5K Upgrades Building upgrades to Lv.2 and Lv.3
5 50K AI + THE CHOICE AI unlocked, then critical story branch
6 500K Technical Debt + IT Support + Competitors Threats and healing arrive
7 5M Random Events 100 space events every 15-35 seconds
8 50M Themes 5 visual themes with production bonuses
9 500M Deep Space New galaxy background
10 5B Investment $ compound interest system
11 50B Hyperdrive Production overdrive
12 500B Cosmic Mastery Late game
13 5T KR Singularity Near endgame
14 1Q INFINITE BEYOND Final milestone

Each milestone expands the circular play area by 30px radius (base 450px).


The AI Rights Choice (Milestone 5)

At 50K KR, the game pauses for the defining decision. Both options are presented identically β€” you won't know which path is "safe."

Path A: Equal Rights

  1. 2/3 of Employees are destroyed
  2. 1/3 of destroyed Employees are converted into IT Support drones
  3. Remaining Employees are converted to AI buildings (keeping their level)
  4. Employee type is locked permanently
  5. After 4 seconds: all Recruiters are liquidated at 1/3 of their value, converted to $
  6. Recruiter type is locked permanently
  7. After 4 more seconds: GPU Era begins
  8. New GPU building is unlocked. Each AI needs GPU capacity to function
  9. AI Auto-Organize option offered when any AI reaches Lv.4 β€” concentric circle layout
  10. Game continues with an AI-powered economy

Path B: Humans First (Escalating Doom)

  1. Robot uprising begins β€” you cannot progress past milestone 7
  2. Machine ships attack buildings and steal KRs
  3. As you approach your next KR milestone, aggression escalates quadratically with a 15% speed multiplier
  4. Damage to buildings and KR theft intensify the closer you get to completing objectives
  5. Eventually all buildings are destroyed: full black screen, red GAME OVER
  6. Only option: return to menu

Threats

Threat Appears At Behavior
Technical Debt 500K KR Rusty ships fly across, damage buildings on impact and explode
Competitors 500K KR Corporate Raiders fly to Leadership, poach KRs. Click to destroy them

Random Events

100 unique space events trigger every 15-35 seconds after milestone 7. Events can be positive (production boosts, free resources), negative (meteor strikes, system failures), or neutral (lore, cosmetic). All events are logged in the πŸ“œ Log panel.


Special Events

Event Chance Effect
Phishing Attack 5% of games Leadership clicks a phishing link β€” instant game over. Earns the 🎣 Phished! achievement

Achievements

Icon Name How to Earn
πŸͺ™ First KR Complete Finish your first KR
πŸŽ“ Graduate Complete Level 1
πŸ“‹ Pipeline Pro Complete Level 5
🌌 Galaxy Brain Complete Level 10
πŸ‘‘ Digital Transcender Complete the final level
πŸ—οΈ Architect Place your first building
βœ–οΈ Force Multiplier Place a Network Hub
🏦 KR Mogul Collect 50 total KRs
⚑ Speed Demon Complete any level in under 15 seconds
🏭 Industrialist Place 10 buildings
🌐 Megacorp Place 50 buildings
⬆️ Maxed Out Upgrade a building to Lv.3
πŸ’₯ Collateral Damage Destroy a building during an upgrade collision
πŸ”„ Fusion! Merge two same-type buildings into Legendary Lv.4
🎣 Phished! Leadership clicked a phishing link (instant game over)
πŸ€– Taken Over Lose the robot war after choosing Humans First

Themes

Unlocked at milestone 8 (50M KR). Each theme changes visuals and provides a small production bonus.

Theme Bonus
Emerald Matrix (default) +1% KR/s
Neon Synthwave +1% HC/s
Solar Forge +1% $/s
Arctic Command +1% repair speed
Deep Space No bonus (default styling)

Core Mechanics

  • Circular Play Area: Buildings placed inside an expanding circle (450px + 30px per milestone). Rotating asteroid belt marks the boundary
  • Leadership (Mothership): Central hub evolving through 4 visual stages based on milestone progress
  • Funding ($): Buildings consume $ to operate. UNDERFUNDED = 50% production. $ is capped; build Investment buildings to raise the cap
  • MST Connections: Buildings chain to nearest neighbor via minimum spanning tree lines
  • Detailed View Toggle: Menu button to show/hide per-building /s production stats on hover and in the building panel
  • Log Panel: Unified log of all game messages β€” events, achievements, milestones, and warnings. Accessible via the πŸ“œ button
  • AI Auto-Organize: After an AI reaches Lv.4, you can choose to have buildings automatically arranged in concentric circles by type
  • Ghost Preview: When a building type is selected, a transparent preview follows the cursor to show placement position

Save System

  • Auto-save every 30 seconds to localStorage
  • Save button generates a portable base64 save code (prefixed OKR1-)
  • Load Code on main menu to resume on any device
  • Quit button saves and returns to menu
  • Bug Reporter in menu for submitting issues with game-state snapshot

Platforms

  • Web: game.thisai.fun
  • Android: Offline APK in repo (OKR-Miner.apk)
  • Mobile: Responsive layout, touch controls, pinch-to-zoom

Links


Built with coffee and robots

About

Fun Game about OKRs and Space.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors