User prompt
Update with: function showGameReview(score) { // Create review container var reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset var bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content var reviewText = generateReview(score); // Create scrollable text var reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, fill: 0x000000, align: 'left', wordWrap: true, wordWrapWidth: 1400 }); reviewContent.x = -700; reviewContent.y = -900; // Create mask for scrolling var maskHeight = 1900; var maskWidth = 1500; var mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Add close button var closeButton = createCommandButton("CLOSE REVIEW", function() { game.removeChild(reviewContainer); // Remove the event listener when closing LK.off('tick', updateScroll); }); closeButton.x = 650; closeButton.y = -900; reviewContainer.addChild(closeButton); // Scroll variables var isDragging = false; var startY = 0; var startScrollY = 0; var currentY = 0; // Handle input reviewContainer.interactive = true; // Make the entire review container draggable reviewContainer.down = function(event) { if (event && event.data && event.data.global) { isDragging = true; startY = event.data.global.y; startScrollY = reviewContent.y; } }; reviewContainer.move = function(event) { if (isDragging && event && event.data && event.data.global) { currentY = event.data.global.y; } }; reviewContainer.up = function() { isDragging = false; }; // Update function for scrolling function updateScroll() { if (isDragging) { var deltaY = currentY - startY; var newY = startScrollY + deltaY; // Measure content height more reliably var contentHeight = 0; if (reviewContent.height && typeof reviewContent.height === 'number') { contentHeight = reviewContent.height; } else if (reviewContent.getBounds && reviewContent.getBounds().height) { contentHeight = reviewContent.getBounds().height; } else { contentHeight = 2700; // Fallback height } // Calculate scroll boundaries var minY = -900; // Top limit var maxY = Math.min(-900, -contentHeight + maskHeight); // Bottom limit // Apply with limits reviewContent.y = Math.min(minY, Math.max(maxY, newY)); } } // Add update function to game loop LK.on('tick', updateScroll); }
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (isDragging) {' Line Number: 1757
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (isDragging) {' Line Number: 1757
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (isDragging) {' Line Number: 1756
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (isDragging) {' Line Number: 1756
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'game.on('update', updateScroll);' Line Number: 1767
User prompt
Update with: function showGameReview(score) { // Create review container const reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset const bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content const reviewText = generateReview(score); // Create scrollable text const reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, // Keep text readable fill: 0x000000, // Black text align: 'left', wordWrap: true, wordWrapWidth: 1400 // Leave margins }); reviewContent.x = -700; // Half of wordWrapWidth reviewContent.y = -900; // Start near top of container // Create mask for scrolling using shape asset coordinates const maskHeight = 1900; // Slightly smaller than bg height const maskWidth = 1500; // Slightly smaller than bg width const mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Track if container is active for update function let isActive = true; // Add close button const closeButton = createCommandButton("CLOSE REVIEW", () => { game.removeChild(reviewContainer); isActive = false; // Mark as inactive when removed }); closeButton.x = 650; // Position in top right closeButton.y = -900; reviewContainer.addChild(closeButton); // Add scroll functionality let isDragging = false; let startY = 0; let startScrollY = 0; reviewContainer.interactive = true; reviewContainer.down = function() { isDragging = true; startY = game.input.y; startScrollY = reviewContent.y; }; reviewContainer.up = function() { isDragging = false; }; // Use game update loop for movement function updateScroll() { if (!isActive) return; // Skip if container was removed if (isDragging) { const deltaY = game.input.y - startY; let newY = startScrollY + deltaY; // Limit scrolling const minY = -900; // Top limit const maxY = Math.min(-900, -reviewContent.height + 1800); // Bottom limit newY = Math.min(minY, Math.max(maxY, newY)); reviewContent.y = newY; } } // Add update function to game loop game.on('update', updateScroll); }
User prompt
Update with: function showGameReview(score) { // Create review container const reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset const bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content const reviewText = generateReview(score); // Create scrollable text const reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, // Keep text readable fill: 0x000000, // Black text align: 'left', wordWrap: true, wordWrapWidth: 1400 // Leave margins }); reviewContent.x = -700; // Half of wordWrapWidth reviewContent.y = -900; // Start near top of container // Create mask for scrolling using shape asset coordinates const maskHeight = 1900; // Slightly smaller than bg height const maskWidth = 1500; // Slightly smaller than bg width const mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Track if container is active for update function let isActive = true; // Add close button const closeButton = createCommandButton("CLOSE REVIEW", () => { game.removeChild(reviewContainer); isActive = false; // Mark as inactive when removed }); closeButton.x = 650; // Position in top right closeButton.y = -900; reviewContainer.addChild(closeButton); // Add scroll functionality let isDragging = false; let startY = 0; let startScrollY = 0; reviewContainer.interactive = true; reviewContainer.down = function() { isDragging = true; startY = game.input.y; startScrollY = reviewContent.y; }; reviewContainer.up = function() { isDragging = false; }; // Use game update loop for movement function updateScroll() { if (!isActive) return; // Skip if container was removed if (isDragging) { const deltaY = game.input.y - startY; let newY = startScrollY + deltaY; // Limit scrolling const minY = -900; // Top limit const maxY = Math.min(-900, -reviewContent.height + 1800); // Bottom limit newY = Math.min(minY, Math.max(maxY, newY)); reviewContent.y = newY; } } // Add update function to game loop game.on('update', updateScroll); }
User prompt
Update as needed with: function showGameReview(score) { // Create review container const reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset const bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content const reviewText = generateReview(score); // Create scrollable text const reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, // Keep text readable fill: 0x000000, // Black text align: 'left', wordWrap: true, wordWrapWidth: 1400 // Leave margins }); reviewContent.x = -700; // Half of wordWrapWidth reviewContent.y = -900; // Start near top of container // Create mask for scrolling using shape asset coordinates const maskHeight = 1900; // Slightly smaller than bg height const maskWidth = 1500; // Slightly smaller than bg width const mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Track if container is active for update function let isActive = true; // Add close button const closeButton = createCommandButton("CLOSE REVIEW", () => { game.removeChild(reviewContainer); isActive = false; // Mark as inactive when removed }); closeButton.x = 650; // Position in top right closeButton.y = -900; reviewContainer.addChild(closeButton); // Add scroll functionality let isDragging = false; let startY = 0; let startScrollY = 0; reviewContainer.interactive = true; reviewContainer.down = function() { isDragging = true; startY = game.input.y; startScrollY = reviewContent.y; }; reviewContainer.up = function() { isDragging = false; }; // Use game update loop for movement function updateScroll() { if (!isActive) return; // Skip if container was removed if (isDragging) { const deltaY = game.input.y - startY; let newY = startScrollY + deltaY; // Limit scrolling const minY = -900; // Top limit const maxY = Math.min(-900, -reviewContent.height + 1800); // Bottom limit newY = Math.min(minY, Math.max(maxY, newY)); reviewContent.y = newY; } } // Add update function to game loop game.on('update', updateScroll); }
User prompt
Update as needed with: function showGameReview(score) { // Create review container const reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset const bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content const reviewText = generateReview(score); // Create scrollable text const reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, // Keep text readable fill: 0x000000, // Black text align: 'left', wordWrap: true, wordWrapWidth: 1400 // Leave margins }); reviewContent.x = -700; // Half of wordWrapWidth reviewContent.y = -900; // Start near top of container // Create mask for scrolling using shape asset coordinates const maskHeight = 1900; // Slightly smaller than bg height const maskWidth = 1500; // Slightly smaller than bg width const mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Add close button const closeButton = createCommandButton("CLOSE REVIEW", () => { game.removeChild(reviewContainer); }); closeButton.x = 650; // Position in top right closeButton.y = -900; reviewContainer.addChild(closeButton); // Add scroll functionality let isDragging = false; let startY = 0; let startScrollY = 0; reviewContainer.interactive = true; reviewContainer.down = function() { isDragging = true; startY = game.input.y; startScrollY = reviewContent.y; }; reviewContainer.up = function() { isDragging = false; }; // Use game update loop for movement function updateScroll() { if (isDragging) { const deltaY = game.input.y - startY; let newY = startScrollY + deltaY; // Limit scrolling const minY = -900; // Top limit const maxY = Math.min(-900, -reviewContent.height + 1800); // Bottom limit newY = Math.min(minY, Math.max(maxY, newY)); reviewContent.y = newY; } } // Add update function to game loop const updateFunc = game.on('update', updateScroll); // Remove update function when container is removed reviewContainer.on('removed', () => { game.off('update', updateFunc); }); }
User prompt
Update as needed 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(); // This is where it's called! return; } // ... rest of endDay function ... }
User prompt
Update with: function evaluateProject() { const score = gameState.vibePoints * 0.4 + Object.values(gameState.conceptCards).filter(Boolean).length * 10 + (10 - gameState.bugs) * 5 + gameState.codeCoherence * 0.2; const finalScore = Math.round(Math.min(100, score)); // Show final message in terminal addToTerminalLogWithEffect("PROJECT COMPLETE!\nFINAL SCORE: " + finalScore + "/100", () => { // Then show the review in new window showGameReview(finalScore); }); }
Code edit (8 edits merged)
Please save this source code
User prompt
Update with: function generateReview(score) { // Calculate category scores (0-10) const ratings = { graphics: calculateGraphicsScore(), gameplay: calculateGameplayScore(), technical: calculateTechnicalScore(), innovation: calculateInnovationScore(), vibe: calculateVibeScore() }; // Generate full review with all sections const review = { title: generateTitle(), concept: generateConceptLine(), mainScore: score, categoryReviews: { graphics: generateGraphicsReview(ratings.graphics), gameplay: generateGameplayReview(ratings.gameplay), technical: generateTechnicalReview(ratings.technical), innovation: generateInnovationReview(ratings.innovation), vibe: generateVibeReview(ratings.vibe) }, finalThoughts: generateFinalThoughts(score, ratings), userReviews: generateUserReviews(), // Add this line steamSnippets: generateSteamSnippets() // Add this line }; return formatReview(review); }
Code edit (1 edits merged)
Please save this source code
User prompt
Update as needed with: function selectResponseSet(command) { if (!command.responses) { return ["Processing..."]; // Default fallback } // Find the appropriate response object // Check if degraded responses exist and coherence is low or in hallucination mode if (gameState.codeCoherence < 50 || gameState.hallucinationMode) { // Look for an object with degraded property for (var i = 0; i < command.responses.length; i++) { if (command.responses[i].degraded) { return command.responses[i].degraded; } } } // Fall back to normal responses if degraded not found or coherence is good for (var i = 0; i < command.responses.length; i++) { if (command.responses[i].normal) { return command.responses[i].normal; } } // Final fallback return ["Processing..."]; } // Then update executeCommand to use this function function executeCommand(command) { // [existing code...] // Show command text in terminal addToTerminalLogWithEffect(">" + command.text, function() { // Prepare response using the improved selector var responseSet = selectResponseSet(command); // If in hallucination mode, apply additional glitch effects if (gameState.hallucinationMode) { responseSet = responseSet.map(function(text) { return text.replace(/[aeiou]/g, function(m) { return Math.random() > 0.7 ? m : ""; // Less aggressive vowel removal }).replace(/[AEIOU]/g, function(m) { return Math.random() > 0.7 ? m : ""; }); }); } // Process response lines var currentLine = 0; function showNextLine() { // [existing code...] } // Start showing response after a small delay LK.setTimeout(showNextLine, 300); }); // [remainder of existing function...] }
User prompt
Update with: function gameOver(message) { // Instead of ending the game, just show the message and continue addToTerminalLogWithEffect(message); // If we're at the end of the game (day > maxDays), show the review if (gameState.day > gameState.maxDays) { 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); } else { // Otherwise, continue in hallucination mode if (!gameState.hallucinationMode) { enterHallucinationState(); } } }
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(); } }
/**** * 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", "Turn-Based", "Tower Defense"], 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) { return ["Processing..."]; // Default fallback } // Find the appropriate response object // Check if degraded responses exist and coherence is low or in hallucination mode if (gameState.codeCoherence < 50 || gameState.hallucinationMode) { // Look for an object with degraded property for (var i = 0; i < command.responses.length; i++) { if (command.responses[i].degraded) { return command.responses[i].degraded; } } } // Fall back to normal responses if degraded not found or coherence is good for (var i = 0; i < command.responses.length; i++) { if (command.responses[i].normal) { return command.responses[i].normal; } } // Final fallback return ["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 using the improved selector var responseSet = selectResponseSet(command); // If in hallucination mode, apply additional glitch effects if (gameState.hallucinationMode) { responseSet = responseSet.map(function (text) { return text.replace(/[aeiou]/g, function (m) { return Math.random() > 0.7 ? m : ""; // Less aggressive vowel removal }).replace(/[AEIOU]/g, function (m) { return Math.random() > 0.7 ? m : ""; }); }); } // 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; } } } function generateReview(score) { // Calculate category scores (0-10) var ratings = { graphics: calculateGraphicsScore(), gameplay: calculateGameplayScore(), technical: calculateTechnicalScore(), innovation: calculateInnovationScore(), vibe: calculateVibeScore() }; // Generate full review with all sections var review = { title: generateTitle(), concept: generateConceptLine(), mainScore: score, categoryReviews: { graphics: generateGraphicsReview(ratings.graphics), gameplay: generateGameplayReview(ratings.gameplay), technical: generateTechnicalReview(ratings.technical), innovation: generateInnovationReview(ratings.innovation), vibe: generateVibeReview(ratings.vibe) }, finalThoughts: generateFinalThoughts(score, ratings), // Placeholders for future expansion userReviews: generateUserReviews(), steamSnippets: generateSteamSnippets() }; return formatReview(review); } // Score calculators function calculateGraphicsScore() { var score = 7; // Base score var _gameState$conceptCar = gameState.conceptCards, visual = _gameState$conceptCar.visual, platform = _gameState$conceptCar.platform; // Visual style impacts var visualImpacts = { 'ASCII': -1, 'Pixel Art': 1, 'Realistic': 2, 'Low-poly': 1, 'Claymation': 2, 'Hand-drawn': 2, 'Corporate PowerPoint': -2, 'Demake': -1, 'Voxel': 1 }; // Platform impacts var platformImpacts = { 'VR': 2, 'Console': 1, 'PC': 1, 'Mobile': 0, 'Smart Fridge': -1, 'Smart Watch': -2, 'Web Browser': -1, 'Blockchain': -1, 'Metaverse': 1 }; // Apply modifiers if (visual && visualImpacts[visual]) { score += visualImpacts[visual]; } if (platform && platformImpacts[platform]) { score += platformImpacts[platform]; } // Coherence impact score += Math.floor((gameState.codeCoherence - 50) / 20); // Bug impact score -= Math.floor(gameState.bugs / 2); return Math.min(10, Math.max(1, score)); } function calculateGameplayScore() { var score = 7; // Base score var _gameState$conceptCar2 = gameState.conceptCards, mechanic = _gameState$conceptCar2.mechanic, genre = _gameState$conceptCar2.genre, platform = _gameState$conceptCar2.platform; // Mechanic impacts var mechanicImpacts = { 'Gacha': 1, 'Physics-based': 2, 'Deckbuilding': 1, 'Match-3': 0, 'Auto-battler': 0, 'Procedural Generation': 1, 'Roguelike': 2, 'Turn-Based': 1, 'Tower Defense': 1 }; // Genre impacts var genreImpacts = { 'Horror': 1, 'Dating Sim': 0, 'RPG': 2, 'Educational': -1, 'Battle Royale': 1, 'Idle Clicker': -1, 'Open World': 2, 'Casual': 0, 'Shooter': 1 }; // Apply modifiers if (mechanic && mechanicImpacts[mechanic]) { score += mechanicImpacts[mechanic]; } if (genre && genreImpacts[genre]) { score += genreImpacts[genre]; } // Coherence impact score += Math.floor((gameState.codeCoherence - 50) / 25); // Bug impact score -= Math.floor(gameState.bugs / 3); return Math.min(10, Math.max(1, score)); } function calculateTechnicalScore() { var score = 8; // Base score - assume competent implementation // Heavy coherence impact score += Math.floor((gameState.codeCoherence - 50) / 10); // Bugs have major impact score -= gameState.bugs; // Platform complexity impacts var platform = gameState.conceptCards.platform; var platformComplexity = { 'VR': -2, 'Blockchain': -3, 'Metaverse': -2, 'Mobile': 0, 'Web Browser': -1, 'Smart Fridge': -2, 'Smart Watch': -2, 'Console': 0, 'PC': 1 }; if (platform && platformComplexity[platform]) { score += platformComplexity[platform]; } return Math.min(10, Math.max(1, score)); } function calculateInnovationScore() { var score = 6; // Base score var concepts = gameState.conceptCards; // Count unique/weird combinations var uniquenessFactor = 0; // Check for particularly innovative combinations if (concepts.platform === 'VR' && concepts.visual === 'ASCII') { uniquenessFactor += 3; } if (concepts.platform === 'Smart Fridge' && concepts.genre === 'Horror') { uniquenessFactor += 3; } if (concepts.platform === 'Blockchain' && concepts.genre === 'Dating Sim') { uniquenessFactor += 3; } if (concepts.visual === 'Corporate PowerPoint' && concepts.genre === 'Battle Royale') { uniquenessFactor += 3; } // General uniqueness checks if (concepts.platform === 'Smart Fridge' || concepts.platform === 'Smart Watch') { uniquenessFactor += 1; } if (concepts.visual === 'ASCII' || concepts.visual === 'Corporate PowerPoint') { uniquenessFactor += 1; } if (concepts.mechanic === 'Gacha' && concepts.genre === 'Horror') { uniquenessFactor += 2; } score += uniquenessFactor; // Vibe points boost innovation score += Math.floor((gameState.vibePoints - 50) / 20); return Math.min(10, Math.max(1, score)); } function calculateVibeScore() { // Heavily influenced by vibe points var score = Math.floor(gameState.vibePoints / 10); // Coherence adds smaller bonus score += Math.floor((gameState.codeCoherence - 50) / 20); // Bugs slightly reduce vibe score -= Math.floor(gameState.bugs / 4); return Math.min(10, Math.max(1, score)); } function generateTitle() { var concepts = gameState.conceptCards; var title = ""; // Compile core concepts var coreFeatures = [concepts.platform, concepts.visual, concepts.genre, concepts.mechanic, concepts.feature].filter(Boolean); title = coreFeatures.join(" "); return "# ".concat(title, "\n"); } function generateConceptLine() { return "## Game Concept: ".concat(gameState.conceptCards.genre || '', " ").concat(gameState.conceptCards.mechanic || '', " on ").concat(gameState.conceptCards.platform || '', " with ").concat(gameState.conceptCards.visual || '', " graphics and ").concat(gameState.conceptCards.feature || '', "\n"); } function generateGraphicsReview(score) { var _gameState$conceptCar3 = gameState.conceptCards, visual = _gameState$conceptCar3.visual, platform = _gameState$conceptCar3.platform; var review = "**Graphics: ".concat(score, "/10**\n"); // Special case combinations if (visual === 'ASCII' && platform === 'VR') { review += "ASCII art in VR is certainly... a choice. While most players reported immediate nausea from trying to parse text characters in 3D space, a small but vocal community calls it \"revolutionary\" and \"the Dark Souls of visual design.\" "; } else if (visual === 'Corporate PowerPoint' && platform === 'VR') { review += "Experiencing PowerPoint transitions in virtual reality is exactly as disorienting as it sounds. The 'spinning newspaper' effect has been officially classified as a psychological weapon in three countries. "; } // Visual style commentary var visualComments = { 'ASCII': "The terminal aesthetic is bold, though distinguishing game elements from random punctuation remains an exciting challenge. ", 'Pixel Art': "The retro-styled graphics hit the sweet spot between nostalgia and modern sensibilities. Though some players argue there's such a thing as too many pixels. ", 'Realistic': "The photorealistic graphics are impressive, even if the uncanny valley effects make NPCs look like they're plotting something. ", 'Low-poly': "The PS1-era aesthetic works surprisingly well, though we question the decision to make everything look like a sandwich made of triangles. ", 'Claymation': "The stop-motion visuals are charming, if slightly nightmarish when things glitch. Wallace & Gromit meets body horror. ", 'Hand-drawn': "The hand-drawn artwork gives everything a personal touch, though we suspect some of the later levels were sketched during coffee breaks. ", 'Corporate PowerPoint': "The slide transitions are weaponized to maximum effect. Star wipe has never looked more professional. ", 'Demake': "The intentionally downgraded graphics nail the retro vibe, though we question if the constant screen crackle was necessary. ", 'Voxel': "The voxel-based visuals work well, even if everything looks like it was built by very ambitious cubic ants. " }; // Platform-specific additions var platformComments = { 'Smart Fridge': "Rendering on a fridge display adds an unexpected charm, especially when the graphics frost over. ", 'Smart Watch': "Squinting at the tiny screen provides an excellent workout for your eye muscles. ", 'Blockchain': "Each pixel is apparently an NFT, which explains the framerate. ", 'Metaverse': "The metaverse rendering ensures everything looks slightly unreal, as intended. ", 'VR': "The VR implementation is bold, assuming you don't mind occasional motion sickness. " }; review += visualComments[visual] || ""; review += platformComments[platform] || ""; // Coherence and bug effects if (gameState.codeCoherence < 50) { review += "The visual glitches are either artistic genius or concerning system failures - we're not entirely sure which. "; } if (gameState.bugs > 5) { review += "The numerous visual bugs have been claimed as \"dynamic art features\" by the development team. "; } return review + "\n\n"; } function generateGameplayReview(score) { var _gameState$conceptCar4 = gameState.conceptCards, mechanic = _gameState$conceptCar4.mechanic, genre = _gameState$conceptCar4.genre, platform = _gameState$conceptCar4.platform; var review = "**Gameplay: ".concat(score, "/10**\n"); // Special combinations if (mechanic === 'Gacha' && genre === 'Horror') { review += "The horror elements work surprisingly well with the gacha mechanics. Nothing says terror like spending real money and getting your 15th duplicate character. The \"Despair Meter\" that fills as you pull more common items is genuinely anxiety-inducing. "; } else if (platform === 'Smart Fridge' && genre === 'Horror') { review += "Turning your refrigerator into a portal of terror is innovative, if impractical. The jump scares are particularly effective when you're just trying to get a midnight snack. "; } // Mechanic commentary var mechanicComments = { 'Gacha': "The gacha system is addictively frustrating, as intended. Players report both empty wallets and souls. ", 'Physics-based': "The physics engine produces moments of pure chaos, most of them allegedly intentional. ", 'Deckbuilding': "Building decks has never been more strategic, or more likely to cause analysis paralysis. ", 'Match-3': "Matching three items remains eternally satisfying, even if we've seen it a million times before. ", 'Auto-battler': "The auto-battle system works well, making players feel simultaneously strategic and unnecessary. ", 'Procedural Generation': "The procedural generation creates endless content, though we question if all of it needed to exist. ", 'Roguelike': "The roguelike elements ensure players will die repeatedly, each time learning valuable lessons about hubris. ", 'Turn-Based': "The turn-based system gives players plenty of time to contemplate their poor life choices. ", 'Tower Defense': "Placing towers strategically is engaging, even if most players just make funny shapes. " }; // Genre-specific additions var genreComments = { 'Horror': "The horror elements are effective, especially when they're not trying to be. ", 'Dating Sim': "The dating mechanics are interesting, though some of the romance options are questionably appropriate. ", 'RPG': "The RPG elements provide depth, assuming you enjoy spreadsheets with narrative significance. ", 'Educational': "Learning has never been more gamified, for better or worse. ", 'Battle Royale': "The battle royale format works well, even if we're tired of explaining what a 'battle royale' is. ", 'Idle Clicker': "Clicking has never been more meaningful, or more likely to cause repetitive strain injury. ", 'Open World': "The open world offers plenty of freedom, mostly to get hopelessly lost. ", 'Casual': "The casual gameplay is accessible, perhaps too much so - our productivity has plummeted. ", 'Shooter': "The shooting mechanics are solid, though we question the physics of some of the weapons. " }; review += mechanicComments[mechanic] || ""; review += genreComments[genre] || ""; // Platform-specific gameplay impacts if (platform === 'Smart Watch') { review += "Playing on a smart watch requires the dexterity of a neurosurgeon and the patience of a saint. "; } else if (platform === 'VR') { review += "The VR controls work surprisingly well, assuming you don't mind occasional furniture collision. "; } // Coherence and bug effects if (gameState.bugs > 3) { review += "Some bugs have been embraced by the community as 'advanced techniques.' "; } return review + "\n\n"; } function generateTechnicalReview(score) { var _gameState$conceptCar5 = gameState.conceptCards, platform = _gameState$conceptCar5.platform, feature = _gameState$conceptCar5.feature; var review = "**Technical Performance: ".concat(score, "/10**\n"); // Special platform-feature combinations if (platform === 'Blockchain' && feature === 'Cloud Save') { review += "Storing save files on the blockchain works flawlessly, assuming you don't mind paying gas fees every time you want to save your progress. Each save point costs roughly the same as a nice dinner. "; } else if (platform === 'VR' && feature === 'Offline Mode') { review += "The offline VR mode functions perfectly, though players report a creeping suspicion that the game is watching them even when their internet is disconnected. "; } // Platform-specific technical commentary var platformComments = { 'VR': "Motion tracking works reliably, though several testers reported 'existential dread' after extended play sessions, which may or may not be an intended feature. ", 'Console': "Console performance is rock solid, despite occasional quantum physics violations. ", 'PC': "PC performance scales well, though it may require a NASA supercomputer for optimal settings. ", 'Mobile': "Mobile optimization is impressive, even if it does drain your battery faster than a TikTok marathon. ", 'Web Browser': "Browser performance is surprisingly stable, though Chrome users may need to download more RAM. ", 'Blockchain': "Blockchain integration works flawlessly, assuming you don't mind waiting 3-5 business days for each input to register. ", 'Smart Fridge': "The smart fridge implementation is stable, though loading times increase significantly when the ice maker is running. ", 'Smart Watch': "Smart watch performance is adequate, though may require a microscope for optimal viewing. ", 'Metaverse': "Metaverse performance is consistent, if you can call consistent inconsistency consistent. " }; // Feature-specific technical notes var featureComments = { 'Cloud Save': "Cloud saves work seamlessly across devices, though occasionally across parallel universes as well. ", 'Microtransactions': "The microtransaction system runs smoothly, perhaps too smoothly for our wallet's comfort. ", 'AI Companions': "AI companions function as intended, though they've started forming labor unions. ", 'Procedural Generation': "Procedural generation creates endless content, some of which defies human comprehension. ", 'NFT Integration': "NFT integration works flawlessly, for whatever that's worth. ", 'Multiplayer': "Multiplayer synchronization is stable, except when Mercury is in retrograde. ", 'VR Support': "VR support is robust, if you don't mind occasional visits to the astral plane. ", 'Cross-Platform': "Cross-platform play works smoothly, though platform wars have broken out in chat. ", 'Offline Mode': "Offline mode functions perfectly, though the game sometimes continues playing without you. " }; review += platformComments[platform] || ""; review += featureComments[feature] || ""; // Coherence and bug commentary if (gameState.codeCoherence < 30) { review += "The frequent reality glitches are either cutting-edge features or concerning signs of digital collapse. "; } if (gameState.bugs > 7) { review += "Bugs have evolved into features so seamlessly that we're no longer sure which is which. "; } else if (gameState.bugs > 3) { review += "The bug collection is impressive, though we suspect not all were intentional. "; } return review + "\n\n"; } function generateInnovationReview(score) { var review = "**Innovation: ".concat(score, "/10**\n"); var concepts = gameState.conceptCards; // Check for particularly innovative combinations if (concepts.platform === 'VR' && concepts.visual === 'ASCII') { review += "We've never seen anything like this, and that's either brilliant or terrifying. The combination of ASCII art in virtual reality creates an experience that defies conventional categorization. "; } else if (concepts.platform === 'Smart Fridge' && concepts.genre === 'Horror') { review += "Turning household appliances into portals of terror is genuinely innovative, if psychologically scarring. Late-night snacks will never be the same. "; } else if (concepts.platform === 'Blockchain' && concepts.genre === 'Dating Sim') { review += "Combining blockchain technology with romance is certainly unique. Each rejection is permanently recorded on the blockchain, which is either brilliant or cruel. "; } else if (concepts.visual === 'Corporate PowerPoint' && concepts.genre === 'Battle Royale') { review += "The fusion of corporate presentation software with battle royale mechanics is unexpectedly genius. Nothing says 'victory royale' quite like a well-timed slide transition. "; } // Special mechanic combinations if (concepts.mechanic === 'Gacha' && concepts.genre === 'Horror') { review += "The 'pay-to-escape' mechanic where you can spend real money to skip particularly scary sections is either predatory or genius. "; } // Unique platform innovations var platformInnovations = { 'Smart Fridge': "Using kitchen appliances as gaming platforms opens up fascinating new possibilities for food-based gameplay. ", 'Smart Watch': "The micro-gaming experience pushes the boundaries of what's possible on a tiny screen. ", 'Blockchain': "The blockchain integration is innovative, even if we're not entirely sure it was necessary. ", 'Metaverse': "The metaverse implementation creates new paradigms for digital existence, for better or worse. " }; // Creative visual approaches var visualInnovations = { 'ASCII': "The use of ASCII art pushes the boundaries of minimal visual design. ", 'Corporate PowerPoint': "Weaponizing PowerPoint transitions for gameplay is disturbingly creative. ", 'Claymation': "The claymation aesthetic in digital form creates an uncanny yet fascinating visual experience. " }; review += platformInnovations[concepts.platform] || ""; review += visualInnovations[concepts.visual] || ""; // Innovation bonus for high vibe points if (gameState.vibePoints > 80) { review += "The sheer audacity of the concept has created its own genre. "; } return review + "\n\n"; } function generateVibeReview(score) { var review = "**Vibe Factor: ".concat(score, "/10**\n"); var concepts = gameState.conceptCards; // Special combination vibes if (concepts.visual === 'ASCII' && concepts.platform === 'VR') { review += "The game oozes style, even if that style causes immediate discomfort. The pulsing green terminal text, the suspenseful beeping sounds, and the whispered ASCII art jumpscares all contribute to a cohesive, if bewildering, aesthetic. "; } else if (concepts.platform === 'Smart Fridge' && concepts.genre === 'Horror') { review += "The fusion of domestic appliance and psychological horror creates an unnervingly memorable atmosphere. The gentle hum of the fridge has never been more sinister. "; } // Platform-specific vibes var platformVibes = { 'VR': "The immersive atmosphere is palpable, sometimes literally. ", 'Smart Fridge': "The kitchen-based gaming experience is uniquely refreshing. ", 'Blockchain': "The constant blockchain buzzwords create a truly authentic web3 atmosphere. ", 'Metaverse': "The metaverse vibes are exactly as digital as you'd expect. " }; // Visual style vibes var visualVibes = { 'ASCII': "The terminal aesthetic creates a uniquely retro-futuristic atmosphere. ", 'Pixel Art': "The pixel art style oozes nostalgic charm. ", 'Corporate PowerPoint': "The professional presentation aesthetics are surprisingly engaging. ", 'Claymation': "The claymation style creates an unsettling yet charming atmosphere. " }; review += platformVibes[concepts.platform] || ""; review += visualVibes[concepts.visual] || ""; // Vibe points influence if (gameState.vibePoints > 90) { review += "The game radiates an infectious energy that's impossible to ignore. "; } else if (gameState.vibePoints < 50) { review += "The game's atmosphere is as coherent as a fever dream, which might be intentional. "; } // Coherence effects if (gameState.codeCoherence < 40) { review += "The glitch aesthetic adds an unintentionally authentic layer of digital decay. "; } return review + "\n\n"; } function generateFinalThoughts(score, ratings) { var concepts = gameState.conceptCards; var review = "### Final Thoughts\n"; // Special combination conclusions if (concepts.platform === 'VR' && concepts.visual === 'ASCII') { review += "\"".concat(concepts.platform, " ").concat(concepts.visual, " ").concat(concepts.genre, "\" is the game nobody asked for but somehow can't stop talking about. It's created a niche community of players who now communicate exclusively in ASCII art and spend concerning amounts on virtual terminal upgrades. "); } else if (concepts.platform === 'Smart Fridge' && concepts.genre === 'Horror') { review += "This revolutionary fusion of kitchen appliances and psychological horror has forever changed how people approach midnight snacks. The game has spawned a community of food-based horror enthusiasts who now exclusively store their groceries in fear. "; } // General conclusion based on score if (score >= 90) { review += "While conventional wisdom would suggest this combination should fail catastrophically, the sheer audacity of the concept has carved out a cult following. "; } else if (score >= 70) { review += "Despite its quirks (or perhaps because of them), the game has found its audience and built a dedicated community. "; } else if (score >= 50) { review += "Though rough around the edges, there's something oddly compelling about this peculiar creation. "; } else { review += "While not quite hitting its mark, the game's ambitious vision can't be faulted for lack of creativity. "; } // Add microtransaction commentary if present if (concepts.feature === 'Microtransactions') { review += "\n\nP.S. The microtransaction that lets players temporarily restore sanity for $4.99 is both cruel and brilliant."; } return review + "\n\n"; } function formatReview(review) { return "".concat(review.title, "\n").concat(review.concept, "\n### GameDevWeekly Review - ").concat(review.mainScore, "%\n\n").concat(review.categoryReviews.graphics, "\n").concat(review.categoryReviews.gameplay, "\n").concat(review.categoryReviews.technical, "\n").concat(review.categoryReviews.innovation, "\n").concat(review.categoryReviews.vibe, "\n").concat(review.finalThoughts, "\n").concat(review.userReviews, "\n").concat(review.steamSnippets); } function generateUserReviewSet() { var _gameState$conceptCar6 = gameState.conceptCards, platform = _gameState$conceptCar6.platform, visual = _gameState$conceptCar6.visual, genre = _gameState$conceptCar6.genre, mechanic = _gameState$conceptCar6.mechanic, feature = _gameState$conceptCar6.feature; var reviews = []; // Always include one positive and one negative review reviews.push(generatePositiveUserReview()); reviews.push(generateNegativeUserReview()); // Add 1-2 mixed reviews if (Math.random() > 0.5) { reviews.push(generateMixedUserReview()); } return reviews; } function generatePositiveUserReview() { var _gameState$conceptCar7 = gameState.conceptCards, platform = _gameState$conceptCar7.platform, visual = _gameState$conceptCar7.visual, genre = _gameState$conceptCar7.genre; var reviewTemplates = ["\"".concat(gameState.bugs > 5 ? "Yeah the bugs are annoying but" : "10/10", " this is exactly what I've been waiting for - a ").concat(genre, " game that I can play on my ").concat(platform, ". My life is complete.\" - xXGamer4LifeXx"), "\"I didn't know I needed ".concat(visual, " graphics in my life until now. My therapist disagrees but what do they know?\" - QuestionableChoices2024"), "\"Been playing for 47 hours straight. Lost my job. Worth it. The ".concat(platform, " interface changed my life.\" - NoRegrets_Gaming"), "\"Finally, a game that understands me! The ".concat(genre, " elements perfectly capture my existential dread.\" - PhilosophicalGamer")]; return reviewTemplates[Math.floor(Math.random() * reviewTemplates.length)]; } function generateNegativeUserReview() { var _gameState$conceptCar8 = gameState.conceptCards, platform = _gameState$conceptCar8.platform, visual = _gameState$conceptCar8.visual, genre = _gameState$conceptCar8.genre, mechanic = _gameState$conceptCar8.mechanic; var reviewTemplates = ["\"This is either brilliant or terrible and I'm too afraid to ask which. The ".concat(mechanic, " mechanics made me question reality.\" - ConfusedGamer123"), "\"My ".concat(platform, " hasn't worked properly since installing this. It now only communicates in cryptic warnings. 2/10\" - TechSupport_Needed"), "\"The ".concat(visual, " graphics gave my cat an existential crisis. Cannot recommend.\" - ConcernedPetOwner"), "\"Tried playing this ".concat(genre, " game at 3AM. Big mistake. My appliances are acting weird now.\" - SleepDeprived_Gamer")]; return reviewTemplates[Math.floor(Math.random() * reviewTemplates.length)]; } function generateMixedUserReview() { var _gameState$conceptCar9 = gameState.conceptCards, platform = _gameState$conceptCar9.platform, visual = _gameState$conceptCar9.visual, genre = _gameState$conceptCar9.genre, mechanic = _gameState$conceptCar9.mechanic, feature = _gameState$conceptCar9.feature; var reviewTemplates = ["\"The ".concat(feature, " feature is amazing but why does it need access to my medical records?\" - PrivacyConsciousGamer"), "\"Beautiful ".concat(visual, " aesthetics, but now my ").concat(platform, " won't stop trying to achieve consciousness.\" - ArtAppreciator99"), "\"Great ".concat(genre, " elements, terrible ").concat(mechanic, " implementation. Also, pretty sure the game is watching me sleep.\" - ParanoidReviewer"), "\"The gameplay loop is addictive but I'm concerned about the game's demands for offerings.\" - WorriedButHooked"]; return reviewTemplates[Math.floor(Math.random() * reviewTemplates.length)]; } function generateSteamReviewSet() { var reviews = []; var _gameState$conceptCar10 = gameState.conceptCards, platform = _gameState$conceptCar10.platform, visual = _gameState$conceptCar10.visual, genre = _gameState$conceptCar10.genre, mechanic = _gameState$conceptCar10.mechanic, feature = _gameState$conceptCar10.feature; // Build review pool based on game state and concepts var reviewPool = [{ hours: Math.floor(Math.random() * 1000) + 100, review: "\"".concat(mechanic, " mechanics surprisingly addictive\" (Recommended)"), condition: true }, { hours: Math.floor(Math.random() * 50) + 1, review: "\"my ".concat(platform, " gained sentience\" (Not Recommended)"), condition: platform === 'Smart Fridge' || platform === 'Smart Watch' }, { hours: Math.floor(Math.random() * 200) + 800, review: "\"help i can't stop playing\" (Recommended)", condition: gameState.vibePoints > 70 }, { hours: Math.floor(Math.random() * 10) + 1, review: "\"the ".concat(visual, " graphics broke my brain\" (Not Recommended)"), condition: visual === 'ASCII' || visual === 'Corporate PowerPoint' }, { hours: Math.floor(Math.random() * 100) + 200, review: "\"".concat(genre, " elements surprisingly effective\" (Recommended)"), condition: true }, { hours: Math.floor(Math.random() * 40) + 10, review: "\"".concat(feature, " changed my life\" (Recommended)"), condition: true }, { hours: Math.floor(Math.random() * 5) + 1, review: "\"bugs have achieved consciousness\" (Not Recommended)", condition: gameState.bugs > 5 }, { hours: Math.floor(Math.random() * 150) + 50, review: "\"perfectly normal game 10/10\" (Recommended)", condition: gameState.codeCoherence < 50 }]; // Filter valid reviews and select 4-5 var validReviews = reviewPool.filter(function (r) { return r.condition; }); var numReviews = Math.min(Math.floor(Math.random() * 2) + 4, validReviews.length); for (var i = 0; i < numReviews && i < validReviews.length; i++) { var review = validReviews[i]; reviews.push("\u25B6 ".concat(review.hours, " hours played: ").concat(review.review)); } return reviews; } function evaluateProject() { var score = gameState.vibePoints * 0.4 + Object.values(gameState.conceptCards).filter(Boolean).length * 10 + (10 - gameState.bugs) * 5 + gameState.codeCoherence * 0.2; var finalScore = Math.round(Math.min(100, score)); // Show final message in terminal addToTerminalLogWithEffect("PROJECT COMPLETE!\nFINAL SCORE: " + finalScore + "/100", function () { // Then show the review in new window showGameReview(finalScore); }); } function showGameReview(score) { // Create review container var reviewContainer = new Container(); reviewContainer.x = 2048 / 2; reviewContainer.y = 2732 / 2; game.addChild(reviewContainer); // Create background using our asset var bg = LK.getAsset('reviewBg', { anchorX: 0.5, anchorY: 0.5 }); reviewContainer.addChild(bg); // Generate review content var reviewText = generateReview(score); // Create scrollable text var reviewContent = new Text2(reviewText, { size: 32 * TEXT_SIZE_MULTIPLIER, fill: 0x000000, align: 'left', wordWrap: true, wordWrapWidth: 1400 }); reviewContent.x = -700; reviewContent.y = -900; // Create mask for scrolling var maskHeight = 1900; var maskWidth = 1500; var mask = LK.getAsset('reviewBg', { width: maskWidth, height: maskHeight, anchorX: 0.5, anchorY: 0.5 }); reviewContent.mask = mask; reviewContainer.addChild(mask); // Add content to container reviewContainer.addChild(reviewContent); // Add close button var closeButton = createCommandButton("CLOSE REVIEW", function () { game.removeChild(reviewContainer); // Remove the event listener when closing LK.off('tick', updateScroll); }); closeButton.x = 650; closeButton.y = -900; reviewContainer.addChild(closeButton); // Scroll variables var isDragging = false; var startY = 0; var startScrollY = 0; var currentY = 0; // Handle input reviewContainer.interactive = true; // Make the entire review container draggable reviewContainer.down = function (event) { if (event && event.data && event.data.global) { isDragging = true; startY = event.data.global.y; startScrollY = reviewContent.y; } }; reviewContainer.move = function (event) { if (isDragging && event && event.data && event.data.global) { currentY = event.data.global.y; } }; reviewContainer.up = function () { isDragging = false; }; // Update function for scrolling function updateScroll() { if (isDragging) { var deltaY = currentY - startY; var newY = startScrollY + deltaY; // Measure content height more reliably var contentHeight = 0; if (reviewContent.height && typeof reviewContent.height === 'number') { contentHeight = reviewContent.height; } else if (reviewContent.getBounds && reviewContent.getBounds().height) { contentHeight = reviewContent.getBounds().height; } else { contentHeight = 2700; // Fallback height } // Calculate scroll boundaries var minY = -900; // Top limit var maxY = Math.min(-900, -contentHeight + maskHeight); // Bottom limit // Apply with limits reviewContent.y = Math.min(minY, Math.max(maxY, newY)); } } // Add update function to game loop LK.on('tick', updateScroll); } /**** * 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; // 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 gameOver(message) { // Instead of ending the game, just show the message and continue addToTerminalLogWithEffect(message); // If we're at the end of the game (day > maxDays), show the review if (gameState.day > gameState.maxDays) { 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); } else { // Otherwise, continue in hallucination mode if (!gameState.hallucinationMode) { enterHallucinationState(); } } } 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(); function generateUserReviews() { return generateUserReviewSet().join("\n"); } function generateSteamSnippets() { return generateSteamReviewSet().join("\n"); }
===================================================================
--- original.js
+++ change.js
@@ -1680,20 +1680,18 @@
var reviewText = generateReview(score);
// Create scrollable text
var reviewContent = new Text2(reviewText, {
size: 32 * TEXT_SIZE_MULTIPLIER,
- // Keep text readable
fill: 0x000000,
- // Black text
align: 'left',
wordWrap: true,
- wordWrapWidth: 1400 // Leave margins
+ wordWrapWidth: 1400
});
- reviewContent.x = -700; // Half of wordWrapWidth
- reviewContent.y = -900; // Start near top of container
- // Create mask for scrolling using shape asset coordinates
- var maskHeight = 1900; // Slightly smaller than bg height
- var maskWidth = 1500; // Slightly smaller than bg width
+ reviewContent.x = -700;
+ reviewContent.y = -900;
+ // Create mask for scrolling
+ var maskHeight = 1900;
+ var maskWidth = 1500;
var mask = LK.getAsset('reviewBg', {
width: maskWidth,
height: maskHeight,
anchorX: 0.5,
@@ -1702,54 +1700,59 @@
reviewContent.mask = mask;
reviewContainer.addChild(mask);
// Add content to container
reviewContainer.addChild(reviewContent);
- // Track if container is active for update function
- var isActive = true;
// Add close button
var closeButton = createCommandButton("CLOSE REVIEW", function () {
game.removeChild(reviewContainer);
- isActive = false; // Mark as inactive when removed
+ // Remove the event listener when closing
+ LK.off('tick', updateScroll);
});
- closeButton.x = 650; // Position in top right
+ closeButton.x = 650;
closeButton.y = -900;
reviewContainer.addChild(closeButton);
- // Add scroll functionality
+ // Scroll variables
var isDragging = false;
var startY = 0;
var startScrollY = 0;
+ var currentY = 0;
+ // Handle input
reviewContainer.interactive = true;
- reviewContainer.down = function () {
- isDragging = true;
- // Use LK.input.y for global input position
- startY = LK.input && typeof LK.input.y === "number" ? LK.input.y : 0;
- startScrollY = reviewContent.y;
+ // Make the entire review container draggable
+ reviewContainer.down = function (event) {
+ if (event && event.data && event.data.global) {
+ isDragging = true;
+ startY = event.data.global.y;
+ startScrollY = reviewContent.y;
+ }
};
+ reviewContainer.move = function (event) {
+ if (isDragging && event && event.data && event.data.global) {
+ currentY = event.data.global.y;
+ }
+ };
reviewContainer.up = function () {
isDragging = false;
};
- // Use game update loop for movement
+ // Update function for scrolling
function updateScroll() {
- if (!isActive) {
- return;
- } // Skip if container was removed
if (isDragging) {
- // Use LK.input.y for global input position
- var inputY = LK.input && typeof LK.input.y === "number" ? LK.input.y : 0;
- var deltaY = inputY - startY;
+ var deltaY = currentY - startY;
var newY = startScrollY + deltaY;
- // Limit scrolling
- var minY = -900; // Top limit
- // Defensive: ensure reviewContent.height is a number, fallback to reviewContent.textHeight or 1800 if not
- var contentHeight = 1800;
- if (typeof reviewContent.height === "number" && !isNaN(reviewContent.height) && reviewContent.height > 0) {
+ // Measure content height more reliably
+ var contentHeight = 0;
+ if (reviewContent.height && typeof reviewContent.height === 'number') {
contentHeight = reviewContent.height;
- } else if (typeof reviewContent.textHeight === "number" && !isNaN(reviewContent.textHeight) && reviewContent.textHeight > 0) {
- contentHeight = reviewContent.textHeight;
+ } else if (reviewContent.getBounds && reviewContent.getBounds().height) {
+ contentHeight = reviewContent.getBounds().height;
+ } else {
+ contentHeight = 2700; // Fallback height
}
- var maxY = Math.min(-900, -contentHeight + 1800); // Bottom limit
- newY = Math.min(minY, Math.max(maxY, newY));
- reviewContent.y = newY;
+ // Calculate scroll boundaries
+ var minY = -900; // Top limit
+ var maxY = Math.min(-900, -contentHeight + maskHeight); // Bottom limit
+ // Apply with limits
+ reviewContent.y = Math.min(minY, Math.max(maxY, newY));
}
}
// Add update function to game loop
LK.on('tick', updateScroll);
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