Implement the core decision tension. Progress should not be automatically safe.

The player must choose between security and greed. Banking makes progress safe but resets your momentum. Staying in danger keeps you earning but risks losing everything. This decision IS the game. Without this tension, you just have a simulation. With it, you have a game.

Ami — Combat Risk Engine

Banking System:

  • In Camp zone only, press "B" to bank XP
  • Moves unbankedXP to bankedXP
  • Resets riskLevel to 1
  • Outside Camp, cannot bank
  • Risk increases over time in danger zone
// Risk escalation — runs every frame in danger zone if (gameState.zone === "danger") { gameState.riskLevel += 0.01; // Slowly increases }
Ida — Economic Growth Engine

Debt Engine:

  • If karma is negative, apply interest each cycle: gameState.debt += 1
  • If debt exceeds -50, reset all progress (bankruptcy)
  • Decision: take a loan (increase debt for bigger builds) or wait for smaller, safer jobs

Zone-restricted banking (Ami):

// Listen for "B" key press document.addEventListener("keydown", (e) => { if (e.key === "b" || e.key === "B") { bankXP(); } }); function bankXP() { if (gameState.zone !== "safe") { console.log("Cannot bank outside Camp!"); return; } if (gameState.unbankedXP === 0) { console.log("Nothing to bank."); return; } gameState.bankedXP += gameState.unbankedXP; console.log(`Banked ${gameState.unbankedXP} XP! Total banked: ${gameState.bankedXP}`); gameState.unbankedXP = 0; gameState.riskLevel = 1; // Reset risk }

Risk escalation over time:

// Inside game loop function update() { if (gameState.zone === "danger") { gameState.riskLevel += 0.01; // Increases every frame } }

Debt interest system (Ida):

function applyDebtInterest() { if (gameState.karma < 0) { gameState.debt += 1; console.log(`Debt interest applied. Total debt: ${gameState.debt}`); } if (gameState.debt > 50) { console.log("BANKRUPTCY! Debt exceeded 50. Resetting all progress."); gameState.karma = 0; gameState.debt = 0; // Reset other progress } }
  • Implement zone-restricted banking (Ami)
  • Implement debt interest system (Ida)
  • Add risk escalation over time
  • Add decision prompts (bank/loan)
  • Test: banking resets risk correctly
  • Test: debt caps trigger bankruptcy
  • Checkpoint

    There is real tension — stay longer for more reward, or secure progress? The decision feels meaningful.

    No multiple currencies. No inventory. No complex financial systems. One resource, one tension.

    Allowing banking outside the safe zone — banking must be restricted to Camp only. Check the zone before allowing it.

    Risk escalation too fast or too slow — test different values. 0.01 per frame is a starting point, not a final answer.

    Debt interest not accumulating properly — make sure interest applies every cycle, not just once.

    Forgetting to reset risk on bank — banking must reset riskLevel back to 1.

    This is the emotional peak of the systems design. Watch their faces when they lose unbanked XP or go bankrupt. That emotion is the game working. The tension between safety and greed is what turns a system into a game. Ask: "Where is the moment of stress?"