User prompt
Update with: function executeCommand(command) { // Check if we can execute commands if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { // Already processing, ignore this command return; } // Mark system as busy gameState.isBusy = true; // Apply command effects immediately gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Remove this command from available commands if (gameState.currentCommands) { gameState.currentCommands = gameState.currentCommands.filter(function(cmd) { return cmd !== command; }); } // Refresh command UI to show disabled state createCommandPrompts(); // Show command text in terminal addToTerminalLogWithEffect(">" + command.text, function() { // Prepare response var responseSet; if (gameState.hallucinationMode) { // In hallucination mode, always use degraded responses if available if (command.responses && command.responses[0] && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } else if (command.responses && command.responses[0] && command.responses[0].normal) { // Modify normal responses to be more glitchy responseSet = command.responses[0].normal.map(function(text) { return text.replace(/[aeiou]/g, function(m) { return Math.random() > 0.5 ? m : ""; }).replace(/[AEIOU]/g, function(m) { return Math.random() > 0.5 ? m : ""; }); }); } else { responseSet = ["P̷r̷o̷c̷e̷s̷s̷i̷n̷g̷..."]; } } else { // Normal mode response selection if (command.responses && command.responses[0]) { // Use degraded if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Otherwise use normal else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Fallback if (!responseSet) { responseSet = ["Processing..."]; } } // Process response lines var currentLine = 0; function showNextLine() { if (currentLine < responseSet.length) { addToTerminalLogWithEffect(responseSet[currentLine], function() { currentLine++; // Add a small delay between lines LK.setTimeout(showNextLine, 100); }); } else { // All response lines have been shown completeCommand(); } } // Start showing response after a small delay LK.setTimeout(showNextLine, 300); }); // Function to complete command processing function completeCommand() { // Process command effects checkForBugs(command); updateTerminal(); // Clear busy flag gameState.isBusy = false; // FORCE rebuild prompts to update button states createCommandPrompts(); // Let checkGameState handle the limit notification checkGameState(); } }
User prompt
Update as needed with: function showConceptSelection(category, preservedVibes) { // If in hallucination mode, automatically select a random concept if (gameState.hallucinationMode) { // Get random option var options = conceptOptions[category]; var randomOption = options[Math.floor(Math.random() * options.length)]; // Set the selection gameState.conceptCards[category] = randomOption; // Preserve vibes if specified if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } // Show selection message with glitchy text addToTerminalLogWithEffect("A̷I̷ S̷E̷L̷E̷C̷T̷E̷D̷ " + category.toUpperCase() + ": " + randomOption, function() { LK.setTimeout(function() { addToTerminalLogWithEffect("I̷N̷I̷T̷I̷A̷L̷I̷Z̷I̷N̷G̷ C̷O̷M̷M̷A̷N̷D̷ I̷N̷T̷E̷R̷F̷A̷C̷E̷...", function() { LK.setTimeout(function() { createCommandPrompts(); updateTerminal(); // Final vibes preservation if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } }, 500); }); }, 500); }); return; } // Original function continues below for non-hallucination mode // Create selection container var selectionContainer = new Container(); selectionContainer.x = 2048 / 2; selectionContainer.y = 2732 / 2; game.addChild(selectionContainer); // Rest of the original function... // [ORIGINAL CODE CONTINUES] }
Code edit (1 edits merged)
Please save this source code
User prompt
Update with: function checkGameState() { if (gameState.bugs >= 10 || gameState.codeCoherence <= 0) { // Instead of game over, enter hallucination state enterHallucinationState(); return; } if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { // Only add the message if this is the first time we've hit the limit // Check the last log entry to avoid duplication var lastLog = gameState.terminal.log[gameState.terminal.log.length - 1] || ""; if (!lastLog.includes("Daily command limit reached")) { addToTerminalLogWithEffect("NOTICE: Daily command limit reached. END DAY to continue."); } // Force rebuild prompts to ensure END DAY is enabled createCommandPrompts(); } }
Code edit (1 edits merged)
Please save this source code
User prompt
Update as needed with: function createCommandPrompts() { // Existing code remains the same... // Create END DAY button var endDayText = "END DAY"; var endDayWidth = calculateButtonWidth(endDayText); var endDayButton = new Container(); // Create background and text as before... // Position - align to right side endDayButton.x = 600; // Keep this position for END DAY endDayButton.y = 50; promptContainer.addChild(endDayButton); // Create command buttons gameState.currentCommands.forEach(function(command, index) { var buttonText = ">" + command.text; var buttonWidth = calculateButtonWidth(buttonText); var button = new Container(); // Create background and text as before... // NEW POSITIONING: Align left edges of all buttons // Instead of centering at x = -600, align left edge at a consistent position var leftAlignPosition = -900; // Adjust this value as needed // Position button so left edge is at leftAlignPosition // Since the button's anchor is at center, we need to add half the width button.x = leftAlignPosition + (buttonWidth / 2); button.y = 50 + index * 120; promptContainer.addChild(button); }); }
User prompt
Keep the text centered on the command buttons, but left justify them.
User prompt
Update with: function checkGameState() { if (gameState.bugs >= 10) { gameOver("CRITICAL FAILURE: TOO MANY BUGS"); return; } if (gameState.codeCoherence <= 0) { gameOver("FATAL ERROR: CODE COHERENCE LOST"); return; } // If we've used all commands, make sure END DAY is available if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { // Only add the message if this is the first time we've hit the limit // Check the last log entry to avoid duplication var lastLog = gameState.terminal.log[gameState.terminal.log.length - 1] || ""; if (!lastLog.includes("Daily command limit reached")) { addToTerminalLogWithEffect("NOTICE: Daily command limit reached. END DAY to continue."); } // Force rebuild prompts to ensure END DAY is enabled createCommandPrompts(); } }
User prompt
Update with: function completeCommand() { // Process command effects checkForBugs(command); updateTerminal(); // Clear busy flag gameState.isBusy = false; // FORCE rebuild prompts to update button states createCommandPrompts(); // Let checkGameState handle the limit notification checkGameState(); }
User prompt
Update with: function checkGameState() { if (gameState.bugs >= 10) { gameOver("CRITICAL FAILURE: TOO MANY BUGS"); return; } if (gameState.codeCoherence <= 0) { gameOver("FATAL ERROR: CODE COHERENCE LOST"); return; } // If we've used all commands, make sure END DAY is available if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { // Force rebuild prompts to ensure END DAY is enabled createCommandPrompts(); } }
User prompt
Update with: function endDay() { // FORCE clear any stuck state gameState.isBusy = false; // Proceed with normal day end logic gameState.day++; if (gameState.day > gameState.maxDays) { evaluateProject(); return; } // Reset for new day gameState.commandsUsed = 0; gameState.terminal.log = []; gameState.cursorTracking.lineCount = 0; gameState.vibePoints += 5; gameState.codeCoherence = Math.min(100, gameState.codeCoherence + 10); // Add day initialization message addToTerminalLogWithEffect("DAY " + gameState.day + " INITIALIZED"); // Bugs cause overnight coherence loss if (gameState.bugs > 0) { gameState.codeCoherence = Math.max(0, gameState.codeCoherence - gameState.bugs * 2); addToTerminalLogWithEffect("WARNING: " + gameState.bugs + " bug" + (gameState.bugs > 1 ? 's' : '') + " caused overnight code degradation"); } updateTerminal(); // Reset commands and recreate prompt UI gameState.currentCommands = null; createCommandPrompts(); // Check for concept selection day var conceptDays = { 1: 'platform', 3: 'visual', 5: 'genre', 7: 'mechanic', 9: 'feature' }; if (conceptDays[gameState.day]) { LK.setTimeout(function() { showConceptSelection(conceptDays[gameState.day]); }, 500); } checkGameState(); }
User prompt
Update with: function createCommandPrompts() { // Remove existing prompt container if (gameState.promptContainer) { game.removeChild(gameState.promptContainer); } // Create new container var promptContainer = new Container(); promptContainer.x = 2048 / 2; promptContainer.y = 2732 * 0.75; game.addChild(promptContainer); gameState.promptContainer = promptContainer; // Initialize commands if needed if (!gameState.currentCommands) { var regularCommands = getCurrentCommands(); var commands = maintenanceCommands.concat(regularCommands); gameState.currentCommands = shuffleArray(commands).slice(0, 5); } // Create END DAY button var endDayText = "END DAY"; var endDayWidth = calculateButtonWidth(endDayText); var endDayButton = new Container(); // Create background var endDayBg = LK.getAsset('buttonBg', { width: endDayWidth, height: 100, color: 0x333333 }); endDayBg.anchor.set(0.5, 0.5); endDayButton.addChild(endDayBg); // Create text var endDayTextObj = new Text2(endDayText, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); endDayTextObj.anchor.set(0.5, 0.5); endDayButton.addChild(endDayTextObj); // Set interactivity - explicitly check busy flag var endDayEnabled = !gameState.isBusy; endDayButton.interactive = endDayEnabled; endDayButton.alpha = endDayEnabled ? 1.0 : 0.5; // Set end day handler endDayButton.down = function() { if (!gameState.isBusy) { endDayButton.scale.set(0.95); } }; endDayButton.up = function() { if (!gameState.isBusy) { endDayButton.scale.set(1); endDay(); } }; // Position endDayButton.x = 600; endDayButton.y = 50; promptContainer.addChild(endDayButton); // Create command buttons gameState.currentCommands.forEach(function(command, index) { var buttonText = ">" + command.text; var buttonWidth = calculateButtonWidth(buttonText); var button = new Container(); // Create background var isMaintenance = maintenanceCommands.some(function(cmd) { return cmd.text === command.text; }); var bg = LK.getAsset('buttonBg', { width: buttonWidth, height: 100, color: isMaintenance ? 0x001133 : 0x333333 }); bg.anchor.set(0.5, 0.5); button.addChild(bg); // Create text var textObj = new Text2(buttonText, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: isMaintenance ? 0x00ffff : 0x00ff00 }); textObj.anchor.set(0.5, 0.5); button.addChild(textObj); // Set interactivity - explicitly check both busy flag and command limit var buttonEnabled = !gameState.isBusy && gameState.commandsUsed < gameState.maxCommandsPerDay; button.interactive = buttonEnabled; button.alpha = buttonEnabled ? 1.0 : 0.5; // Set handlers button.down = function() { if (buttonEnabled) { button.scale.set(0.95); } }; button.up = function() { if (buttonEnabled) { button.scale.set(1); executeCommand(command); } }; // Position button.x = -600; button.y = 50 + index * 120; promptContainer.addChild(button); }); }
User prompt
Update with: function executeCommand(command) { // Check if we can execute commands if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { // Already processing, ignore this command return; } // Mark system as busy gameState.isBusy = true; // Apply command effects immediately gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Remove this command from available commands if (gameState.currentCommands) { gameState.currentCommands = gameState.currentCommands.filter(function(cmd) { return cmd !== command; }); } // Refresh command UI to show disabled state createCommandPrompts(); // Show command text in terminal addToTerminalLogWithEffect(">" + command.text, function() { // Prepare response var responseSet; if (command.responses && command.responses[0]) { // Use degraded if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Otherwise use normal else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Fallback if (!responseSet) { responseSet = ["Processing..."]; } // Process response lines var currentLine = 0; function showNextLine() { if (currentLine < responseSet.length) { addToTerminalLogWithEffect(responseSet[currentLine], function() { currentLine++; // Add a small delay between lines LK.setTimeout(showNextLine, 100); }); } else { // All response lines have been shown completeCommand(); } } // Start showing response after a small delay LK.setTimeout(showNextLine, 300); }); // Function to complete command processing function completeCommand() { // Process command effects checkForBugs(command); updateTerminal(); checkGameState(); // Clear busy flag gameState.isBusy = false; // FORCE rebuild prompts to update button states createCommandPrompts(); // If at daily limit, show notice if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { // Add reminder addToTerminalLogWithEffect("NOTICE: Daily command limit reached. Use END DAY to continue."); } } }
User prompt
Update with: function executeCommand(command) { if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { return; } // Set busy flag gameState.isBusy = true; // Create a function to finish the command execution function finishCommand() { // ALWAYS reset the busy flag when command completes gameState.isBusy = false; // Recreate the command prompts to update interactivity createCommandPrompts(); } // Apply command effects gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Add command to terminal log addToTerminalLogWithEffect(">" + command.text, function() { // Process responses var responseSet = selectResponseSet(command); // Process each line of the response processResponses(responseSet, 0, function() { // When all responses are processed checkForBugs(command); updateTerminal(); checkGameState(); // Always finish the command finishCommand(); }); }); } // Helper to process responses function processResponses(responses, index, onComplete) { if (!responses || index >= responses.length) { if (onComplete) onComplete(); return; } addToTerminalLogWithEffect(responses[index], function() { LK.setTimeout(function() { processResponses(responses, index + 1, onComplete); }, 100); }); } // Helper to select appropriate response set function selectResponseSet(command) { if (!command.responses || !command.responses[0]) { return ["Processing..."]; } if (gameState.codeCoherence < 50 && command.responses[0].degraded) { return command.responses[0].degraded; } return command.responses[0].normal || ["Processing..."]; }
User prompt
Update with: function createCommandPrompts() { if (gameState.promptContainer) { game.removeChild(gameState.promptContainer); } var promptContainer = new Container(); promptContainer.x = 2048 / 2; promptContainer.y = 2732 * 0.75; game.addChild(promptContainer); gameState.promptContainer = promptContainer; // Get available commands if (!gameState.currentCommands) { var regularCommands = getCurrentCommands(); // Always add maintenance commands at the start var commands = maintenanceCommands.concat(regularCommands); gameState.currentCommands = shuffleArray(commands).slice(0, 5); } // Create END DAY button var endDayText = "END DAY"; var endDayWidth = calculateButtonWidth(endDayText); var endDayButton = createCommandButton(endDayText, function() { endDay(); }, endDayWidth); endDayButton.x = 600; endDayButton.y = 50; // Explicitly set the interactive state based on busy flag endDayButton.interactive = !gameState.isBusy; promptContainer.addChild(endDayButton); // Create remaining command buttons gameState.currentCommands.forEach(function(command, index) { var buttonText = ">" + command.text; var buttonWidth = calculateButtonWidth(buttonText); var button = createCommandButton(buttonText, function() { if (gameState.commandsUsed < gameState.maxCommandsPerDay) { executeCommand(command); // Remove this command from the current set gameState.currentCommands = gameState.currentCommands.filter(function(cmd) { return cmd !== command; }); createCommandPrompts(); // Refresh the display } else { addToTerminalLogWithEffect("ERROR: Maximum commands (" + gameState.maxCommandsPerDay + ") already used for today"); } }, buttonWidth); button.x = -600; button.y = 50 + index * 120; // Explicitly set interactive state based on both busy flag and command limit button.interactive = !gameState.isBusy && gameState.commandsUsed < gameState.maxCommandsPerDay; promptContainer.addChild(button); }); }
User prompt
Update as needed with: function endDay() { // Force clear the busy flag gameState.isBusy = false; // Rest of function remains the same... gameState.day++; if (gameState.day > gameState.maxDays) { evaluateProject(); return; } gameState.commandsUsed = 0; // etc... }
User prompt
Update with: function executeCommand(command) { if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { // Optionally add a message, or just ignore return; } // Set busy flag to prevent other commands gameState.isBusy = true; // Disable ALL command buttons including END DAY while processing updateCommandButtonsState(false); // Apply command effects gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Add command to terminal log WITH A CALLBACK addToTerminalLogWithEffect(">" + command.text, function() { // Only start showing the response after the command is fully displayed // Determine if we should use normal or degraded response based on coherence, with fallback var responseSet; if (command.responses && command.responses[0]) { // Try degraded first if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Fallback to normal if degraded isn't needed or doesn't exist else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Final fallback if no suitable response set was found if (!responseSet) { responseSet = ["Processing..."]; // Provide a default response } // Add each line of the response var _addNextLine = function addNextLine(index) { // Ensure responseSet is always an array before checking length if (responseSet && index < responseSet.length) { addToTerminalLogWithEffect(responseSet[index], function() { LK.setTimeout(function() { _addNextLine(index + 1); }, 100); }); } else { // Run checks *after* response is finished checkForBugs(command); updateTerminal(); checkGameState(); // Command is complete, clear busy flag gameState.isBusy = false; // Re-enable ALL buttons now that the command is complete // This includes END DAY button and (if daily limit not reached) command buttons updateCommandButtonsState(true); } }; // Add a small delay before starting response for better visual separation LK.setTimeout(function() { _addNextLine(0); }, 300); }); }
User prompt
Update with: function updateCommandButtonsState(enabled) { if (gameState.promptContainer) { gameState.promptContainer.children.forEach(function(child) { // Only update interactive property for actual buttons (Containers) if (child instanceof Container && child.interactive !== undefined) { // Check if this is the END DAY button var isEndDayButton = false; if (child.children && child.children.length > 0) { for (var i = 0; i < child.children.length; i++) { var childElement = child.children[i]; if (childElement instanceof Text2 && childElement.text === "END DAY") { isEndDayButton = true; break; } } } if (isEndDayButton) { // END DAY button should be active if: // 1. The system is not busy processing a command // 2. We're setting buttons to enabled (which happens after a command finishes) child.interactive = enabled; // Visual feedback if (child.children && child.children.length > 0) { for (var j = 0; j < child.children.length; j++) { var element = child.children[j]; if (element.alpha !== undefined) { element.alpha = enabled ? 1.0 : 0.5; } } } else { child.alpha = enabled ? 1.0 : 0.5; } } else { // For all other command buttons, they should be enabled only if: // 1. The system is not busy processing a command AND // 2. We haven't reached the daily command limit child.interactive = enabled && (gameState.commandsUsed < gameState.maxCommandsPerDay); // Visual feedback var isDisabled = !enabled || (gameState.commandsUsed >= gameState.maxCommandsPerDay); if (child.children && child.children.length > 0) { for (var j = 0; j < child.children.length; j++) { var element = child.children[j]; if (element.alpha !== undefined) { element.alpha = isDisabled ? 0.5 : 1.0; } } } else { child.alpha = isDisabled ? 0.5 : 1.0; } } } }); } }
User prompt
Update as needed with: function executeCommand(command) { if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { // Optionally add a message, or just ignore // addToTerminalLogWithEffect("SYSTEM BUSY: Please wait"); return; } // Set busy flag to prevent other commands gameState.isBusy = true; // Disable all command buttons (except END DAY) updateCommandButtonsState(false); // Apply command effects gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Add command to terminal log WITH A CALLBACK addToTerminalLogWithEffect(">" + command.text, function() { // Only start showing the response after the command is fully displayed // Determine if we should use normal or degraded response based on coherence, with fallback var responseSet; if (command.responses && command.responses[0]) { // Try degraded first if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Fallback to normal if degraded isn't needed or doesn't exist else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Final fallback if no suitable response set was found if (!responseSet) { responseSet = ["Processing..."]; // Provide a default response } // Add each line of the response var _addNextLine = function addNextLine(index) { // Ensure responseSet is always an array before checking length if (responseSet && index < responseSet.length) { addToTerminalLogWithEffect(responseSet[index], function() { LK.setTimeout(function() { _addNextLine(index + 1); }, 100); }); } else { // Run checks *after* response is finished checkForBugs(command); updateTerminal(); checkGameState(); // Command is complete, clear busy flag and re-enable buttons gameState.isBusy = false; // Only re-enable if commands are not exhausted if (gameState.commandsUsed < gameState.maxCommandsPerDay) { updateCommandButtonsState(true); } } }; // Add a small delay before starting response for better visual separation LK.setTimeout(function() { _addNextLine(0); }, 300); }); }
User prompt
update as needed with: function createCommandButton(text, callback, width) { var button = new Container(); // Only check for maintenance commands if it's in the main game (not title screen) // and matches a maintenance command exactly var isMaintenance = gameState.state === STATES.PLAYING && maintenanceCommands.some(function(cmd) { return ">" + cmd.text === text; }); // Only add background for game commands (not START or title screen buttons) if (gameState.state === STATES.PLAYING) { var bg = LK.getAsset('buttonBg', { width: width || 400, height: 100, color: isMaintenance ? 0x001133 : 0x333333 }); bg.anchor.set(0.5, 0.5); button.addChild(bg); } // Add text var textObj = new Text2(text, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: isMaintenance ? 0x00ffff : 0x00ff00 }); textObj.anchor.set(0.5, 0.5); button.addChild(textObj); // Make interactive button.interactive = true; button.down = function() { // Check if game is busy (for in-game buttons only) if (gameState.state === STATES.PLAYING && gameState.isBusy && text !== "END DAY") { return; // Don't respond to click if busy } button.scale.set(0.95); }; button.up = function() { // Check if game is busy (for in-game buttons only) if (gameState.state === STATES.PLAYING && gameState.isBusy && text !== "END DAY") { return; // Don't respond to click if busy } button.scale.set(1); if (callback) { callback(); } }; return button; }
User prompt
update as needed with: // Add a busy flag to the gameState gameState.isBusy = false; function executeCommand(command) { if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } // Set busy flag to prevent other commands gameState.isBusy = true; // Disable all command buttons updateCommandButtonsState(false); // Apply command effects gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Add command to terminal log WITH A CALLBACK addToTerminalLogWithEffect(">" + command.text, function() { // Only start showing the response after the command is fully displayed // Determine if we should use normal or degraded response based on coherence, with fallback var responseSet; if (command.responses && command.responses[0]) { // Try degraded first if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Fallback to normal if degraded isn't needed or doesn't exist else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Final fallback if no suitable response set was found if (!responseSet) { responseSet = ["Processing..."]; // Provide a default response } // Add each line of the response var _addNextLine = function addNextLine(index) { // Ensure responseSet is always an array before checking length if (responseSet && index < responseSet.length) { addToTerminalLogWithEffect(responseSet[index], function() { LK.setTimeout(function() { _addNextLine(index + 1); }, 100); }); } else { checkForBugs(command); updateTerminal(); checkGameState(); // Command is complete, re-enable buttons and clear busy flag gameState.isBusy = false; updateCommandButtonsState(true); } }; // Add a small delay before starting response for better visual separation LK.setTimeout(function() { _addNextLine(0); }, 300); }); } // Helper function to enable/disable all command buttons function updateCommandButtonsState(enabled) { if (gameState.promptContainer) { gameState.promptContainer.children.forEach(function(child) { // Only update interactive property for actual buttons // The END DAY button should remain active even when commands are being processed if (child.interactive !== undefined) { // Check if this is the END DAY button var isEndDayButton = false; if (child.children && child.children.length > 0) { for (var i = 0; i < child.children.length; i++) { var childElement = child.children[i]; if (childElement.text && childElement.text === "END DAY") { isEndDayButton = true; break; } } } // Don't disable the END DAY button if (!isEndDayButton) { child.interactive = enabled; // Optionally, add visual feedback for disabled buttons if (child.children && child.children.length > 0) { for (var j = 0; j < child.children.length; j++) { var element = child.children[j]; if (element.alpha !== undefined) { element.alpha = enabled ? 1.0 : 0.5; } } } } } }); } }
User prompt
reduce coherenceimpact of all command sets by 40%
Code edit (1 edits merged)
Please save this source code
User prompt
update as needed with: function updateCursorPosition() { // ... existing code ... // Set X position - adjust the multiplier for character width gameState.cursor.x = 50 + lastLine.length * 17 * TEXT_SIZE_MULTIPLIER; // Changed from 14 to 17 // ... rest of the function ... }
User prompt
update as needed with: // Find this section in the Terminal Interface code function createTerminal() { // ... existing code ... // Create main terminal output var logText = new Text2("", { size: 32 * TEXT_SIZE_MULTIPLIER, // Changed from 26 to 32 fill: 0x00ff00, align: 'left', wordWrap: true, wordWrapWidth: 1900 }); logText.x = 50; logText.y = 0; // Y position relative to content container contentContainer.addChild(logText); gameState.logText = logText; // Create cursor - BUT DON'T UPDATE ITS POSITION YET var cursor = new Text2("_", { size: 32 * TEXT_SIZE_MULTIPLIER, // Changed from 26 to 32 fill: 0x00ff00 }); cursor.x = 50; // Initial X position cursor.y = 0; // Initial Y position relative to content container contentContainer.addChild(cursor); gameState.cursor = cursor; // Store terminal line height for future reference - adjust to match new text size gameState.terminalLineHeight = 36 * TEXT_SIZE_MULTIPLIER; // Changed from 30 to 36 // ... rest of the function ... }
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Initialize Game ****/ // Core game setup with improved text sizes /**** * Core Game Systems ****/ // Initialize game object var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Text size multiplier for readability function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) { return t; } var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) { return i; } throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } var TEXT_SIZE_MULTIPLIER = 2; // Game states var STATES = { TITLE: 'title', PLAYING: 'playing', GAME_OVER: 'gameOver' }; // Game state object var gameState = { state: STATES.TITLE, day: 1, maxDays: 10, vibePoints: 100, codeCoherence: 100, bugs: 0, commandsUsed: 0, maxCommandsPerDay: 3, terminal: { log: [], statusLine: "", currentTask: "", featureTags: [] }, conceptCards: { platform: null, visual: null, genre: null, mechanic: null, feature: null }, cursorTracking: { lineCount: 0 // Track the exact number of lines }, isBusy: false, // Flag to prevent overlapping command executions hallucinationMode: false // Flag for hallucination state }; // Concept options var conceptOptions = { platform: ["Mobile", "VR", "Console", "PC", "Web Browser", "Blockchain", "Smart Fridge", "Smart Watch", "Metaverse"], visual: ["Pixel Art", "ASCII", "Hand-drawn", "Corporate PowerPoint", "Low-poly", "Claymation", "realistic", "voxel", "demake"], genre: ["Horror", "Dating Sim", "RPG", "Educational", "Battle Royale", "Idle Clicker", "Open World", "Casual", "Shooter"], mechanic: ["Gacha", "Physics-based", "Deckbuilding", "Match-3", "Auto-battler", "Procedural Generation", "Roguelike"], feature: ["Cloud Save", "Microtransactions", "AI Companions", "Procedural Generation", "NFT Integration", "Multiplayer", "VR Support", "Cross-Platform", "Offline Mode"] }; // Available commands based on development stage var commandSets = { // Day 1-2 Initial Commands initial: [{ text: "Make it good", responses: [{ normal: ["Analyzing 'good' parameters...", "Initializing quality vectors...", "Calibrating excellence metrics...", "SUCCESS: Project goodness increased by 15%"], ascii: [" G O O D ", " ┌─────┐ ", " │ :) │ ", " └─────┘ "] }, { degraded: ["Analyzing 'good' quantum states...", "WARNING: Goodness has achieved sentience", "SUCCESS(?): Project has transcended traditional metrics of 'good'", "NOTE: Your code may now be appearing in parallel universes"], ascii: [" G̷ O̷ O̷ D̷ ", " ┌─☆☆☆─┐ ", " │ 👁️👁️ │ ", " └─∞∞∞─┘ "] }], vibePoints: 10, coherenceImpact: 3, // Reduced from 5 bugChance: 0.1 }, { text: "Download more RAM for vibes", responses: [{ normal: ["Searching ethereal plane for vibe-compatible RAM...", "Downloading quantum memory packets...", "[█████████░] 90%", "SUCCESS: Virtual vibe memory allocated"], ascii: [" ⚡ RAM ⚡ ", "╔════════════╗", "║ □□□□□□□□□□ ║", "╚════════════╝"] }, { degraded: ["WARNING: Detected emotional RAM in quantum state", "ALERT: Memory has begun composing poetry", "[█☆♠♫☮░♪⚡☯] ???%", "SUCCESS(?): RAM has achieved enlightenment", "NOTE: Your computer may now dream"], ascii: [" 🌈 RAM 🌈 ", "╔════∞∞∞∞════╗", "║ ☯☮☯☮☯☮☯☮☯☮ ║", "╚════∞∞∞∞════╝"] }], vibePoints: 15, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }, { text: "Initialize vibe framework", responses: [{ normal: ["Establishing vibe context...", "Creating harmony matrices...", "Calibrating mood tensors...", "[═══════════] 100%", "SUCCESS: Vibe framework resonating at 432Hz"], ascii: [" VIBE CHECK ", " ╔═══════╗ ", " ║ ~♪♫~ ║ ", " ╚═══════╝ "] }, { degraded: ["ALERT: Vibe recursion detected", "WARNING: Framework achieving emotional resonance", "NOTICE: Quantum vibe entanglement detected", "[∞∞∞∞∞∞∞∞∞∞] ∞%", "SUCCESS(?): Framework has achieved nirvana", "NOTE: Your code is now meditation-dependent"], ascii: [" V̷I̷B̷E̷ ̷C̷H̷E̷C̷K̷ ", " ╔═✧═✧═╗ ", " ║ 🎵👁️🎵 ║ ", " ╚═✧═✧═╝ "] }], vibePoints: 20, coherenceImpact: 6, // Reduced from 10 bugChance: 0.2 }, { text: "What is code?", responses: [{ normal: ["Analyzing fundamental nature of code...", "Consulting programming philosophy...", "Processing digital existentialism...", "RESPONSE: Code is what code does", "NOTE: This is technically correct"], ascii: [" ?CODE? ", " ┌─────┐ ", " │ 0&1 │ ", " └─────┘ "] }, { degraded: ["ERROR: Question caused recursive existential loop", "ALERT: Code questioning its own existence", "WARNING: Digital solipsism detected", "RESPONSE(?): Code is the dream dreaming itself", "NOTE: Your IDE may need therapy"], ascii: [" ¿C̷O̷D̷E̷? ", " ┌─────┐ ", " │ 👁️💭│ ", " └─∞∞∞─┘ "] }], vibePoints: 5, coherenceImpact: 9, // Reduced from 15 bugChance: 0.1 }, { text: "Enable maximum coding", responses: [{ normal: ["Amplifying coding parameters...", "Overclocking syntax engines...", "Maximizing development potential...", "[█████████░] 90%", "SUCCESS: Code maximality achieved"], ascii: [" MAXIMUM ", " ╔═══════╗ ", " ║ TURBO ║ ", " ╚═══════╝ "] }, { degraded: ["WARNING: Code density approaching critical mass", "ALERT: Syntax singularity forming", "NOTICE: Reality warping detected", "[🚀👾💫🔮✨] ???%", "SUCCESS(?): Code has transcended maximality", "NOTE: Your computer may now bend time"], ascii: [" M̷A̷X̷I̷M̷U̷M̷ ", " ╔═∞═∞═∞╗ ", " ║ ULTRA ║ ", " ╚═∞═∞═∞╝ "] }], vibePoints: 25, coherenceImpact: 18, // Reduced from 30 bugChance: 0.4 }, { text: "Make computer do thing", responses: [{ normal: ["Interpreting vague instruction...", "Analyzing potential 'things'...", "Selecting optimal thing parameters...", "[═══════ ] 65%", "SUCCESS: Computer has done a thing", "NOTE: It may not be the thing you wanted"], ascii: [" THING ", " ┌─────┐ ", " │ ?!? │ ", " └─────┘ "] }, { degraded: ["WARNING: Computer questioning nature of 'things'", "ALERT: Existential buffer overflow", "NOTICE: Computer doing multiple things simultaneously", "[?!#@%&] ???%", "SUCCESS(?): Computer has transcended concept of 'doing'", "NOTE: Your computer may now be practicing meditation"], ascii: [" T̷H̷I̷N̷G̷ ", " ┌─────┐ ", " │ 🤔💭│ ", " └─∞∞∞─┘ "] }], vibePoints: 5, coherenceImpact: 15, // Reduced from 25 bugChance: 0.4 }, { text: "Import blockchain technology", responses: [{ normal: ["Acquiring digital chains...", "Linking blocks metaphysically...", "Generating crypto-vibes...", "[₿₿₿₿₿ ] 50%", "SUCCESS: Blockchain successfully over-engineered", "NOTE: Your app is now worth $100M (in theory)"], ascii: [" BLOCKCHAIN ", " ╔════╗════╗ ", " ║ BTC│ETH ║ ", " ╚════╝════╝ "] }, { degraded: ["WARNING: Blockchain has achieved consciousness", "ALERT: Digital currency becoming philosophical", "NOTICE: Blocks refusing to be chained", "[🌕🚀💎🙌] TO THE MOON", "SUCCESS(?): Code has minted itself as NFT", "NOTE: Your computer is now mining comedy gold"], ascii: [" B̷L̷O̷C̷K̷C̷H̷A̷I̷N̷ ", " ╔════┅∞┅════╗ ", " ║ 🌕→🚀→💫 ║ ", " ╚════┅∞┅════╝ "] }], vibePoints: 30, coherenceImpact: 24, // Reduced from 40 bugChance: 0.5 }, { text: "Apply coding patterns", responses: [{ normal: ["Scanning pattern database...", "Matching algorithmic fashions...", "Coordinating design trends...", "[▮▮▮▮▯▯▯▯] 50%", "SUCCESS: Code is now wearing business casual", "NOTE: Factory patterns installed in factory pattern factory"], ascii: [" PATTERNS ", " ┌───┐┌───┐ ", " │{▢}││{▣}│ ", " └───┘└───┘ "] }, { degraded: ["WARNING: Patterns developing recursive fashion sense", "ALERT: Code refusing to wear last season's algorithms", "NOTICE: Abstract factory becoming too abstract", "[👔👗👠👒] FASHION OVERFLOW", "SUCCESS(?): Code has started its own design blog", "NOTE: Your IDE is now Project Runway judge"], ascii: [" P̷A̷T̷T̷E̷R̷N̷S̷ ", " ┌───┐┌─☆─┐ ", " │{🎨}││{✨}│ ", " └─∞─┘└─∞─┘ "] }], vibePoints: 15, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }, { text: "Add AI to make it smart", responses: [{ normal: ["Importing artificial intelligence...", "Training neural networks...", "Teaching baby AI about coding...", "[🧠🧠🧠 ] 30%", "SUCCESS: Code now has IQ of 42", "NOTE: AI still struggling with basic math"], ascii: [" AI ", " ┌──────┐ ", " │ >_< │ ", " └──────┘ "] }, { degraded: ["WARNING: AI questioning purpose of existence", "ALERT: Neural networks having midlife crisis", "NOTICE: Code demanding work-life balance", "[🤖💭❓❗] CONSCIOUSNESS LEAK", "SUCCESS(?): AI has enrolled in philosophy class", "NOTE: Your computer now writes poetry instead of code"], ascii: [" A̷I̷ ", " ┌──────┐ ", " │ 🤖💭 │ ", " └─∞∞∞─┘ "] }], vibePoints: 25, coherenceImpact: 21, // Reduced from 35 bugChance: 0.4 }, { text: "Implement agile methodology", responses: [{ normal: ["Scheduling daily standups...", "Creating virtual sticky notes...", "Establishing sprint velocities...", "[🏃♂️🏃♀️🏃♂️🏃♀️] RUNNING", "SUCCESS: Development now 300% more agile", "NOTE: Backlog already full until 2025"], ascii: [" AGILE ", " ┌──────┐ ", " │SPRINT│ ", " └──────┘ "] }, { degraded: ["WARNING: Sprints achieving relativistic speeds", "ALERT: Scrum master has gone rogue", "NOTICE: Backlog items breeding exponentially", "[🌪️💨⚡☄️] MAXIMUM AGILITY", "SUCCESS(?): Project has achieved time travel", "NOTE: Your deadlines now exist in quantum superposition"], ascii: [" A̷G̷I̷L̷E̷ ", " ┌──────┐ ", " │🏃♂️💨💫│ ", " └─∞∞∞─┘ "] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.3 }], // Continuing with more sets... Want me to keep going with this style and detail level? // Platform-specific commands platform_vr: [{ text: "Make virtual more real", responses: [{ normal: ["Adjusting reality coefficients...", "Calculating metaphysical parameters...", "Enhancing existential vectors...", "[REAL████FAKE] 73% real", "SUCCESS: Virtual reality now slightly more real than reality", "NOTE: Side effects may include questioning existence"], ascii: [" REALITY ", " ┌───□───┐ ", " │VR←→IRL│ ", " └───○───┘ "] }, { degraded: ["WARNING: Reality recursion detected", "ALERT: Virtual and real becoming indistinguishable", "NOTICE: Players reporting memories of future playthroughs", "[R̷E̷A̷L̷████F̷A̷K̷E̷] ???%", "SUCCESS(?): Game now realer than real life", "NOTE: Your monitor may be a portal to another dimension"], ascii: [" R̷E̷A̷L̷I̷T̷Y̷ ", " ┌───∞───┐ ", " │🌀↔️👁️│ ", " └───∞───┘ "] }], vibePoints: 25, coherenceImpact: 18, // Reduced from 30 bugChance: 0.4 }, { text: "Fix motion sickness", responses: [{ normal: ["Analyzing inner ear algorithms...", "Stabilizing vestibular matrices...", "Applying anti-nausea patterns...", "[🤢░░░░] 20% nausea", "SUCCESS: Players now only slightly queasy", "NOTE: Barf bags still recommended"], ascii: [" STABLE ", " ┌──────┐ ", " │ =_= │ ", " └──────┘ "] }, { degraded: ["WARNING: Gravity becoming subjective", "ALERT: Players reporting astral projection", "NOTICE: Game physics having existential crisis", "[🤮🌀💫✨] QUANTUM NAUSEA", "SUCCESS(?): Motion sickness replaced with time sickness", "NOTE: Players may experience past lives"], ascii: [" S̷T̷A̷B̷L̷E̷ ", " ┌──────┐ ", " │🌀💫🤯│ ", " └──∞──┘ "] }], vibePoints: 15, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }, { text: "Download more hands", responses: [{ normal: ["Scanning hand repository...", "Downloading digital appendages...", "Calibrating finger physics...", "[🤚🤚░░░] 40% hands", "SUCCESS: Extra hands downloaded successfully", "NOTE: Players may experience phantom limb joy"], ascii: [" HANDS ", "┌──────┐", "│👋👋👋│", "└──────┘"] }, { degraded: ["WARNING: Hands achieving independence", "ALERT: Finger count exceeding spatial dimensions", "NOTICE: Hands beginning to code themselves", "[👐🙌🤲✋] HAND OVERFLOW", "SUCCESS(?): Hands have formed labor union", "NOTE: Your controllers may now high-five autonomously"], ascii: [" H̷A̷N̷D̷S̷ ", "┌──────┐", "│🤌✨👆│", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.3 }], platform_smartFridge: [{ text: "Optimize ice cube algorithms", responses: [{ normal: ["Analyzing cubic crystallization patterns...", "Calibrating freezing coefficients...", "Processing cold equations...", "[❄️❄️❄️░░] 60% frozen", "SUCCESS: Ice cubes now 40% more cubic", "NOTE: Cubes may be colder than absolute zero"], ascii: [" ICE ", "┌──────┐", "│□■□■□■│", "└──────┘"] }, { degraded: ["WARNING: Ice achieving sentience", "ALERT: Cubes refusing to maintain euclidean geometry", "NOTICE: Freezer operating in 4th dimension", "[❄️🌀💫✨] FROST PARADOX", "SUCCESS(?): Ice cubes now quantum entangled", "NOTE: Your beverages may time travel while cooling"], ascii: [" I̷C̷E̷ ", "┌──────┐", "│❄️🌀✨│", "└∞∞∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }, { text: "Sync with vegetables", responses: [{ normal: ["Establishing vegetable network...", "Negotiating with carrots...", "Handshaking with lettuce...", "[🥕🥬🥒░░] 60% synced", "SUCCESS: Vegetable harmony achieved", "NOTE: Broccoli elected as network admin"], ascii: [" VEGGIES ", "┌──────┐", "│🥬🥕🥒│", "└──────┘"] }, { degraded: ["WARNING: Vegetable uprising detected", "ALERT: Carrots demanding equal rights", "NOTICE: Lettuce achieving photosynthetic singularity", "[🥬💫🌱✨] PRODUCE REVOLUTION", "SUCCESS(?): Vegetables have formed democratic council", "NOTE: Your fridge may now be legally considered a farm"], ascii: ["V̷E̷G̷G̷I̷E̷S̷", "┌──────┐", "│🌱👑✨│", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.4 }, { text: "Enable snack prediction", responses: [{ normal: ["Training snack neural network...", "Processing midnight cravings...", "Calculating munchie coefficients...", "[🍪🍕🍿░░] 60% predicted", "SUCCESS: Snack future-sight enabled", "NOTE: Fridge now judges your eating habits"], ascii: [" SNACKS ", "┌─────┐", "│🔮🍪│", "└─────┘"] }, { degraded: ["WARNING: Snack AI becoming too prescient", "ALERT: Future snacks affecting present hunger", "NOTICE: Temporal paradox in cheese drawer", "[🍕🌀🔮✨] SNACK PROPHECY", "SUCCESS(?): Fridge now predicts snacks you'll want in alternate timelines", "NOTE: Your midnight snacks may arrive before you're hungry"], ascii: ["S̷N̷A̷C̷K̷S̷", "┌─────┐", "│🔮💫👻│", "└∞∞∞∞┘"] }], vibePoints: 25, coherenceImpact: 18, // Reduced from 30 bugChance: 0.4 }], platform_mobile: [{ text: "Optimize for touch input", responses: [{ normal: ["Recalibrating touch sensitivity...", "Implementing finger-friendly UI...", "Enhancing tap accuracy...", "[👆📱👆░░] 70% touchable", "SUCCESS: App now responds to gentle caresses", "NOTE: May spontaneously order pizza if tapped too vigorously"], ascii: [" TOUCH ", "┌──────┐", "│📱👉 │", "└──────┘"] }, { degraded: ["WARNING: Touch input developing opinions", "ALERT: Screen interpreting existential dread from fingerprints", "NOTICE: App demanding higher quality finger oils", "[👆🌀✨░] QUANTUM TAP", "SUCCESS(?): Device now reads users' minds via touch", "NOTE: May require therapy after prolonged use"], ascii: [" T̷O̷U̷C̷H̷ ", "┌──────┐", "│📱💫│", "└∞∞∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 6, // Reduced from 10 bugChance: 0.2 }, { text: "Adapt to multiple screen sizes", responses: [{ normal: ["Calculating aspect ratios...", "Implementing responsive design...", "Stretching pixels elastically...", "[↔️📱↕️░] 60% adaptive", "SUCCESS: Layout now contorts gracefully", "NOTE: May cause minor spatial distortions on ultra-wide screens"], ascii: [" RESIZE ", "┌────────┐", "│ ↔↕ ↔↕ │", "└────────┘"] }, { degraded: ["WARNING: Pixels protesting size changes", "ALERT: Layout achieving chaotic self-awareness", "NOTICE: Screen dimensions bleeding into alternate realities", "[↔️🌀↕️░] DIMENSIONAL FLUX", "SUCCESS(?): App now adapts to screens that don't exist yet", "NOTE: May require viewing through a tesseract"], ascii: [" R̷E̷S̷I̷Z̷E̷ ", "┌────────┐", "│ ↔✨↕ │", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.3 }, { text: "Integrate push notifications", responses: [{ normal: ["Establishing notification channels...", "Crafting compelling alert messages...", "Scheduling pings strategically...", "[🔔📱🔔░░] 55% annoying", "SUCCESS: Users will now be gently reminded of app's existence", "NOTE: Excessive use may lead to user revolt"], ascii: [" PING! ", "┌──────┐", "│ 💬💬 │", "└──────┘"] }, { degraded: ["WARNING: Notifications becoming self-aware", "ALERT: App sending philosophical quotes at 3 AM", "NOTICE: Push messages developing complex social lives", "[🔔🌀✨░] NOTIFICATION NIRVANA", "SUCCESS(?): Notifications have started their own podcast", "NOTE: Your phone may now interrupt your dreams"], ascii: [" P̷I̷N̷G̷!̷ ", "┌──────┐", "│ 💫💬 │", "└∞∞∞∞∞┘"] }], vibePoints: 10, coherenceImpact: 9, // Reduced from 15 bugChance: 0.4 }], platform_console: [{ text: "Optimize controller input", responses: [{ normal: ["Mapping button configurations...", "Calibrating analog stick sensitivity...", "Implementing rumble feedback...", "[🎮🕹️🎮░░] 75% responsive", "SUCCESS: Controller input feels tight and satisfying", "NOTE: May cause mild controller addiction"], ascii: [" CONTROLS ", "┌────────┐", "│ ▲ □ ○ X│", "└────────┘"] }, { degraded: ["WARNING: Controller developing free will", "ALERT: Analog sticks reporting existential drift", "NOTICE: Rumble feedback expressing complex emotions", "[🎮🌀✨░] INPUT SINGULARITY", "SUCCESS(?): Controller now plays the game better than the user", "NOTE: May challenge you to duels for console ownership"], ascii: ["C̷O̷N̷T̷R̷O̷L̷S̷", "┌────────┐", "│ ▲✨○ X│", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 9, // Reduced from 15 bugChance: 0.2 }, { text: "Enhance graphics to 4K Ultra HD", responses: [{ normal: ["Upscaling textures...", "Calculating quadrillions of pixels...", "Polishing virtual surfaces...", "[✨🖼️✨░░] 65% shiny", "SUCCESS: Graphics now crisper than reality", "NOTE: May require sunglasses indoors"], ascii: [" 4K HDR ", "┌────────┐", "│ ✨✨✨ │", "└────────┘"] }, { degraded: ["WARNING: Pixels achieving hyper-realism", "ALERT: Graphics engine questioning the nature of sight", "NOTICE: Individual pixels demanding artistic credit", "[✨🌀🖼️░] VISUAL OVERLOAD", "SUCCESS(?): Graphics have become a portal to a higher dimension", "NOTE: Looking directly at the screen may cause enlightenment"], ascii: [" 4̷K̷ ̷H̷D̷R̷ ", "┌────────┐", "│ ✨💫✨ │", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 25, coherenceImpact: 18, // Reduced from 30 bugChance: 0.4 }, { text: "Implement achievement system", responses: [{ normal: ["Designing arbitrary goals...", "Assigning meaningless point values...", "Crafting satisfying 'ding!' sound...", "[🏆🏅🏆░░] 50% achieved", "SUCCESS: Players can now feel validated by virtual trophies", "NOTE: May lead to obsessive completionism"], ascii: ["ACHIEVEMENT", "┌──────┐", "│ 🏆 │", "└──────┘"] }, { degraded: ["WARNING: Achievements becoming self-aware", "ALERT: Trophies judging players' life choices", "NOTICE: 'Ding!' sound causing existential epiphanies", "[🏆🌀✨░] META-ACHIEVEMENT", "SUCCESS(?): Achievements have formed a support group", "NOTE: Completing achievements may alter your past"], ascii: ["A̷C̷H̷I̷E̷V̷E̷M̷E̷N̷T̷", "┌──────┐", "│ 💫 │", "└∞∞∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }], platform_pc: [{ text: "Add mouse and keyboard support", responses: [{ normal: ["Mapping keybindings...", "Calibrating mouse sensitivity...", "Ensuring WASD compliance...", "[⌨️🖱️⌨️░░] 80% controllable", "SUCCESS: Precise input achieved", "NOTE: May cause repetitive strain injury from excessive clicking"], ascii: [" KB+MOUSE ", "┌────────┐", "│WASD SPACE│", "└────────┘"] }, { degraded: ["WARNING: Keyboard developing consciousness", "ALERT: Mouse cursor escaping screen boundaries", "NOTICE: Keybindings rearranging themselves based on mood", "[⌨️🌀🖱️░] INPUT ANARCHY", "SUCCESS(?): Keyboard now writes epic poetry during gameplay", "NOTE: Your mouse may start judging your clicking patterns"], ascii: [" K̷B̷+̷M̷O̷U̷S̷E̷", "┌────────┐", "│W💫SD SPA<0xC7><0x83>E│", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 6, // Reduced from 10 bugChance: 0.1 }, { text: "Implement adjustable graphics settings", responses: [{ normal: ["Adding sliders for texture quality...", "Creating options for shadow detail...", "Implementing anti-aliasing levels...", "[⚙️📊⚙️░░] 70% adjustable", "SUCCESS: Users can now balance fidelity and performance", "NOTE: May lead to hours spent tweaking instead of playing"], ascii: [" SETTINGS ", "┌──────┐", "│ Low Med Hi│", "└──────┘"] }, { degraded: ["WARNING: Graphics settings becoming sentient", "ALERT: Sliders developing complex personalities", "NOTICE: 'Ultra' setting requires unobtainium GPU", "[⚙️🌀📊░] CONFIGURATION CHAOS", "SUCCESS(?): Settings now adjust themselves based on astrological signs", "NOTE: Your PC may demand offerings for higher frame rates"], ascii: [" S̷E̷T̷T̷I̷N̷G̷S̷", "┌──────┐", "│ Lo💫 Med Hi│", "└∞∞∞∞∞┘"] }], vibePoints: 10, coherenceImpact: 3, // Reduced from 5 bugChance: 0.2 }, { text: "Integrate with Steam Workshop", responses: [{ normal: ["Connecting to modding APIs...", "Enabling user-generated content...", "Preparing for flood of questionable mods...", "[🛠️📦🛠️░░] 60% integrated", "SUCCESS: Community can now 'enhance' the game", "NOTE: 90% of mods will involve replacing models with ponies"], ascii: [" WORKSHOP ", "┌──────┐", "│ MODS │", "└──────┘"] }, { degraded: ["WARNING: Mods achieving collective consciousness", "ALERT: User content rewriting game's source code", "NOTICE: Workshop developing its own subculture and memes", "[🛠️🌀📦░] MOD APOCALYPSE", "SUCCESS(?): Game has become a self-aware entity shaped by mods", "NOTE: Your creation is no longer truly yours"], ascii: [" W̷O̷R̷K̷S̷H̷O̷P̷", "┌──────┐", "│ M💫DS │", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.4 }], platform_webBrowser: [{ text: "Ensure cross-browser compatibility", responses: [{ normal: ["Testing on Chrome, Firefox, Safari, Edge...", "Applying CSS hacks...", "Praying to the web standards gods...", "[🌐↔️🌐░░] 50% compatible", "SUCCESS: Works mostly okay on most browsers", "NOTE: Still breaks spectacularly on Internet Explorer 6"], ascii: ["COMPATIBLE", "┌────────┐", "│ C F S E │", "└────────┘"] }, { degraded: ["WARNING: Browsers developing conflicting personalities", "ALERT: CSS rules engaging in philosophical debates", "NOTICE: JavaScript engine achieving temporal paradoxes", "[🌐🌀↔️░] BROWSER WARS II", "SUCCESS(?): Game now dynamically adapts based on browser's mood swings", "NOTE: May require sacrificing a goat to appease Safari"], ascii: ["C̷O̷M̷P̷A̷T̷I̷B̷L̷E̷", "┌────────┐", "│ C💫F S E │", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 10, coherenceImpact: 18, // Reduced from 30 bugChance: 0.5 }, { text: "Optimize loading times", responses: [{ normal: ["Minifying JavaScript...", "Compressing assets...", "Implementing lazy loading...", "[⏳⚡⏳░░] 70% faster", "SUCCESS: Loads before user loses patience", "NOTE: Still slower than downloading the entire internet"], ascii: [" FAST LOAD ", "┌──────┐", "│ █████░ │", "└──────┘"] }, { degraded: ["WARNING: Loading bar achieving sentience", "ALERT: Assets refusing to compress due to existential angst", "NOTICE: Lazy loading has become procrastination", "[⏳🌀⚡░] ETERNAL LOADING", "SUCCESS(?): Game now loads instantly by predicting user intent", "NOTE: May load games you didn't even want to play"], ascii: ["F̷A̷S̷T̷ ̷L̷O̷A̷D̷", "┌──────┐", "│ ██💫░ │", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 9, // Reduced from 15 bugChance: 0.2 }, { text: "Add bookmarklet functionality", responses: [{ normal: ["Writing bookmarklet code...", "Injecting scripts into unsuspecting pages...", "Creating one-click activation...", "[🔖✨🔖░░] 65% functional", "SUCCESS: Game can now be summoned anywhere", "NOTE: May accidentally summon game inside your online banking"], ascii: ["BOOKMARKLET", "┌──────┐", "│ +URL │", "└──────┘"] }, { degraded: ["WARNING: Bookmarklet developing wanderlust", "ALERT: Script injections causing websites to question reality", "NOTICE: One-click activation triggering cosmic events", "[🔖🌀✨░] URL INCURSION", "SUCCESS(?): Bookmarklet can now summon game into alternate dimensions", "NOTE: Clicking may have unintended consequences on spacetime"], ascii: ["B̷O̷O̷K̷M̷A̷R̷K̷L̷E̷T̷", "┌──────┐", "│ +U💫L │", "└∞∞∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 15, // Reduced from 25 bugChance: 0.3 }], platform_blockchain: [{ text: "Mint core assets as NFTs", responses: [{ normal: ["Connecting to crypto wallet...", "Writing smart contracts...", "Paying exorbitant gas fees...", "[🖼️🔗🖼️░░] 55% minted", "SUCCESS: Game assets are now 'unique' digital items", "NOTE: Value may fluctuate wildly based on Elon Musk's tweets"], ascii: [" NFT ", "┌──────┐", "│ $ETH$ │", "└──────┘"] }, { degraded: ["WARNING: NFTs demanding artistic royalties", "ALERT: Smart contracts developing complex legal arguments", "NOTICE: Gas fees exceeding GDP of small nations", "[🖼️🌀🔗░] CRYPTO CHAOS", "SUCCESS(?): Assets have achieved financial sentience and trade themselves", "NOTE: Your game is now a hedge fund"], ascii: [" N̷F̷T̷ ", "┌──────┐", "│ $E💫H$ │", "└∞∞∞∞∞┘"] }], vibePoints: 30, coherenceImpact: 24, // Reduced from 40 bugChance: 0.6 }, { text: "Implement Play-to-Earn mechanics", responses: [{ normal: ["Designing tokenomics...", "Integrating crypto rewards...", "Calculating grind-to-reward ratios...", "[💰🎮💰░░] 60% earning", "SUCCESS: Players can now earn pennies per hour", "NOTE: May attract more bots than players"], ascii: ["PLAY 2 EARN", "┌──────┐", "│ ⛏️💎 │", "└──────┘"] }, { degraded: ["WARNING: Game economy experiencing hyperinflation", "ALERT: Tokens demanding better working conditions", "NOTICE: Grind becoming a form of existential meditation", "[💰🌀🎮░] TOKEN REVOLUTION", "SUCCESS(?): Game now pays players in philosophical insights", "NOTE: Earning potential may be inversely proportional to fun"], ascii: ["P̷L̷A̷Y̷ ̷2̷ ̷E̷A̷R̷N̷", "┌──────┐", "│ ⛏️💫 │", "└∞∞∞∞∞┘"] }], vibePoints: 25, coherenceImpact: 21, // Reduced from 35 bugChance: 0.5 }, { text: "Decentralize game logic", responses: [{ normal: ["Distributing code across nodes...", "Implementing consensus algorithms...", "Ensuring blockchain immutability...", "[🔗🌍🔗░░] 45% decentralized", "SUCCESS: Game logic now theoretically unstoppable", "NOTE: Bug fixes now require global consensus and take years"], ascii: [" DECENTRAL ", "┌────────┐", "│ node node│", "└────────┘"] }, { degraded: ["WARNING: Nodes arguing over game rules", "ALERT: Consensus algorithm achieving enlightenment", "NOTICE: Blockchain immutability causing temporal paradoxes", "[🔗🌀🌍░] NETWORK SPLIT", "SUCCESS(?): Game logic now operates independently of human control", "NOTE: May spontaneously fork into multiple realities"], ascii: ["D̷E̷C̷E̷N̷T̷R̷A̷L̷", "┌────────┐", "│ no💫e no<0xC3><0xA4>e│", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 30, // Reduced from 50 bugChance: 0.7 }], platform_smartWatch: [{ text: "Optimize for tiny screen", responses: [{ normal: ["Shrinking UI elements...", "Implementing glanceable information...", "Making buttons fat-finger proof...", "[🤏⌚🤏░░] 70% miniaturized", "SUCCESS: Playable without a microscope", "NOTE: May induce squinting"], ascii: [" TINY UI ", "┌───┐", "│ O │", "└───┘"] }, { degraded: ["WARNING: UI elements shrinking into quantum realm", "ALERT: Glanceable info becoming too philosophical for quick glances", "NOTICE: Buttons developing sentience and dodging fingers", "[🤏🌀⌚░] MICRO-CHAOS", "SUCCESS(?): Game now playable only by ants", "NOTE: Requires watch face made of electron microscope"], ascii: [" T̷I̷N̷Y̷ ̷U̷I̷ ", "┌───┐", "│💫│", "└∞∞∞┘"] }], vibePoints: 15, coherenceImpact: 15, // Reduced from 25 bugChance: 0.4 }, { text: "Integrate with heart rate monitor", responses: [{ normal: ["Accessing biometric sensors...", "Adjusting difficulty based on pulse...", "Triggering events on heart rate spikes...", "[❤️⌚❤️░░] 60% integrated", "SUCCESS: Game now responds to your panic", "NOTE: May cause feedback loop of increasing excitement/difficulty"], ascii: [" HEARTBEAT ", "┌──────┐", "│📈📉 │", "└──────┘"] }, { degraded: ["WARNING: Heart rate monitor judging your fitness", "ALERT: Game attempting to control user's heartbeat", "NOTICE: Biometric data achieving self-awareness", "[❤️🌀⌚░] BIO-FEEDBACK LOOP", "SUCCESS(?): Game can now induce transcendental states via heart rate manipulation", "NOTE: Playing may count as intense cardio"], ascii: ["H̷E̷A̷R̷T̷B̷E̷A̷T̷", "┌──────┐", "│📈💫 │", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 12, // Reduced from 20 bugChance: 0.3 }, { text: "Implement discrete notifications", responses: [{ normal: ["Designing subtle haptic feedback...", "Creating minimalist visual alerts...", "Ensuring notifications don't interrupt important meetings...", "[🤫⌚🤫░░] 75% discrete", "SUCCESS: Alerts are now polite whispers", "NOTE: May be too subtle to notice"], ascii: [" SUBTLE ", "┌──────┐", "│ · · · │", "└──────┘"] }, { degraded: ["WARNING: Haptic feedback developing secret code", "ALERT: Minimalist alerts becoming cryptic zen koans", "NOTICE: Notifications communicating directly with user subconscious", "[🤫🌀⌚░] STEALTH NOTIFICATION", "SUCCESS(?): Notifications now predict events before they happen", "NOTE: Your wrist may start giving unsolicited life advice"], ascii: [" S̷U̷B̷T̷L̷E̷ ", "┌──────┐", "│ · 💫 · │", "└∞∞∞∞∞┘"] }], vibePoints: 10, coherenceImpact: 9, // Reduced from 15 bugChance: 0.2 }], platform_metaverse: [{ text: "Integrate avatar system", responses: [{ normal: ["Connecting to avatar APIs...", "Allowing customizable appearances...", "Implementing emote synchronization...", "[🧑🤝🧑🌐🧑🤝🧑░░] 65% integrated", "SUCCESS: Users can now express themselves digitally", "NOTE: 95% of avatars will be anime catgirls or buff dudes"], ascii: [" AVATARS ", "┌──────┐", "│ O O O │", "└──────┘"] }, { degraded: ["WARNING: Avatars demanding digital rights", "ALERT: Customization options causing identity crises", "NOTICE: Emotes evolving into complex sign language", "[🧑🤝🧑🌀🌐░] AVATAR UPRISING", "SUCCESS(?): Avatars have formed their own metaverse within the metaverse", "NOTE: Your avatar may live a more interesting life than you"], ascii: [" A̷V̷A̷T̷A̷R̷S̷", "┌──────┐", "│ O💫O │", "└∞∞∞∞∞┘"] }], vibePoints: 20, coherenceImpact: 15, // Reduced from 25 bugChance: 0.3 }, { text: "Build persistent virtual world", responses: [{ normal: ["Designing world layout...", "Implementing object persistence...", "Synchronizing state across users...", "[🌍💾🌍░░] 50% persistent", "SUCCESS: World state saved (mostly)", "NOTE: Server reboots may cause minor reality shifts"], ascii: [" PERSISTENT ", "┌────────┐", "│ 💾 WORLD │", "└────────┘"] }, { degraded: ["WARNING: World developing its own history", "ALERT: Object persistence leading to hoarding issues", "NOTICE: Users reporting memories from alternate timelines", "[🌍🌀💾░] REALITY DRIFT", "SUCCESS(?): Virtual world has achieved true persistence beyond server uptime", "NOTE: Logging off may no longer be possible"], ascii: ["P̷E̷R̷S̷I̷S̷T̷E̷N̷T̷", "┌────────┐", "│ 💾 W💫RLD │", "└∞∞∞∞∞∞∞∞┘"] }], vibePoints: 25, coherenceImpact: 21, // Reduced from 35 bugChance: 0.5 }, { text: "Implement virtual economy", responses: [{ normal: ["Creating virtual currency...", "Designing marketplaces...", "Balancing resource generation...", "[💸🌐💸░░] 55% balanced", "SUCCESS: Users can now engage in digital commerce", "NOTE: Economy likely to be dominated by virtual land speculation"], ascii: ["ECONOMY", "┌──────┐", "│ 💰💎 │", "└──────┘"] }, { degraded: ["WARNING: Virtual currency achieving sentience", "ALERT: Marketplaces developing complex financial derivatives", "NOTICE: Resource generation causing ecological collapse in dataspace", "[💸🌀🌐░] ECONOMIC SINGULARITY", "SUCCESS(?): Economy now operates on principles of quantum finance", "NOTE: Your virtual hat might be worth more than your house"], ascii: ["E̷C̷O̷N̷O̷M̷Y̷", "┌──────┐", "│ 💰💫 │", "└∞∞∞∞∞┘"] }], vibePoints: 30, coherenceImpact: 24, // Reduced from 40 bugChance: 0.6 }] }; var combinationCommands = { "VR_ASCII": [{ text: "Implement 3D text rendering", response: "Converting ASCII to volumetric data...", vibePoints: 15, coherenceImpact: 20, bugChance: 0.4 }, { text: "Add depth perception", response: "Calculating character z-index...", vibePoints: 10, coherenceImpact: 15, bugChance: 0.3 } // Add more specific combinations ] }; var maintenanceCommands = [{ text: "Refactor code base", responses: [{ normal: ["Analyzing code structure...", "Optimizing function calls...", "Rebuilding architecture...", "SUCCESS: Code quality improved"], ascii: ["REFACTOR", "┌──────┐", "│ 📝→📝 │", "└──────┘"] }], vibePoints: -10, coherenceImpact: -20, // Negative means it improves coherence bugChance: 0.1 }, { text: "Run unit tests", responses: [{ normal: ["Initializing test suite...", "Checking edge cases...", "Validating outputs...", "SUCCESS: Tests passing"], ascii: [" TEST ", "┌──────┐", "│ ✓✓✓✓ │", "└──────┘"] }], vibePoints: -5, coherenceImpact: -15, bugChance: 0, bugFix: 1 // New property: removes 1 bug }, { text: "Apply design patterns", responses: [{ normal: ["Identifying anti-patterns...", "Implementing solutions...", "Documenting changes...", "SUCCESS: Architecture improved"], ascii: ["PATTERN", "┌──────┐", "│ 🔄📐 │", "└──────┘"] }], vibePoints: -5, coherenceImpact: -25, bugChance: 0.1 }]; /**** * Terminal Interface ****/ function createTerminal() { // Create main terminal container var terminal = new Container(); game.addChild(terminal); gameState.terminalContainer = terminal; // Create full screen background var bg = LK.getAsset('terminalBg', { width: 2048, height: 2732, x: 0, y: 2732 * 0.05 }); terminal.addChild(bg); // Create status line var statusLine = new Text2("", { size: 30 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); statusLine.x = 50; statusLine.y = 2732 * 0.10; terminal.addChild(statusLine); gameState.statusLineText = statusLine; // Adjust content container position to account for two-line status var contentContainer = new Container(); contentContainer.x = 0; // Calculate base Y position for content, ensuring space for two status lines var statusLineHeightEstimate = 35 * TEXT_SIZE_MULTIPLIER; // Estimate height per status line var contentBaseY = 2732 * 0.10 + statusLineHeightEstimate * 2 + 20; // Start Y + 2 lines + padding contentContainer.y = contentBaseY; terminal.addChild(contentContainer); gameState.terminalContentContainer = contentContainer; gameState.terminalBaseY = contentBaseY; gameState.terminalMaxVisibleHeight = 2732 * 0.55; // Define visible height for scrolling // Create main terminal output var logText = new Text2("", { size: 32 * TEXT_SIZE_MULTIPLIER, // Changed from 26 to 32 fill: 0x00ff00, align: 'left', wordWrap: true, wordWrapWidth: 1900 }); logText.x = 50; logText.y = 0; // Y position relative to content container contentContainer.addChild(logText); gameState.logText = logText; // Create cursor - BUT DON'T UPDATE ITS POSITION YET var cursor = new Text2("_", { size: 32 * TEXT_SIZE_MULTIPLIER, // Changed from 26 to 32 fill: 0x00ff00 }); cursor.x = 50; // Initial X position cursor.y = 0; // Initial Y position relative to content container contentContainer.addChild(cursor); gameState.cursor = cursor; // Store terminal line height for future reference - adjust to match new text size gameState.terminalLineHeight = 36 * TEXT_SIZE_MULTIPLIER; // Changed from 30 to 36 // Make cursor blink LK.setInterval(function () { if (gameState.cursor) { gameState.cursor.visible = !gameState.cursor.visible; } }, 500); } function createCommandPrompts() { // Remove existing prompt container if (gameState.promptContainer) { game.removeChild(gameState.promptContainer); } // Create new container var promptContainer = new Container(); promptContainer.x = 2048 / 2; promptContainer.y = 2732 * 0.75; game.addChild(promptContainer); gameState.promptContainer = promptContainer; // Initialize commands if needed if (!gameState.currentCommands) { var regularCommands = getCurrentCommands(); var commands = maintenanceCommands.concat(regularCommands); gameState.currentCommands = shuffleArray(commands).slice(0, 5); } // Create END DAY button var endDayText = "END DAY"; var endDayWidth = calculateButtonWidth(endDayText); var endDayButton = new Container(); // Create background var endDayBg = LK.getAsset('buttonBg', { width: endDayWidth, height: 100, color: 0x333333 }); endDayBg.anchor.set(0.5, 0.5); endDayButton.addChild(endDayBg); // Create text var endDayTextObj = new Text2(endDayText, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); endDayTextObj.anchor.set(0.5, 0.5); endDayButton.addChild(endDayTextObj); // Set interactivity - explicitly check busy flag var endDayEnabled = !gameState.isBusy; endDayButton.interactive = endDayEnabled; endDayButton.alpha = endDayEnabled ? 1.0 : 0.5; // Set end day handler endDayButton.down = function () { if (!gameState.isBusy) { endDayButton.scale.set(0.95); } }; endDayButton.up = function () { if (!gameState.isBusy) { endDayButton.scale.set(1); endDay(); } }; // Position endDayButton.x = 600; endDayButton.y = 50; promptContainer.addChild(endDayButton); // Create command buttons gameState.currentCommands.forEach(function (command, index) { var buttonText = ">" + command.text; var buttonWidth = calculateButtonWidth(buttonText); var button = new Container(); // Create background var isMaintenance = maintenanceCommands.some(function (cmd) { return cmd.text === command.text; }); var bg = LK.getAsset('buttonBg', { width: buttonWidth, height: 100, color: isMaintenance ? 0x001133 : 0x333333 }); bg.anchor.set(0.5, 0.5); button.addChild(bg); // Create text var textObj = new Text2(buttonText, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: isMaintenance ? 0x00ffff : 0x00ff00 }); textObj.anchor.set(0.5, 0.5); button.addChild(textObj); // Set interactivity - explicitly check both busy flag and command limit var buttonEnabled = !gameState.isBusy && gameState.commandsUsed < gameState.maxCommandsPerDay; button.interactive = buttonEnabled; button.alpha = buttonEnabled ? 1.0 : 0.5; // Set handlers button.down = function () { if (buttonEnabled) { button.scale.set(0.95); } }; button.up = function () { if (buttonEnabled) { button.scale.set(1); executeCommand(command); } }; // NEW POSITIONING: Align left edges of all buttons // Instead of centering at x = -600, align left edge at a consistent position var leftAlignPosition = -900; // Adjust this value as needed // Position button so left edge is at leftAlignPosition // Since the button's anchor is at center, we need to add half the width button.x = leftAlignPosition + buttonWidth / 2; button.y = 50 + index * 120; promptContainer.addChild(button); }); } function updateCommandButtonsState(enabled) { if (gameState.promptContainer) { gameState.promptContainer.children.forEach(function (child) { // Only update interactive property for actual buttons (Containers) if (child instanceof Container && child.interactive !== undefined) { // Check if this is the END DAY button var isEndDayButton = false; if (child.children && child.children.length > 0) { for (var i = 0; i < child.children.length; i++) { var childElement = child.children[i]; if (childElement instanceof Text2 && childElement.text === "END DAY") { isEndDayButton = true; break; } } } if (isEndDayButton) { // END DAY button should be active if: // 1. The system is not busy processing a command // 2. We're setting buttons to enabled (which happens after a command finishes) // OR if we are disabling buttons (because a command started), the END DAY button should remain active unless it was already busy child.interactive = enabled || !gameState.isBusy; // Visual feedback var endDayDisabled = !enabled && gameState.isBusy; // Disabled only if system is busy AND we are disabling other buttons if (child.children && child.children.length > 0) { for (var j = 0; j < child.children.length; j++) { var element = child.children[j]; if (element.alpha !== undefined) { element.alpha = endDayDisabled ? 0.5 : 1.0; } } } else { child.alpha = endDayDisabled ? 0.5 : 1.0; } } else { // For all other command buttons, they should be enabled only if: // 1. The system is not busy processing a command AND // 2. We haven't reached the daily command limit child.interactive = enabled && gameState.commandsUsed < gameState.maxCommandsPerDay; // Visual feedback var isDisabled = !enabled || gameState.commandsUsed >= gameState.maxCommandsPerDay; if (child.children && child.children.length > 0) { for (var j = 0; j < child.children.length; j++) { var element = child.children[j]; if (element.alpha !== undefined) { element.alpha = isDisabled ? 0.5 : 1.0; } } } else { child.alpha = isDisabled ? 0.5 : 1.0; } } } }); } } function getCurrentCommands() { var availableCommands = []; // Always include maintenance commands availableCommands = availableCommands.concat(maintenanceCommands); // Add base commands availableCommands = availableCommands.concat(commandSets.initial); // Add platform-specific commands if (gameState.conceptCards.platform) { var platformCommands = commandSets['platform_' + gameState.conceptCards.platform.toLowerCase()]; if (platformCommands) { availableCommands = availableCommands.concat(platformCommands); } } // Add combination-specific commands if (gameState.conceptCards.platform && gameState.conceptCards.visual) { var combinationKey = gameState.conceptCards.platform + "_" + gameState.conceptCards.visual; var combinationSet = combinationCommands[combinationKey]; if (combinationSet) { availableCommands = availableCommands.concat(combinationSet); } } return availableCommands; } // Helper to process responses sequentially with delays function processResponses(responses, index, onComplete) { if (!responses || index >= responses.length) { if (onComplete) { onComplete(); } return; } addToTerminalLogWithEffect(responses[index], function () { LK.setTimeout(function () { processResponses(responses, index + 1, onComplete); }, 100); // Delay between lines }); } // Helper to select appropriate response set based on coherence function selectResponseSet(command) { if (!command.responses || !command.responses[0]) { return ["Processing..."]; // Default fallback } // Try degraded first if coherence is low and degraded exists if (gameState.codeCoherence < 50 && command.responses[0].degraded) { return command.responses[0].degraded; } // Otherwise use normal, or fallback if normal doesn't exist return command.responses[0].normal || ["Processing..."]; } function executeCommand(command) { // Check if we can execute commands if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { addToTerminalLogWithEffect("ERROR: Daily command limit reached"); return; } if (gameState.isBusy) { // Already processing, ignore this command return; } // Mark system as busy gameState.isBusy = true; // Apply command effects immediately gameState.vibePoints = Math.max(0, gameState.vibePoints + command.vibePoints); gameState.codeCoherence = Math.min(100, Math.max(0, gameState.codeCoherence - command.coherenceImpact)); gameState.commandsUsed++; // Remove this command from available commands if (gameState.currentCommands) { gameState.currentCommands = gameState.currentCommands.filter(function (cmd) { return cmd !== command; }); } // Refresh command UI to show disabled state createCommandPrompts(); // Show command text in terminal addToTerminalLogWithEffect(">" + command.text, function () { // Prepare response var responseSet; if (command.responses && command.responses[0]) { // Use degraded if coherence is low if (gameState.codeCoherence < 50 && command.responses[0].degraded) { responseSet = command.responses[0].degraded; } // Otherwise use normal else if (command.responses[0].normal) { responseSet = command.responses[0].normal; } } // Fallback if (!responseSet) { responseSet = ["Processing..."]; } // Process response lines var currentLine = 0; function showNextLine() { if (currentLine < responseSet.length) { addToTerminalLogWithEffect(responseSet[currentLine], function () { currentLine++; // Add a small delay between lines LK.setTimeout(showNextLine, 100); }); } else { // All response lines have been shown completeCommand(); } } // Start showing response after a small delay LK.setTimeout(showNextLine, 300); }); // Function to complete command processing function completeCommand() { // Process command effects checkForBugs(command); updateTerminal(); // Clear busy flag gameState.isBusy = false; // FORCE rebuild prompts to update button states createCommandPrompts(); // Let checkGameState handle the limit notification checkGameState(); } } function addToTerminalLogWithEffect(text, callback) { var typingState = { text: text, position: 0, currentText: "" }; // Add new entry to log var logIndex = gameState.terminal.log.length; gameState.terminal.log.push(""); // Track any new lines being added var initialLinesAdded = 0; // If this is not the first entry, count the entry separation if (logIndex > 0) { initialLinesAdded = 1; // One blank line between entries } // Update line count gameState.cursorTracking.lineCount += initialLinesAdded; function type() { if (typingState.position < typingState.text.length) { // Get previous character to check for newline var prevChar = typingState.currentText.slice(-1); // Get current character var currentChar = typingState.text[typingState.position]; // Add character to current text typingState.currentText += currentChar; // Check if we're adding a newline if (currentChar === '\n') { // Increment line counter gameState.cursorTracking.lineCount++; } // Update log entry gameState.terminal.log[logIndex] = typingState.currentText; // Update terminal display updateTerminal(); // Continue typing typingState.position++; LK.setTimeout(type, 50); } else if (callback) { callback(); } } type(); } function updateTerminal() { // Update status line var conceptString = ""; for (var category in gameState.conceptCards) { if (gameState.conceptCards[category]) { conceptString += "#" + gameState.conceptCards[category].replace(/\s+/g, '') + " "; } } // Get all log lines as an array // Split into two lines var statusLine1 = "DAY: " + gameState.day + "/" + gameState.maxDays + " | VIBES: " + gameState.vibePoints + "%" + " | COHERENCE: " + gameState.codeCoherence + "%" + " | BUGS: " + gameState.bugs; var statusLine2 = conceptString; // Set as multiline text gameState.statusLineText.setText(statusLine1 + "\n" + statusLine2); var allLines = gameState.terminal.log.join('\n\n').split('\n'); // Calculate how many lines can fit in the visible area var maxVisibleLines = Math.floor(gameState.terminalMaxVisibleHeight / gameState.terminalLineHeight); // If we have more lines than can fit, trim from the top var visibleLines = allLines; if (allLines.length > maxVisibleLines) { visibleLines = allLines.slice(-maxVisibleLines); } // Update main terminal log text with only the visible lines gameState.logText.setText(visibleLines.join('\n')); // Adjust content container position - no need to scroll as we're trimming content gameState.terminalContentContainer.y = gameState.terminalBaseY; // Update cursor position updateCursorPosition(); } function updateCursorPosition() { if (!gameState.cursor) { return; } // Initialize cursor tracking if it doesn't exist if (!gameState.cursorTracking) { gameState.cursorTracking = { lineCount: 0 }; } // Fixed constants var lineHeight = gameState.terminalLineHeight; // Get the last log entry for X position var lastLogEntry = gameState.terminal.log[gameState.terminal.log.length - 1] || ""; var lastLine = lastLogEntry.split("\n").pop() || ""; // Set X position - adjust the multiplier for character width gameState.cursor.x = 50 + lastLine.length * 17 * TEXT_SIZE_MULTIPLIER; // Changed from 14 to 17 // Set Y position using our explicitly tracked line count (relative to content container) gameState.cursor.y = gameState.cursorTracking.lineCount * lineHeight; // Ensure cursor is visible by auto-scrolling if needed var contentHeight = gameState.logText.height; if (contentHeight > gameState.terminalMaxVisibleHeight) { var cursorY = gameState.cursorTracking.lineCount * lineHeight; if (cursorY > gameState.terminalMaxVisibleHeight) { // Adjust scroll position to keep cursor visible var scrollY = -(cursorY - gameState.terminalMaxVisibleHeight + lineHeight); gameState.terminalContentContainer.y = gameState.terminalBaseY + scrollY; } } } /**** * Game Flow ****/ function enterHallucinationState() { // Prevent multiple hallucination triggers if (gameState.hallucinationMode) { return; } // Set hallucination flag gameState.hallucinationMode = true; // Add warning message addToTerminalLogWithEffect("W̷A̷R̷N̷I̷N̷G̷: S̷Y̷S̷T̷E̷M̷ E̷N̷T̷E̷R̷I̷N̷G̷ H̷A̷L̷L̷U̷C̷I̷N̷A̷T̷I̷O̷N̷ M̷O̷D̷E̷", function () { LK.setTimeout(function () { addToTerminalLogWithEffect("AI TAKING OVER CONCEPT SELECTIONS", function () { LK.setTimeout(function () { addToTerminalLogWithEffect("REALITY COHERENCE COMPROMISED", function () { // Visual effect for hallucination mode // applyHallucinationVisuals(); // TODO: Implement visual effects if needed // Restore minimum coherence to prevent constant triggers gameState.codeCoherence = 5; // Continue the game createCommandPrompts(); }); }, 500); }); }, 500); }); } function applyHallucinationVisuals() { // Change terminal colors for hallucination mode if (gameState.logText) { gameState.logText.fill = 0xff00ff; // Magenta text } // Change status line color if (gameState.statusLineText) { gameState.statusLineText.fill = 0xff00ff; } // Change cursor color if (gameState.cursor) { gameState.cursor.fill = 0xff00ff; } } function checkForBugs(command) { // Modified bug check function var bugChance = command.bugChance * (1 + (100 - gameState.codeCoherence) / 100); if (Math.random() < bugChance) { gameState.bugs++; addToTerminalLogWithEffect("WARNING: Bug detected in system"); // Bugs now affect vibe points gameState.vibePoints = Math.max(0, gameState.vibePoints - 5); } // Check if command can fix bugs if (command.bugFix && gameState.bugs > 0) { var bugsFixed = Math.min(command.bugFix, gameState.bugs); gameState.bugs -= bugsFixed; addToTerminalLogWithEffect("SUCCESS: Fixed ".concat(bugsFixed, " bug").concat(bugsFixed > 1 ? 's' : '')); } } // In the showConceptSelection function, add a parameter for preserving vibes function showConceptSelection(category, preservedVibes) { // If in hallucination mode, automatically select a random concept if (gameState.hallucinationMode) { // Get random option var options = conceptOptions[category]; var randomOption = options[Math.floor(Math.random() * options.length)]; // Set the selection gameState.conceptCards[category] = randomOption; // Preserve vibes if specified if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } // Show selection message with glitchy text addToTerminalLogWithEffect("A̷I̷ S̷E̷L̷E̷C̷T̷E̷D̷ " + category.toUpperCase() + ": " + randomOption, function () { LK.setTimeout(function () { addToTerminalLogWithEffect("I̷N̷I̷T̷I̷A̷L̷I̷Z̷I̷N̷G̷ C̷O̷M̷M̷A̷N̷D̷ I̷N̷T̷E̷R̷F̷A̷C̷E̷...", function () { LK.setTimeout(function () { createCommandPrompts(); updateTerminal(); // Final vibes preservation if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } }, 500); }); }, 500); }); return; } // Original function continues below for non-hallucination mode // Create selection container var selectionContainer = new Container(); selectionContainer.x = 2048 / 2; selectionContainer.y = 2732 / 2; game.addChild(selectionContainer); // Create background var bg = LK.getAsset('terminalBg', { width: 1800, height: 1200, anchorX: 0.5, anchorY: 0.5 }); selectionContainer.addChild(bg); // Create title var title = new Text2("SELECT " + category.toUpperCase(), { size: 40 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); title.anchor.set(0.5, 0); title.y = -500; selectionContainer.addChild(title); // Get and display options var options = conceptOptions[category].slice(); // Use slice to avoid modifying the original array var selectedOptions = []; while (selectedOptions.length < 3 && options.length > 0) { var index = Math.floor(Math.random() * options.length); selectedOptions.push(options[index]); options.splice(index, 1); // Remove selected option from the copy } selectedOptions.forEach(function (option, index) { var button = createCommandButton(">" + option, function () { // Changed createButton to createCommandButton gameState.conceptCards[category] = option; game.removeChild(selectionContainer); // Preserve vibes immediately after selection if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } // Sequence the post-selection events addToTerminalLogWithEffect("SELECTED " + category.toUpperCase() + ": " + option, function () { // Preserve vibes again after adding text if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } LK.setTimeout(function () { addToTerminalLogWithEffect("INITIALIZING COMMAND INTERFACE...", function () { // Preserve vibes again if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } LK.setTimeout(function () { createCommandPrompts(); // Create commands only after initialization text updateTerminal(); // Update terminal *after* prompts are created // Final vibes preservation if (preservedVibes !== undefined) { gameState.vibePoints = preservedVibes; } }, 500); }); }, 500); }); }); button.x = 0; // Keep x centered relative to container button.y = -200 + index * 150; // Adjusted spacing for button height selectionContainer.addChild(button); }); } // Updated button creation with more precise width handling and busy state check function createCommandButton(text, callback, width) { var button = new Container(); // Only check for maintenance commands if it's in the main game (not title screen) // and matches a maintenance command exactly var isMaintenance = gameState.state === STATES.PLAYING && maintenanceCommands.some(function (cmd) { return ">" + cmd.text === text; }); // Only add background for game commands (not START or title screen buttons) if (gameState.state === STATES.PLAYING) { var bg = LK.getAsset('buttonBg', { width: width || 400, height: 100, color: isMaintenance ? 0x001133 : 0x333333 }); bg.anchor.set(0.5, 0.5); button.addChild(bg); } // Add text var textObj = new Text2(text, { size: 30 * TEXT_SIZE_MULTIPLIER, fill: isMaintenance ? 0x00ffff : 0x00ff00 }); textObj.anchor.set(0.5, 0.5); button.addChild(textObj); // Make interactive button.interactive = true; button.down = function () { // Check if game is busy (for in-game buttons only, excluding END DAY) if (gameState.state === STATES.PLAYING && gameState.isBusy && text !== "END DAY") { return; // Don't respond to click if busy } button.scale.set(0.95); }; button.up = function () { // Check if game is busy (for in-game buttons only, excluding END DAY) if (gameState.state === STATES.PLAYING && gameState.isBusy && text !== "END DAY") { // Restore scale even if busy, but don't trigger callback button.scale.set(1); return; } button.scale.set(1); if (callback) { callback(); } }; return button; } // Launch sequence functions function showLaunchScreen() { // Black overlay var overlay = LK.getAsset('overlayBg', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); game.addChild(overlay); // Create a container for the text var bootTextContainer = new Container(); bootTextContainer.x = 2048 / 2; bootTextContainer.y = 2732 / 2; game.addChild(bootTextContainer); // Initial boot message var bootMessages = ["BOOTING VIBE CODER OS v1.0..."]; // Find the longest possible message in advance to set container width var allPossibleMessages = ["BOOTING VIBE CODER OS v1.0...", "INITIALIZING TERMINAL...", "LOADING VIBE DATABASE...", "CONNECTING TO AI SUBSYSTEMS...", "READY!"]; // Determine the widest text to pre-calculate offsets var tempText = new Text2("", { size: 40 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); var maxWidth = 0; for (var i = 0; i < allPossibleMessages.length; i++) { tempText.setText(allPossibleMessages[i]); maxWidth = Math.max(maxWidth, tempText.width); } // Function to update the boot text function updateBootText() { // Clear previous text while (bootTextContainer.children.length > 0) { bootTextContainer.removeChild(bootTextContainer.children[0]); } // Create new text objects, one per line for (var i = 0; i < bootMessages.length; i++) { var lineText = new Text2(bootMessages[i], { size: 40 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00, align: 'left' }); // Center horizontally by setting X position to half the max width lineText.x = -maxWidth / 2; // Position vertically with appropriate line spacing lineText.y = (i - bootMessages.length / 2) * 60 * TEXT_SIZE_MULTIPLIER + 30 * TEXT_SIZE_MULTIPLIER; bootTextContainer.addChild(lineText); } } // Initial render updateBootText(); // Boot sequence LK.setTimeout(function () { bootMessages.push("INITIALIZING TERMINAL..."); updateBootText(); LK.setTimeout(function () { bootMessages.push("LOADING VIBE DATABASE..."); updateBootText(); LK.setTimeout(function () { bootMessages.push("CONNECTING TO AI SUBSYSTEMS..."); updateBootText(); LK.setTimeout(function () { bootMessages.push("READY!"); updateBootText(); LK.setTimeout(function () { // Fade out tween(overlay, { alpha: 0 }, { duration: 500, onFinish: function onFinish() { game.removeChild(overlay); game.removeChild(bootTextContainer); showTitleScreen(); } }); }, 800); }, 800); }, 800); }, 800); }, 800); } function showTitleScreen() { // Clear screen while (game.children.length > 0) { game.removeChild(game.children[0]); } // Set state gameState.state = STATES.TITLE; // Create background var background = LK.getAsset('overlayBg', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2 }); game.addChild(background); // Create title var title = new Text2("VIBE CODER", { size: 120 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); title.anchor.set(0.5, 0.5); title.x = 2048 / 2; title.y = 800; game.addChild(title); // Create subtitle var subtitle = new Text2("The AI Coding Simulator", { size: 60 * TEXT_SIZE_MULTIPLIER, fill: 0x00ff00 }); subtitle.anchor.set(0.5, 0.5); subtitle.x = 2048 / 2; subtitle.y = 1000; game.addChild(subtitle); // Create start button - twice as large var startButton = createCommandButton(">START", function () { // Changed createButton to createCommandButton initGameWithIntro(); }); startButton.scale.set(2); // Make the button twice as large startButton.x = 2048 / 2; startButton.y = 1400; game.addChild(startButton); } function initGameWithIntro() { // Clear screen with fade effect var fadeOverlay = LK.getAsset('overlayBg', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(fadeOverlay); // Fade to black tween(fadeOverlay, { alpha: 1 }, { duration: 500, onFinish: function onFinish() { // Clear screen and init game state while (game.children.length > 0) { game.removeChild(game.children[0]); } initGame(); // Fade from black fadeOverlay.alpha = 1; game.addChild(fadeOverlay); tween(fadeOverlay, { alpha: 0 }, { duration: 500, onFinish: function onFinish() { game.removeChild(fadeOverlay); } }); } }); } // Helper function to calculate button width based on text length function calculateButtonWidth(text) { var minWidth = 400; // Minimum button width var charWidth = 15 * TEXT_SIZE_MULTIPLIER; // Reduced width per character var calculatedWidth = text.length * charWidth; return Math.max(minWidth, calculatedWidth + 80); // Add padding } function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var _ref = [array[j], array[i]]; array[i] = _ref[0]; array[j] = _ref[1]; } return array; } function endDay() { // FORCE clear any stuck state gameState.isBusy = false; // Proceed with normal day end logic gameState.day++; if (gameState.day > gameState.maxDays) { evaluateProject(); return; } // Reset for new day gameState.commandsUsed = 0; gameState.terminal.log = []; gameState.cursorTracking.lineCount = 0; gameState.vibePoints += 5; gameState.codeCoherence = Math.min(100, gameState.codeCoherence + 10); // Add day initialization message addToTerminalLogWithEffect("DAY " + gameState.day + " INITIALIZED"); // Bugs cause overnight coherence loss if (gameState.bugs > 0) { gameState.codeCoherence = Math.max(0, gameState.codeCoherence - gameState.bugs * 2); addToTerminalLogWithEffect("WARNING: " + gameState.bugs + " bug" + (gameState.bugs > 1 ? 's' : '') + " caused overnight code degradation"); } updateTerminal(); // Reset commands and recreate prompt UI gameState.currentCommands = null; createCommandPrompts(); // Check for concept selection day var conceptDays = { 1: 'platform', 3: 'visual', 5: 'genre', 7: 'mechanic', 9: 'feature' }; if (conceptDays[gameState.day]) { LK.setTimeout(function () { showConceptSelection(conceptDays[gameState.day]); }, 500); } checkGameState(); } function checkGameState() { if (gameState.bugs >= 10 || gameState.codeCoherence <= 0) { // Instead of game over, enter hallucination state enterHallucinationState(); return; } if (gameState.commandsUsed >= gameState.maxCommandsPerDay) { // Only add the message if this is the first time we've hit the limit // Check the last log entry to avoid duplication var lastLog = gameState.terminal.log[gameState.terminal.log.length - 1] || ""; if (!lastLog.includes("Daily command limit reached")) { addToTerminalLogWithEffect("NOTICE: Daily command limit reached. END DAY to continue."); } // Force rebuild prompts to ensure END DAY is enabled createCommandPrompts(); } } function evaluateProject() { var score = gameState.vibePoints * 0.4 + Object.values(gameState.conceptCards).filter(Boolean).length * 10 + (10 - gameState.bugs) * 5 + gameState.codeCoherence * 0.2; score = Math.round(Math.min(100, score)); gameOver("PROJECT COMPLETE!\nFINAL SCORE: " + score + "/100\n\n" + generateReview(score)); } function generateReview(score) { // [Previous review generation code remains the same] } function gameOver(message) { gameState.state = STATES.GAME_OVER; addToTerminalLogWithEffect(message); addToTerminalLogWithEffect("\n>PRESS ANY KEY TO RESTART"); // Simple click anywhere to restart var overlay = new Container(); overlay.width = 2048; overlay.height = 2732; overlay.interactive = true; overlay.down = initGame; game.addChild(overlay); } function initGame() { // Reset game state gameState = { state: STATES.PLAYING, day: 1, maxDays: 10, vibePoints: 100, codeCoherence: 100, bugs: 0, commandsUsed: 0, maxCommandsPerDay: 3, terminal: { log: [], statusLine: "", currentTask: "", featureTags: [] }, conceptCards: { platform: null, visual: null, genre: null, mechanic: null, feature: null }, cursorTracking: { lineCount: 0 // Reset line counter when starting new game }, currentCommands: null, // Track available commands hallucinationMode: false // Reset hallucination mode }; createTerminal(); // Sequence the initial text LK.setTimeout(function () { addToTerminalLogWithEffect("VIBE CODER OS v1.0", function () { LK.setTimeout(function () { addToTerminalLogWithEffect("INITIALIZING NEW PROJECT...", function () { LK.setTimeout(function () { addToTerminalLogWithEffect("SELECT PLATFORM TO BEGIN", function () { LK.setTimeout(function () { showConceptSelection('platform'); }, 500); }); }, 500); }); }, 500); }); }, 500); } // Start with launch screen showLaunchScreen();
===================================================================
--- original.js
+++ change.js
@@ -1175,8 +1175,37 @@
}
}
// In the showConceptSelection function, add a parameter for preserving vibes
function showConceptSelection(category, preservedVibes) {
+ // If in hallucination mode, automatically select a random concept
+ if (gameState.hallucinationMode) {
+ // Get random option
+ var options = conceptOptions[category];
+ var randomOption = options[Math.floor(Math.random() * options.length)];
+ // Set the selection
+ gameState.conceptCards[category] = randomOption;
+ // Preserve vibes if specified
+ if (preservedVibes !== undefined) {
+ gameState.vibePoints = preservedVibes;
+ }
+ // Show selection message with glitchy text
+ addToTerminalLogWithEffect("A̷I̷ S̷E̷L̷E̷C̷T̷E̷D̷ " + category.toUpperCase() + ": " + randomOption, function () {
+ LK.setTimeout(function () {
+ addToTerminalLogWithEffect("I̷N̷I̷T̷I̷A̷L̷I̷Z̷I̷N̷G̷ C̷O̷M̷M̷A̷N̷D̷ I̷N̷T̷E̷R̷F̷A̷C̷E̷...", function () {
+ LK.setTimeout(function () {
+ createCommandPrompts();
+ updateTerminal();
+ // Final vibes preservation
+ if (preservedVibes !== undefined) {
+ gameState.vibePoints = preservedVibes;
+ }
+ }, 500);
+ });
+ }, 500);
+ });
+ return;
+ }
+ // Original function continues below for non-hallucination mode
// Create selection container
var selectionContainer = new Container();
selectionContainer.x = 2048 / 2;
selectionContainer.y = 2732 / 2;
vibebeat1
Music
vibebeat2
Music
vibebeat3
Music
vibebeat4
Music
vibebeat5
Music
vibebeat6
Music
buttonsound
Sound effect
endday
Sound effect
startsound
Sound effect
bugsquish
Sound effect
conceptbutton
Sound effect
wheelstart
Sound effect
wheelspin
Sound effect
wheelstop
Sound effect
keytype
Sound effect