User prompt
Make it so he doesn’t immediately know where you are and he moves straight for four seconds if you’re at the edge of the map and move up when he’s behind you ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
it will take him four seconds to realize you’re not there, and he will move straight for four seconds until he hits the edge of the map which knocks him out. Add stars above his head to make you sure that he’s knockout ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
no, like what I meant was make it so if you’re at the very edge of the map and the monster is right behind you, you can move up and he will still move straight where you are thinking you are still there but he will hit his head on the edge of the map and get knocked out for two seconds
User prompt
Make it so if the monster is close to you and you’re on the edge of the map and he is right behind you, you can move down to kind of trick him and make him bonkers head, but he is knocked out for two seconds and then he sees you again
User prompt
Write code for that
User prompt
make it so if the monster collide with the Ed button in the normal game, then he runs around he is trying to find the player, but if the monster dies, then the game will glitch and a secret text appear saying monster is not found
User prompt
it won’t work
User prompt
make it so if you die in the secret map, then the countdown restarts
User prompt
Make it so they’re a little faster so if you stay still, you could die before it reaches 10 seconds
User prompt
make sure the monsters aren’t that fast in the room, but the normally fast one is still in the main map
User prompt
Make it so you still have the arrows in the room to walk around in
User prompt
if the player collide with it, bring the player to a room with text saying you found this very small button. This is not the win, but you will be sent to a room with five monsters that you’ll have to run away from this count down from 10 to 1 and counts from 10 to one
User prompt
Make it even even smaller
User prompt
Make it small smaller
User prompt
Make it smaller
User prompt
Make it so there’s a small grey button at the edge of the map, but still seeable
User prompt
there’s a 00000.1% chance that you won’t load into the game and it will bring you to a black box with text saying you found the room with the lowest percent chance of the player spotting into lucky you
User prompt
make it so it says that has a 10% chance of spawning
User prompt
no it doesn’t show you. You win thing. It brings you into a black room with text with green text saying you won you found the blue box that has a 10% chance of spawning.
User prompt
make it 10
User prompt
make it so it’s a 20% chance
User prompt
There was also a 40% chance of adding a black box to the game and if you touch it, it says you won you found the black box with a 40% chance
User prompt
Make a even smaller chance to load into the game but all of the UI and text is distorted
User prompt
make it so the text stays in one little place, but it’s moving a lot like shaking when the monster is big if you get the chance to have the big monster
User prompt
If that happens, then all of the text is glitchy
/**** * Classes ****/ var ArrowButton = Container.expand(function (direction) { var self = Container.call(this); var buttonGraphics = self.attachAsset('arrowButton', { anchorX: 0.5, anchorY: 0.5 }); self.direction = direction; self.down = function (x, y, obj) { self.isPressed = true; buttonGraphics.alpha = 0.7; }; self.up = function (x, y, obj) { self.isPressed = false; buttonGraphics.alpha = 1.0; }; return self; }); var Monster = Container.expand(function () { var self = Container.call(this); var monsterGraphics = self.attachAsset('monster', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 2; self.lastX = 0; self.lastY = 0; self.lastPlayerIntersecting = false; self.update = function () { // Simple AI: move towards player if (player) { var dx = player.x - self.x; var dy = player.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 0) { // Normalize and apply speed self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } // Check if monster caught player var currentIntersecting = self.intersects(player); if (!self.lastPlayerIntersecting && currentIntersecting) { // Player caught! Play death sound extra loud var deathSound = LK.getSound('deathSound'); deathSound.volume = 10000000; // Set to 1,000,000,000% volume deathSound.play(); // Flash screen red LK.effects.flashScreen(0xff0000, 1000); // Reset game after short delay LK.setTimeout(function () { // Reset positions player.x = 1024; player.y = 1366; self.x = 200; self.y = 200; self.speed = 2; // Reset game timer gameStartTime = Date.now(); LK.setScore(0); }, 1500); } self.lastPlayerIntersecting = currentIntersecting; } }; return self; }); var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xffffff }); /**** * Game Code ****/ // Create game title var titleText = new Text2('MONSTER ESCAPE', { size: 80, fill: 0xFF0000 }); titleText.anchor.set(0.5, 0); titleText.x = 1024; titleText.y = 100; game.addChild(titleText); // Create instructions var instructionsText = new Text2('Survive as long as possible!\nMonster gets faster every minute', { size: 40, fill: 0x333333 }); instructionsText.anchor.set(0.5, 0); instructionsText.x = 1024; instructionsText.y = 200; game.addChild(instructionsText); // Create score display var scoreText = new Text2('Time Survived: 0ms', { size: 50, fill: 0x000000 }); scoreText.anchor.set(0.5, 0); scoreText.x = 1024; scoreText.y = 300; game.addChild(scoreText); ; var player = game.addChild(new Player()); player.x = 1024; // Center horizontally player.y = 1366; // Center vertically // Add trail effect to player var playerTrail = []; var monster = game.addChild(new Monster()); monster.x = 200; monster.y = 200; // Small chance to make the monster really, really big at game start if (Math.random() < 0.03) { // 3% chance monster.scaleX = 8; monster.scaleY = 8; } // Arrow control buttons var upButton = game.addChild(new ArrowButton('up')); upButton.x = 1024; upButton.y = 2500; var downButton = game.addChild(new ArrowButton('down')); downButton.x = 1024; downButton.y = 2620; var leftButton = game.addChild(new ArrowButton('left')); leftButton.x = 904; leftButton.y = 2560; var rightButton = game.addChild(new ArrowButton('right')); rightButton.x = 1144; rightButton.y = 2560; var playerSpeed = 5; var gameStartTime = Date.now(); game.update = function () { // Handle player movement with arrow buttons if (upButton.isPressed) { player.y = Math.max(50, player.y - playerSpeed); } if (downButton.isPressed) { player.y = Math.min(2682, player.y + playerSpeed); } if (leftButton.isPressed) { player.x = Math.max(50, player.x - playerSpeed); } if (rightButton.isPressed) { player.x = Math.min(1998, player.x + playerSpeed); } // Increase monster speed every minute var elapsedTime = Date.now() - gameStartTime; var minutesPassed = Math.floor(elapsedTime / 60000); // 60000ms = 1 minute var newSpeed = 2 + minutesPassed; // Base speed 2, +1 per minute if (monster.speed !== newSpeed) { monster.speed = newSpeed; // Visual feedback when monster gets faster LK.effects.flashObject(monster, 0xff0000, 500); titleText.setText('LEVEL ' + (minutesPassed + 1) + ' - FASTER MONSTER!'); LK.setTimeout(function () { titleText.setText('MONSTER ESCAPE'); }, 2000); // Adjust text scale if monster is huge to prevent glitchy text if (monster.scaleX > 4 || monster.scaleY > 4) { var scaleFix = 1 / Math.max(monster.scaleX, monster.scaleY); titleText.scaleX = scaleFix; titleText.scaleY = scaleFix; instructionsText.scaleX = scaleFix; instructionsText.scaleY = scaleFix; scoreText.scaleX = scaleFix; scoreText.scaleY = scaleFix; // Re-center text after scaling titleText.x = 1024; instructionsText.x = 1024; scoreText.x = 1024; } else { titleText.scaleX = 1; titleText.scaleY = 1; instructionsText.scaleX = 1; instructionsText.scaleY = 1; scoreText.scaleX = 1; scoreText.scaleY = 1; } } // Increase score based on survival time in milliseconds var millisecondsPerTick = 1000 / 60; LK.setScore(Math.floor(LK.getScore() + millisecondsPerTick)); // Update score display var seconds = Math.floor(LK.getScore() / 1000); var minutes = Math.floor(seconds / 60); var displaySeconds = seconds % 60; if (minutes > 0) { scoreText.setText('Time Survived: ' + minutes + 'm ' + displaySeconds + 's'); } else { scoreText.setText('Time Survived: ' + seconds + 's'); } // Add player trail effect if (LK.ticks % 3 === 0) { // Every 3 frames playerTrail.push({ x: player.x, y: player.y, alpha: 0.7 }); } // Remove old trail points and update existing ones for (var i = playerTrail.length - 1; i >= 0; i--) { playerTrail[i].alpha -= 0.05; if (playerTrail[i].alpha <= 0) { playerTrail.splice(i, 1); } } };
/****
* Classes
****/
var ArrowButton = Container.expand(function (direction) {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('arrowButton', {
anchorX: 0.5,
anchorY: 0.5
});
self.direction = direction;
self.down = function (x, y, obj) {
self.isPressed = true;
buttonGraphics.alpha = 0.7;
};
self.up = function (x, y, obj) {
self.isPressed = false;
buttonGraphics.alpha = 1.0;
};
return self;
});
var Monster = Container.expand(function () {
var self = Container.call(this);
var monsterGraphics = self.attachAsset('monster', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 2;
self.lastX = 0;
self.lastY = 0;
self.lastPlayerIntersecting = false;
self.update = function () {
// Simple AI: move towards player
if (player) {
var dx = player.x - self.x;
var dy = player.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
// Normalize and apply speed
self.x += dx / distance * self.speed;
self.y += dy / distance * self.speed;
}
// Check if monster caught player
var currentIntersecting = self.intersects(player);
if (!self.lastPlayerIntersecting && currentIntersecting) {
// Player caught! Play death sound extra loud
var deathSound = LK.getSound('deathSound');
deathSound.volume = 10000000; // Set to 1,000,000,000% volume
deathSound.play();
// Flash screen red
LK.effects.flashScreen(0xff0000, 1000);
// Reset game after short delay
LK.setTimeout(function () {
// Reset positions
player.x = 1024;
player.y = 1366;
self.x = 200;
self.y = 200;
self.speed = 2;
// Reset game timer
gameStartTime = Date.now();
LK.setScore(0);
}, 1500);
}
self.lastPlayerIntersecting = currentIntersecting;
}
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xffffff
});
/****
* Game Code
****/
// Create game title
var titleText = new Text2('MONSTER ESCAPE', {
size: 80,
fill: 0xFF0000
});
titleText.anchor.set(0.5, 0);
titleText.x = 1024;
titleText.y = 100;
game.addChild(titleText);
// Create instructions
var instructionsText = new Text2('Survive as long as possible!\nMonster gets faster every minute', {
size: 40,
fill: 0x333333
});
instructionsText.anchor.set(0.5, 0);
instructionsText.x = 1024;
instructionsText.y = 200;
game.addChild(instructionsText);
// Create score display
var scoreText = new Text2('Time Survived: 0ms', {
size: 50,
fill: 0x000000
});
scoreText.anchor.set(0.5, 0);
scoreText.x = 1024;
scoreText.y = 300;
game.addChild(scoreText);
;
var player = game.addChild(new Player());
player.x = 1024; // Center horizontally
player.y = 1366; // Center vertically
// Add trail effect to player
var playerTrail = [];
var monster = game.addChild(new Monster());
monster.x = 200;
monster.y = 200;
// Small chance to make the monster really, really big at game start
if (Math.random() < 0.03) {
// 3% chance
monster.scaleX = 8;
monster.scaleY = 8;
}
// Arrow control buttons
var upButton = game.addChild(new ArrowButton('up'));
upButton.x = 1024;
upButton.y = 2500;
var downButton = game.addChild(new ArrowButton('down'));
downButton.x = 1024;
downButton.y = 2620;
var leftButton = game.addChild(new ArrowButton('left'));
leftButton.x = 904;
leftButton.y = 2560;
var rightButton = game.addChild(new ArrowButton('right'));
rightButton.x = 1144;
rightButton.y = 2560;
var playerSpeed = 5;
var gameStartTime = Date.now();
game.update = function () {
// Handle player movement with arrow buttons
if (upButton.isPressed) {
player.y = Math.max(50, player.y - playerSpeed);
}
if (downButton.isPressed) {
player.y = Math.min(2682, player.y + playerSpeed);
}
if (leftButton.isPressed) {
player.x = Math.max(50, player.x - playerSpeed);
}
if (rightButton.isPressed) {
player.x = Math.min(1998, player.x + playerSpeed);
}
// Increase monster speed every minute
var elapsedTime = Date.now() - gameStartTime;
var minutesPassed = Math.floor(elapsedTime / 60000); // 60000ms = 1 minute
var newSpeed = 2 + minutesPassed; // Base speed 2, +1 per minute
if (monster.speed !== newSpeed) {
monster.speed = newSpeed;
// Visual feedback when monster gets faster
LK.effects.flashObject(monster, 0xff0000, 500);
titleText.setText('LEVEL ' + (minutesPassed + 1) + ' - FASTER MONSTER!');
LK.setTimeout(function () {
titleText.setText('MONSTER ESCAPE');
}, 2000);
// Adjust text scale if monster is huge to prevent glitchy text
if (monster.scaleX > 4 || monster.scaleY > 4) {
var scaleFix = 1 / Math.max(monster.scaleX, monster.scaleY);
titleText.scaleX = scaleFix;
titleText.scaleY = scaleFix;
instructionsText.scaleX = scaleFix;
instructionsText.scaleY = scaleFix;
scoreText.scaleX = scaleFix;
scoreText.scaleY = scaleFix;
// Re-center text after scaling
titleText.x = 1024;
instructionsText.x = 1024;
scoreText.x = 1024;
} else {
titleText.scaleX = 1;
titleText.scaleY = 1;
instructionsText.scaleX = 1;
instructionsText.scaleY = 1;
scoreText.scaleX = 1;
scoreText.scaleY = 1;
}
}
// Increase score based on survival time in milliseconds
var millisecondsPerTick = 1000 / 60;
LK.setScore(Math.floor(LK.getScore() + millisecondsPerTick));
// Update score display
var seconds = Math.floor(LK.getScore() / 1000);
var minutes = Math.floor(seconds / 60);
var displaySeconds = seconds % 60;
if (minutes > 0) {
scoreText.setText('Time Survived: ' + minutes + 'm ' + displaySeconds + 's');
} else {
scoreText.setText('Time Survived: ' + seconds + 's');
}
// Add player trail effect
if (LK.ticks % 3 === 0) {
// Every 3 frames
playerTrail.push({
x: player.x,
y: player.y,
alpha: 0.7
});
}
// Remove old trail points and update existing ones
for (var i = playerTrail.length - 1; i >= 0; i--) {
playerTrail[i].alpha -= 0.05;
if (playerTrail[i].alpha <= 0) {
playerTrail.splice(i, 1);
}
}
};
Modern App Store icon, high definition, square with rounded corners, for a game titled "Monster Chase" and with the description "Control a character with your finger while an AI monster hunts you down. Survive as long as possible in this intense chase game with intuitive touch controls.". No text on icon!
Fullscreen modern App Store landscape banner, 16:9, high definition, for a game titled "Monster Chase" and with the description "Control a character with your finger while an AI monster hunts you down. Survive as long as possible in this intense chase game with intuitive touch controls.". No text on banner!