User prompt
Make all sprites including buttons, kepad numbers (unused sprite), entity eyes and mouths appear instead of just colors
User prompt
Make the text longer and a little slower and after he's done talking he'll say "o-oh n-n-n-nOOOOOOOOOOOOO!!!" and then dissapear, and then white eyes will show up all around the edge of the screen and in the middle of the screen that says "Trapped ending"
User prompt
Add a ??? button on the title screen in the bottom corner that if you press, everything on screen will fade and the figure will glitch into screes and his eyes and mouth will be flipping around on screen and random sprites will pop up and start glitching and then dissapear the figure will say "w-why d-d-diiiid y-y-you do that,? you will be t-t-tr-tr-trapped here f-for eternity" make that dialouge longer and sadder and creepier
User prompt
make dialouge for when you escape with a man running away sprite
User prompt
make hell mode button timing random between beeps, add longer things and if you hover over a button, your screen will shake violently (in hell mode) (Also, dont make it unbeatable.) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Please fix the bug: 'ReferenceError: hellButton is not defined' in or related to this line: 'if (gameState === STATE_INTRO && hellButton && hellButton.alpha < 1) {' Line Number: 172
User prompt
give the figure dialouge before hell mode like "Why would you do this, this isn't worth it. I do want to see you suffer; however, G O O D L U C K!" make that longer and more creepy
User prompt
move it down more
User prompt
move hell mode button down a bit so it's not overlapping start game
User prompt
Dont add hell mode after 35 points just add it to the title screen, and also when you get to the point of choosing to escape or continue, remove all level texts and buttons, and glitch efffects
User prompt
Add a hell mode where everything get glitchier faster and faster patterns (Not too fast)
User prompt
the main menu keeps poppping up during the game, can you fix that?
User prompt
not level 35 score 35
User prompt
make it so the higher score you get, the more glitchy the game becomes ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
make it so you can win after 35 or you could choose to continue
User prompt
remove all level text during dialouge
User prompt
romove all text during dialouge and title screen
User prompt
now, turn the touch to start into a title screen
User prompt
try again
User prompt
Please fix the bug: 'TypeError: LK.showTitle is not a function' in or related to this line: 'LK.showTitle();' Line Number: 225
User prompt
Please fix the bug: 'TypeError: LK.gotoTitleScreen is not a function' in or related to this line: 'LK.gotoTitleScreen();' Line Number: 225
User prompt
after his dialouge it sends you to the title screen
User prompt
Please fix the bug: 'window.addEventListener is not a function' in or related to this line: 'window.addEventListener('keydown', function (event) {' Line Number: 871
User prompt
change of plans:make it so you can just type the code
User prompt
Make the enter hitbox smaller and the clear button hitbox smaller
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var ShadowFigure = Container.expand(function () { var self = Container.call(this); // Dark shadow shape var shadowShape = self.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 5, scaleY: 10, alpha: 0.8 }); // Face elements similar to entity but with different positions/scales var face = self.attachAsset('entityFace', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5, alpha: 0.7 }); // Eyes var leftEye = self.attachAsset('entityEye', { anchorX: 0.5, anchorY: 0.5, x: -65, y: -55, scaleX: 1.2, scaleY: 1.2, alpha: 0.9 }); var rightEye = self.attachAsset('entityEye', { anchorX: 0.5, anchorY: 0.5, x: 65, y: -55, scaleX: 1.2, scaleY: 1.2, alpha: 0.9 }); // Mouth var mouth = self.attachAsset('entityMouth', { anchorX: 0.5, anchorY: 0.5, y: 100, scaleX: 1.4, scaleY: 1.2, alpha: 0.9 }); // Dialogue box var dialogueBox = new Container(); dialogueBox.y = 350; var dialogueBackground = dialogueBox.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 4.5, scaleY: 1.5, alpha: 0.7 }); // Dialogue text var dialogueText = new Text2('', { size: 60, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); dialogueText.anchor.set(0.5, 0.5); dialogueBox.addChild(dialogueText); // Car crash image var carCrashImage = new Container(); carCrashImage.y = -150; carCrashImage.visible = false; var crashBackground = carCrashImage.attachAsset('carCrashImage', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.0, scaleY: 1.0, alpha: 0.7 }); // Skip button var skipButton = new Container(); var skipButtonBg = skipButton.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.2, scaleY: 0.5, alpha: 0.7 }); var skipText = new Text2('SKIP', { size: 60, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); skipText.anchor.set(0.5, 0.5); skipButton.addChild(skipText); skipButton.x = 800; skipButton.y = 500; // Add touch handler for skip button skipButton.down = function (x, y, obj) { self.endDialogue(); }; // Add everything to self self.addChild(dialogueBox); self.addChild(carCrashImage); self.addChild(skipButton); // Ensure car crash image is in front by setting its zIndex carCrashImage.zIndex = 100; // Starting state self.alpha = 0; // Method to start dialogue sequence self.startDialogue = function () { self.alpha = 0; // Hide UI elements during dialogue levelText.visible = false; scoreText.visible = false; highScoreText.visible = false; instructionsText.visible = false; statusText.setText(""); // Fade in sequence tween(self, { alpha: 1 }, { duration: 2000, easing: tween.easeIn, onFinish: function onFinish() { self.playDialogueSequence(); } }); }; // Play the dialogue sequence self.playDialogueSequence = function () { var dialogues = ["Hello...", "Do you remember where you were before the incident?", "*shows blurry image of a person's perspective of driving a car*", "And now, you're here.", "I've been watching you for some time...", "Your thoughts, your fears, your regrets...", "They're all so... delicious.", "This place exists between reality and nightmare.", "A realm where I control everything.", "Your memories are fractured, aren't they?", "The crash wasn't your fault... or was it?", "The guilt you carry is what brought you to me.", "You must complete 35 levels of Simon Says to leave this place.", "With each level, a piece of your soul will return.", "Fail, and you'll remain here... forever.", "Others have tried before you. None have succeeded.", "Their echoes still linger in these walls.", "Can you hear them whispering?", "Follow the patterns. Don't make mistakes.", "Your sanity depends on it.", "Good luck.", "You'll need it.", "*shows devious smile before game starts*"]; var hellModeDialogues = ["Why would you do this to yourself?", "This isn't worth it...", "I didn't think you'd actually choose this path.", "I do want to see you suffer, though...", "Your mind will fracture in ways you cannot imagine.", "The patterns will blur, distort, and deceive you.", "Reality itself will bend against you.", "Time will stretch and contract at my whim.", "I've driven others to madness this way before.", "They clawed at their eyes trying to unsee what I showed them.", "They still scream in the void between thoughts...", "Can you feel them reaching for you even now?", "Their torment will become yours.", "Your soul will shatter into a thousand fragments.", "I will cherish collecting each broken piece...", "Your suffering will nourish me for centuries.", "Your determination is... admirable, but futile.", "No one escapes the nightmare at this depth.", "Still, I'm eager to watch you try...", "Let your sanity slip away, piece by piece...", "G O O D L U C K . . .", "*shows horrific wide grin as face distorts unnaturally*"]; var currentDialogue = 0; var isHellModeDialogue = false; // Check if this is triggered from hell mode button if (gameState === STATE_INTRO && window.hellButton && window.hellButton.alpha < 1) { dialogues = hellModeDialogues; isHellModeDialogue = true; tween(mouth, { scaleX: 3.0, scaleY: 0.8 }, { duration: 800 }); } function showNextDialogue() { if (currentDialogue < dialogues.length) { var dialogue = dialogues[currentDialogue]; // Special cases if (dialogue.includes("*shows blurry image")) { // Show car crash image carCrashImage.visible = true; tween(carCrashImage, { alpha: 0.9 }, { duration: 500 }); dialogueText.setText(""); } else if (dialogue.includes("*shows devious smile") || dialogue.includes("*shows horrific wide grin")) { // Show evil smile, more extreme for hell mode var scaleX = isHellModeDialogue ? 3.5 : 2.5; var scaleY = isHellModeDialogue ? 0.7 : 1.0; tween(mouth, { scaleX: scaleX, scaleY: scaleY }, { duration: 800 }); dialogueText.setText(""); } else { // Hide car crash image if visible if (carCrashImage.visible) { tween(carCrashImage, { alpha: 0 }, { duration: 300, onFinish: function onFinish() { carCrashImage.visible = false; } }); } // Normal dialogue dialogueText.setText(dialogue); } currentDialogue++; // Calculate delay - longer for showing images or evil smile var delay = 3500; // Increased from 2000 to make dialogue slower if (dialogue.includes("*")) { delay = 5000; // Increased from 3000 for special scenes } // Schedule next dialogue LK.setTimeout(showNextDialogue, delay); } else { // End of dialogue sequence self.endDialogue(); } } // Start the dialogue sequence showNextDialogue(); }; // End dialogue and transition to title screen self.endDialogue = function () { // Check whether we're in intro dialogue or hell mode dialogue var showTitleScreen = gameState === STATE_INTRO_DIALOGUE; var isHellMode = gameState === STATE_INTRO && window.hellButton && window.hellButton.alpha < 1; tween(self, { alpha: 0 }, { duration: 1500, easing: tween.easeOut, onFinish: function onFinish() { // Only show title screen if we're in the intro state and not coming from hell button if (showTitleScreen) { // Make sure all UI elements are hidden before showing title screen levelText.visible = false; scoreText.visible = false; highScoreText.visible = false; instructionsText.visible = false; // Create title screen var titleScreen = game.addChild(new TitleScreen()); titleScreen.x = 2048 / 2; titleScreen.y = 2732 / 2; gameState = STATE_INTRO; } else if (isHellMode) { // If coming from hell button click, start hell mode if (window.hellButton) { // Restore title screen visibility first var titleScreen = window.hellButton.parent; tween(titleScreen, { alpha: 1 }, { duration: 500, onFinish: function onFinish() { // Start hell mode titleScreen.startGame(true); // Reset hellButton reference window.hellButton = null; } }); } } statusText.setText(""); self.destroy(); } }); }; return self; }); var SimonButton = Container.expand(function (color, sound, id) { var self = Container.call(this); self.id = id; self.isActive = false; self.sound = sound; var buttonGraphics = self.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5 }); var activeButtonAsset = 'simonButton' + color; var activeButtonGraphics = self.attachAsset(activeButtonAsset, { anchorX: 0.5, anchorY: 0.5, alpha: 0 }); self.activate = function () { if (self.isActive) { return; } self.isActive = true; // Apply glitch effects to button activation based on score var activationDuration = 300; var fadeDuration = 300; var glitchScale = 1; // Modify button behavior based on glitch intensity if (glitchIntensity > 0) { // Random duration variations activationDuration = Math.max(100, 300 - glitchIntensity * 20); fadeDuration = Math.max(100, 300 - glitchIntensity * 15); // Random scale effects if (glitchIntensity > 3 && Math.random() < 0.3) { glitchScale = 1 + Math.random() * 0.3 * glitchIntensity; // Apply temporary scale effect buttonGraphics.scale.set(glitchScale); LK.setTimeout(function () { buttonGraphics.scale.set(1); }, activationDuration); } } tween(activeButtonGraphics, { alpha: 1 }, { duration: activationDuration, onFinish: function onFinish() { LK.getSound(self.sound).play(); tween(activeButtonGraphics, { alpha: 0 }, { duration: fadeDuration, onFinish: function onFinish() { self.isActive = false; } }); } }); }; self.down = function (x, y, obj) { if (gameState === STATE_PLAYER_TURN && !self.isActive && !waitingForInput) { self.activate(); playerSequence.push(self.id); checkPlayerInput(); } }; return self; }); var SinisterEntity = Container.expand(function () { var self = Container.call(this); // Face base var face = self.attachAsset('entityFace', { anchorX: 0.5, anchorY: 0.5 }); // Left eye var leftEye = self.attachAsset('entityEye', { anchorX: 0.5, anchorY: 0.5, x: -75, y: -50 }); // Right eye var rightEye = self.attachAsset('entityEye', { anchorX: 0.5, anchorY: 0.5, x: 75, y: -50 }); // Mouth var mouth = self.attachAsset('entityMouth', { anchorX: 0.5, anchorY: 0.5, y: 80 }); self.alpha = 0; self.appear = function (intensity) { self.alpha = 0; // Scale intensity from 0-10 to meaningful values var duration = Math.max(1000 - intensity * 80, 200); var scaleFactor = 1 + intensity * 0.1; tween(self, { alpha: 1 }, { duration: duration, easing: tween.easeIn, onFinish: function onFinish() { // Make eyes look at player tween(leftEye, { scaleX: 1.5, scaleY: 1.5 }, { duration: 300, easing: tween.easeOut }); tween(rightEye, { scaleX: 1.5, scaleY: 1.5 }, { duration: 300, easing: tween.easeOut }); // Make mouth grow wider tween(mouth, { scaleX: 1.8, scaleY: 0.8 }, { duration: 500, easing: tween.easeOut, onFinish: function onFinish() { if (intensity > 5) { LK.getSound('creepyLaugh').play(); } LK.setTimeout(function () { self.disappear(); }, 1000); } }); } }); }; self.disappear = function () { tween(leftEye, { scaleX: 1, scaleY: 1 }, { duration: 300 }); tween(rightEye, { scaleX: 1, scaleY: 1 }, { duration: 300 }); tween(mouth, { scaleX: 1, scaleY: 1 }, { duration: 300 }); tween(self, { alpha: 0 }, { duration: 500, easing: tween.easeOut }); }; self.jumpscare = function () { self.alpha = 0; self.scale.set(0.1); tween(self, { alpha: 1, scaleX: 3, scaleY: 3 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { LK.setTimeout(function () { tween(self, { alpha: 0 }, { duration: 400, easing: tween.easeIn }); }, 200); } }); }; return self; }); var TitleScreen = Container.expand(function () { var self = Container.call(this); // Title text var titleText = new Text2('Shadow Simon', { size: 150, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); titleText.anchor.set(0.5, 0.5); titleText.y = -400; self.addChild(titleText); // Subtitle text var subtitleText = new Text2('A game of memory and fear', { size: 70, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); subtitleText.anchor.set(0.5, 0.5); subtitleText.y = -280; self.addChild(subtitleText); // Start button var startButton = new Container(); var startButtonBg = startButton.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 3, scaleY: 1, alpha: 0.7 }); var startText = new Text2('START GAME', { size: 80, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); startText.anchor.set(0.5, 0.5); startButton.addChild(startText); startButton.y = 100; self.addChild(startButton); // Hell mode button var hellButton = new Container(); var hellBg = hellButton.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 3, scaleY: 1, alpha: 0.7, tint: 0xff0000 // Red tint for hell mode }); var hellText = new Text2('HELL MODE', { size: 80, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); hellText.anchor.set(0.5, 0.5); hellButton.addChild(hellText); hellButton.y = 500; self.addChild(hellButton); // Add touch handler for start button startButton.down = function (x, y, obj) { self.startGame(false); }; // Add touch handler for hell mode button hellButton.down = function (x, y, obj) { // Create shadow figure for hell mode warning var hellFigure = game.addChild(new ShadowFigure()); hellFigure.x = 2048 / 2; hellFigure.y = 2732 / 2; // Fade out title screen temporarily tween(self, { alpha: 0.2 }, { duration: 1000 }); // Store reference to hell button for the dialogue system window.hellButton = hellButton; // Prevent double-clicking hellButton.alpha = 0.5; // Trigger hell mode dialogue LK.setTimeout(function () { hellFigure.startDialogue(); // After dialogue, the shadow figure will automatically start hell mode gameState = STATE_INTRO; }, 500); }; // Method to start the game self.startGame = function (hellMode) { tween(self, { alpha: 0 }, { duration: 1000, easing: tween.easeOut, onFinish: function onFinish() { startGame(hellMode); self.destroy(); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Constants var STATE_INTRO_DIALOGUE = 0; var STATE_INTRO = 1; var STATE_SIMON_TURN = 2; var STATE_PLAYER_TURN = 3; var STATE_GAME_OVER = 4; var COLOR_RED = 'Red'; var COLOR_GREEN = 'Green'; var COLOR_BLUE = 'Blue'; var COLOR_YELLOW = 'Yellow'; // Game variables var gameState = STATE_INTRO_DIALOGUE; var level = 1; var sequence = []; var playerSequence = []; var sequenceIndex = 0; var waitingForInput = false; var horrorIntensity = 0; var glitchIntensity = 0; // Track glitch effects based on score var highScore = storage.highScore || 0; // Overlay for horror effects var overlay = game.addChild(LK.getAsset('backgroundOverlay', { anchorX: 0, anchorY: 0, alpha: 0 })); // Create Simon buttons var buttonSize = 400; var spacing = 50; var totalWidth = buttonSize * 2 + spacing; var totalHeight = buttonSize * 2 + spacing; var startX = (2048 - totalWidth) / 2 + buttonSize / 2; var startY = (2732 - totalHeight) / 2 + buttonSize / 2; var buttons = []; var buttonRed = game.addChild(new SimonButton(COLOR_RED, 'buttonSound1', 0)); buttonRed.x = startX; buttonRed.y = startY; buttons.push(buttonRed); var buttonGreen = game.addChild(new SimonButton(COLOR_GREEN, 'buttonSound2', 1)); buttonGreen.x = startX + buttonSize + spacing; buttonGreen.y = startY; buttons.push(buttonGreen); var buttonBlue = game.addChild(new SimonButton(COLOR_BLUE, 'buttonSound3', 2)); buttonBlue.x = startX; buttonBlue.y = startY + buttonSize + spacing; buttons.push(buttonBlue); var buttonYellow = game.addChild(new SimonButton(COLOR_YELLOW, 'buttonSound4', 3)); buttonYellow.x = startX + buttonSize + spacing; buttonYellow.y = startY + buttonSize + spacing; buttons.push(buttonYellow); // Create the sinister entity var entity = game.addChild(new SinisterEntity()); entity.x = 2048 / 2; entity.y = 2732 / 2; // Level text var levelText = new Text2('Level: 1', { size: 80, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); levelText.anchor.set(0.5, 0); LK.gui.top.addChild(levelText); levelText.y = 100; // Score text var scoreText = new Text2('Score: 0', { size: 80, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); scoreText.anchor.set(0.5, 0); LK.gui.top.addChild(scoreText); scoreText.y = 200; // High score text var highScoreText = new Text2('High Score: ' + highScore, { size: 80, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); highScoreText.anchor.set(0.5, 0); LK.gui.top.addChild(highScoreText); highScoreText.y = 300; // Instructions text var instructionsText = new Text2('Watch the pattern, then repeat it', { size: 60, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); instructionsText.anchor.set(0.5, 0); LK.gui.bottom.addChild(instructionsText); instructionsText.y = -150; // Status text var statusText = new Text2('Get ready...', { size: 85, fill: 0xFF0000, font: "'Creepster', 'Chiller', 'Times New Roman'" }); statusText.anchor.set(0.5, 0); LK.gui.center.addChild(statusText); statusText.y = -400; // Game functions function startGame(hellMode) { LK.playMusic('horrorAmbience', { fade: { start: 0, end: 0.4, duration: 1000 } }); gameState = STATE_SIMON_TURN; level = 1; sequence = []; horrorIntensity = 0; // Initialize glitch intensity based on mode glitchIntensity = hellMode ? 15 : 0; // Apply hell mode visual effects if enabled if (hellMode) { // Add dark overlay tween(overlay, { alpha: 0.3 // Persistent dark overlay }, { duration: 500 }); // Turn text bloody red var textElements = [levelText, scoreText, highScoreText, instructionsText, statusText]; textElements.forEach(function (text) { tween(text, { tint: 0xff0000 }, { duration: 500 }); }); } // Show UI elements levelText.visible = true; scoreText.visible = true; highScoreText.visible = true; instructionsText.visible = true; // Show game elements buttons.forEach(function (button) { button.visible = true; }); entity.visible = true; updateLevel(); LK.setScore(0); updateScore(); generateSequence(); // Add more steps to sequence for hell mode if (hellMode) { for (var i = 0; i < 3; i++) { sequence.push(Math.floor(Math.random() * 4)); } statusText.setText("WELCOME TO HELL MODE"); } // Start the first round LK.setTimeout(function () { playSequence(); }, 1500); } function updateLevel() { levelText.setText('Level: ' + level); } function updateScore() { scoreText.setText('Score: ' + LK.getScore()); if (LK.getScore() > highScore) { highScore = LK.getScore(); storage.highScore = highScore; highScoreText.setText('High Score: ' + highScore); } // Update glitch intensity based on current score glitchIntensity = Math.min(LK.getScore() / 10, 10); } function generateSequence() { // Add a new step to the sequence sequence.push(Math.floor(Math.random() * 4)); playerSequence = []; sequenceIndex = 0; } function playSequence() { statusText.setText("Watch carefully..."); // Flash the entity briefly before showing the sequence // Intensity increases with level horrorIntensity = Math.min(level - 1, 10); entity.appear(horrorIntensity); // Start showing sequence after entity appears sequenceIndex = 0; waitingForInput = true; LK.setTimeout(function () { playNextInSequence(); }, 2000); } function playNextInSequence() { if (sequenceIndex < sequence.length) { buttons[sequence[sequenceIndex]].activate(); // Sequence timing gets faster as level increases var delay = Math.max(1000 - level * 50, 400); // Apply glitch effects to sequence timing if (glitchIntensity > 2) { // Add random timing variations var randomOffset = (Math.random() - 0.5) * 200 * (glitchIntensity / 10); delay = Math.max(200, delay + randomOffset); // Much more chaotic in hell mode if (glitchIntensity >= 15) { // Extremely unpredictable timing in hell mode delay = Math.max(150, delay * (0.5 + Math.random() * 0.8)); // Random button flashes during sequence if (Math.random() < 0.25) { // Flash multiple wrong buttons to confuse player var distractionCount = Math.floor(Math.random() * 2) + 1; for (var i = 0; i < distractionCount; i++) { var wrongButtonIndex = Math.floor(Math.random() * 4); var distractionDelay = Math.random() * delay * 0.8; LK.setTimeout(function (wrongIdx) { return function () { buttons[wrongIdx].activate(); }; }(wrongButtonIndex), distractionDelay); } } // Occasionally briefly rotate the game container if (Math.random() < 0.15) { var originalRotation = game.rotation; var glitchRotation = (Math.random() - 0.5) * 0.1; tween(game, { rotation: glitchRotation }, { duration: 100, onFinish: function onFinish() { tween(game, { rotation: originalRotation }, { duration: 100 }); } }); } } // Occasionally show wrong button at higher glitch levels else if (glitchIntensity > 6 && Math.random() < 0.15 && sequenceIndex > 0) { // Activate a random wrong button very briefly var wrongButtonIndex; do { wrongButtonIndex = Math.floor(Math.random() * 4); } while (wrongButtonIndex === sequence[sequenceIndex]); // Show wrong button briefly LK.setTimeout(function () { buttons[wrongButtonIndex].activate(); }, delay / 3); } } LK.setTimeout(function () { sequenceIndex++; playNextInSequence(); }, delay); } else { // Done showing sequence, player's turn LK.setTimeout(function () { waitingForInput = false; gameState = STATE_PLAYER_TURN; statusText.setText("Your turn!"); playerSequence = []; sequenceIndex = 0; }, 500); } } function checkPlayerInput() { var currentIndex = playerSequence.length - 1; if (playerSequence[currentIndex] !== sequence[currentIndex]) { // Wrong input gameOver(); return; } // If the player has completed the current sequence if (playerSequence.length === sequence.length) { // Level completed waitingForInput = true; LK.setScore(LK.getScore() + sequence.length); updateScore(); level++; updateLevel(); // Check if player has reached score 35 if (LK.getScore() >= 35) { var applyButtonGlitch = function applyButtonGlitch(button) { var originalX = button.x; var originalY = button.y; tween(button, { x: originalX + (Math.random() - 0.5) * 30, y: originalY + (Math.random() - 0.5) * 20, alpha: 0.7 + Math.random() * 0.3 }, { duration: 100, onFinish: function onFinish() { tween(button, { x: originalX, y: originalY, alpha: 1 }, { duration: 100 }); } }); }; // Apply periodic glitches // Create continue option container var continueOption = new Container(); continueOption.x = 2048 / 2; continueOption.y = 2732 / 2; // Create background var optionBg = continueOption.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 5, scaleY: 4, alpha: 0.8 }); // Hide all text elements levelText.visible = false; scoreText.visible = false; highScoreText.visible = false; instructionsText.visible = false; // Apply glitch effects to the background tween(optionBg, { alpha: 0.6, scaleX: 5.2, scaleY: 4.2 }, { duration: 300, yoyo: true, repeat: 3 }); // Create escape button var escapeButton = new Container(); var escapeBg = escapeButton.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.5, scaleY: 0.8, alpha: 0.7 }); var escapeText = new Text2("ESCAPE", { size: 70, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); escapeText.anchor.set(0.5, 0.5); escapeButton.addChild(escapeText); escapeButton.y = -50; // Adjusted position continueOption.addChild(escapeButton); // Create continue button var continueButton = new Container(); var continueBg = continueButton.attachAsset('simonButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.5, scaleY: 0.8, alpha: 0.7 }); var continueText = new Text2("CONTINUE", { size: 70, fill: 0xFFFFFF, font: "'Creepster', 'Chiller', 'Times New Roman'" }); continueText.anchor.set(0.5, 0.5); continueButton.addChild(continueText); continueButton.y = 80; // Adjusted position continueOption.addChild(continueButton); // Apply glitch effects to buttons var glitchInterval = LK.setInterval(function () { applyButtonGlitch(escapeButton); applyButtonGlitch(continueButton); }, 1000); // Add event handlers escapeButton.down = function () { LK.clearInterval(glitchInterval); continueOption.destroy(); statusText.setText("You have escaped..."); LK.setTimeout(function () { LK.showYouWin(); }, 1500); }; continueButton.down = function () { LK.clearInterval(glitchInterval); continueOption.destroy(); // Make text elements visible again levelText.visible = true; scoreText.visible = true; highScoreText.visible = true; instructionsText.visible = true; statusText.setText("The nightmare continues..."); LK.setTimeout(function () { gameState = STATE_SIMON_TURN; generateSequence(); playSequence(); }, 1500); }; // Add to game game.addChild(continueOption); // Disable game state to prevent interactions with Simon buttons waitingForInput = true; gameState = STATE_SIMON_TURN; return; } gameState = STATE_SIMON_TURN; // Horror effect between levels tween(overlay, { alpha: 0.7 }, { duration: 500, onFinish: function onFinish() { LK.getSound('levelUpSound').play(); LK.setTimeout(function () { tween(overlay, { alpha: 0 }, { duration: 500 }); }, 500); } }); statusText.setText("Level " + level + "!"); // Start next level after a delay LK.setTimeout(function () { generateSequence(); playSequence(); }, 2000); } } function gameOver() { gameState = STATE_GAME_OVER; // Jumpscare effect entity.jumpscare(); LK.getSound('errorSound').play(); // Flash screen red LK.effects.flashScreen(0xff0000, 800); statusText.setText("Game Over!"); LK.setTimeout(function () { LK.showGameOver(); }, 1500); } // Create shadow figure for intro var shadowFigure = game.addChild(new ShadowFigure()); shadowFigure.x = 2048 / 2; shadowFigure.y = 2732 / 2; // Hide game elements initially buttons.forEach(function (button) { button.visible = false; }); entity.visible = false; // Start intro dialogue when loaded LK.setTimeout(function () { shadowFigure.startDialogue(); }, 1000); // Game update function game.update = function () { // Apply glitch effects based on score if (gameState !== STATE_GAME_OVER && glitchIntensity > 0) { // Apply UI glitches when score increases if (LK.ticks % 60 === 0 && Math.random() < 0.1 * glitchIntensity) { // Random text color changes var randomColor = Math.floor(Math.random() * 0xFFFFFF); var targetText = Math.random() < 0.5 ? levelText : scoreText; tween(targetText, { tint: randomColor }, { duration: 300, onFinish: function onFinish() { tween(targetText, { tint: 0xFF0000 }, { duration: 200 }); } }); } // Random button position jitter at higher scores if (glitchIntensity > 3 && Math.random() < 0.02 * glitchIntensity) { var randomButton = buttons[Math.floor(Math.random() * buttons.length)]; var originalX = randomButton.x; var originalY = randomButton.y; var offsetX = (Math.random() - 0.5) * 20 * glitchIntensity; var offsetY = (Math.random() - 0.5) * 20 * glitchIntensity; tween(randomButton, { x: originalX + offsetX, y: originalY + offsetY }, { duration: 100, onFinish: function onFinish() { tween(randomButton, { x: originalX, y: originalY }, { duration: 100 }); } }); } // Screen distortion at higher scores if (glitchIntensity > 5 && Math.random() < 0.01 * glitchIntensity) { // Glitch overlay effect tween(overlay, { alpha: 0.2 + 0.05 * glitchIntensity }, { duration: 50, onFinish: function onFinish() { tween(overlay, { alpha: glitchIntensity >= 15 ? 0.3 : 0 }, { duration: 100 }); } }); } // Extreme glitches at very high scores if (glitchIntensity > 7 && Math.random() < 0.005 * glitchIntensity) { // Temporarily rotate the entire game container var originalRotation = game.rotation; var glitchRotation = (Math.random() - 0.5) * 0.05 * glitchIntensity; tween(game, { rotation: glitchRotation }, { duration: 100, onFinish: function onFinish() { tween(game, { rotation: originalRotation }, { duration: 150 }); } }); } // Hell mode specific glitches (glitchIntensity >= 15) if (glitchIntensity >= 15) { // Entity flickers more often in hell mode if (Math.random() < 0.02 && entity.alpha < 0.1) { entity.alpha = 0.4; LK.setTimeout(function () { entity.alpha = 0; }, 50); } // Occasionally make buttons flicker with wrong colors if (Math.random() < 0.01) { var randomButtonIndex = Math.floor(Math.random() * buttons.length); var wrongButtonAsset; do { var wrongColor = [COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_YELLOW][Math.floor(Math.random() * 4)]; wrongButtonAsset = 'simonButton' + wrongColor; } while (buttons[randomButtonIndex].id === wrongColor); // Briefly show wrong color on button var originalAlpha = buttons[randomButtonIndex].alpha; buttons[randomButtonIndex].alpha = 0.7; LK.setTimeout(function () { buttons[randomButtonIndex].alpha = originalAlpha; }, 50 + Math.random() * 100); } // Occasionally distort status text in hell mode if (LK.ticks % 120 === 0 && Math.random() < 0.3) { var originalSize = statusText.style.size; var originalY = statusText.y; // Distort text statusText.style.size = originalSize * (0.8 + Math.random() * 0.4); statusText.y = originalY + (Math.random() - 0.5) * 50; // Reset after brief period LK.setTimeout(function () { statusText.style.size = originalSize; statusText.y = originalY; }, 200); } // Random screen shake in hell mode if (Math.random() < 0.005) { var shakeIntensity = 5 + Math.random() * 10; var originalX = game.x; var originalY = game.y; var shakeInterval = LK.setInterval(function () { game.x = originalX + (Math.random() - 0.5) * shakeIntensity; game.y = originalY + (Math.random() - 0.5) * shakeIntensity; }, 50); LK.setTimeout(function () { LK.clearInterval(shakeInterval); game.x = originalX; game.y = originalY; }, 300); } } } // Add subtle horror effects as the game progresses if (gameState !== STATE_GAME_OVER && level > 3) { // Random subtle screen flicker if (Math.random() < 0.005 * horrorIntensity) { tween(overlay, { alpha: 0.2 }, { duration: 100, onFinish: function onFinish() { tween(overlay, { alpha: 0 }, { duration: 100 }); } }); } // Random entity flicker at higher levels if (level > 5 && Math.random() < 0.002 * horrorIntensity && entity.alpha < 0.1) { tween(entity, { alpha: 0.3 }, { duration: 50, onFinish: function onFinish() { tween(entity, { alpha: 0 }, { duration: 50 }); } }); } } }; // Event handlers game.down = function (x, y, obj) { // No need for intro handling, title screen has its own button };
===================================================================
--- original.js
+++ change.js
@@ -138,9 +138,9 @@
var hellModeDialogues = ["Why would you do this to yourself?", "This isn't worth it...", "I didn't think you'd actually choose this path.", "I do want to see you suffer, though...", "Your mind will fracture in ways you cannot imagine.", "The patterns will blur, distort, and deceive you.", "Reality itself will bend against you.", "Time will stretch and contract at my whim.", "I've driven others to madness this way before.", "They clawed at their eyes trying to unsee what I showed them.", "They still scream in the void between thoughts...", "Can you feel them reaching for you even now?", "Their torment will become yours.", "Your soul will shatter into a thousand fragments.", "I will cherish collecting each broken piece...", "Your suffering will nourish me for centuries.", "Your determination is... admirable, but futile.", "No one escapes the nightmare at this depth.", "Still, I'm eager to watch you try...", "Let your sanity slip away, piece by piece...", "G O O D L U C K . . .", "*shows horrific wide grin as face distorts unnaturally*"];
var currentDialogue = 0;
var isHellModeDialogue = false;
// Check if this is triggered from hell mode button
- if (gameState === STATE_INTRO && hellButton && hellButton.alpha < 1) {
+ if (gameState === STATE_INTRO && window.hellButton && window.hellButton.alpha < 1) {
dialogues = hellModeDialogues;
isHellModeDialogue = true;
tween(mouth, {
scaleX: 3.0,
creepy realistic eye. In-Game asset. 2d. High contrast. No shadows
realistic face with no eyes or mouth. In-Game asset. 2d. High contrast. No shadows
realistic mouth. In-Game asset. 2d. High contrast. No shadows
blurry realistic image of a car crash with backround. In-Game asset. 2d. High contrast. No shadows
number 0. In-Game asset. 2d. High contrast. No shadows
the number 1. In-Game asset. 2d. High contrast. No shadows