User prompt
make the obstacles randomly placed everytime you start the game and restart the game
User prompt
make the stars star shaped
User prompt
add stars to the background
User prompt
change the background to something more gradient and engaging
User prompt
make it so that the game doesnt unpause when clicking the baclground
User prompt
make it so that you have to click the pause button to unpause the game
User prompt
add a setting button that leads to the settings menu on the pause menu
User prompt
add a settings menu to the pause menu
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'Menu')' in or related to this line: 'var settingsMenu = new LK.UI.Menu({' Line Number: 99
User prompt
add a settings menu to the pause button
User prompt
allow the character to follow the mouses position when close to mouse
User prompt
allow the character to follow the mouses position when close
User prompt
allow the character to follow the mouses position when close to boc
User prompt
stop the cube from teleporting to the mouses position
User prompt
make it so that the charcter adavances levels when put at the top
User prompt
make the character stop moving
User prompt
make it so that everytime you go through to the next floor you get put back in the middle of the screen
User prompt
add level progession
User prompt
add a boarder to the side so you cant go out of screen view
User prompt
add the level number to to the top
User prompt
now separate the numbers
User prompt
stamake so that you start at level 1 and progess to level 25
User prompt
separate the numbers into separate level starting with 1 and then remove the number 1 once you get to the second level and repeat for 25 levels
User prompt
seperate the levels into different floors of the game
User prompt
add numbers to each level up to level 25 and make level 1-15 get progressively harder
/**** * Classes ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> //<Write entity 'classes' with empty functions for important behavior here> var Character = Container.expand(function () { var self = Container.call(this); var characterGraphics = self.attachAsset('characterShape', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { self.x += Math.sin(LK.ticks / 60) * 5; self.y += Math.cos(LK.ticks / 60) * 5; }; }); var Level = Container.expand(function (difficulty, levelNumber) { var self = Container.call(this); self.obstacles = []; self.character = new Character(); self.character.x = 2048 / 2; self.character.y = 2732 / 2; self.addChild(self.character); for (var i = 0; i < difficulty; i++) { var obstacle = new Obstacle(); obstacle.x = Math.random() * 2048; obstacle.y = Math.random() * 2732; self.obstacles.push(obstacle); self.addChild(obstacle); } var levelText = new Text2(levelNumber.toString(), { size: 150, fill: 0xFFFFFF }); levelText.anchor.set(0.5, 0); LK.gui.top.addChild(levelText); self.update = function () { for (var i = 0; i < self.obstacles.length; i++) { if (self.character.intersects(self.obstacles[i])) { LK.showGameOver(); break; } } }; }); var Obstacle = Container.expand(function () { var self = Container.call(this); var obstacleGraphics = self.attachAsset('obstacleShape', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { self.y += 2; if (self.y > 2732) { self.y = -100; self.x = Math.random() * 2048; } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ //<Write game logic code here, including initializing arrays and variables> var levels = []; for (var i = 1; i <= 25; i++) { var difficulty = Math.min(i, 15); // Difficulty increases up to level 15 var level = new Level(difficulty, i); levels.push(level); game.addChild(level); } game.update = function () { for (var i = 0; i < levels.length; i++) { levels[i].update(); } }; game.down = function (x, y, obj) { for (var i = 0; i < levels.length; i++) { levels[i].character.x = x; levels[i].character.y = y; } }; game.move = function (x, y, obj) { for (var i = 0; i < levels.length; i++) { levels[i].character.x = x; levels[i].character.y = y; } };
/****
* Classes
****/
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
//<Write entity 'classes' with empty functions for important behavior here>
var Character = Container.expand(function () {
var self = Container.call(this);
var characterGraphics = self.attachAsset('characterShape', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
self.x += Math.sin(LK.ticks / 60) * 5;
self.y += Math.cos(LK.ticks / 60) * 5;
};
});
var Level = Container.expand(function (difficulty, levelNumber) {
var self = Container.call(this);
self.obstacles = [];
self.character = new Character();
self.character.x = 2048 / 2;
self.character.y = 2732 / 2;
self.addChild(self.character);
for (var i = 0; i < difficulty; i++) {
var obstacle = new Obstacle();
obstacle.x = Math.random() * 2048;
obstacle.y = Math.random() * 2732;
self.obstacles.push(obstacle);
self.addChild(obstacle);
}
var levelText = new Text2(levelNumber.toString(), {
size: 150,
fill: 0xFFFFFF
});
levelText.anchor.set(0.5, 0);
LK.gui.top.addChild(levelText);
self.update = function () {
for (var i = 0; i < self.obstacles.length; i++) {
if (self.character.intersects(self.obstacles[i])) {
LK.showGameOver();
break;
}
}
};
});
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.attachAsset('obstacleShape', {
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
self.y += 2;
if (self.y > 2732) {
self.y = -100;
self.x = Math.random() * 2048;
}
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
//<Write game logic code here, including initializing arrays and variables>
var levels = [];
for (var i = 1; i <= 25; i++) {
var difficulty = Math.min(i, 15); // Difficulty increases up to level 15
var level = new Level(difficulty, i);
levels.push(level);
game.addChild(level);
}
game.update = function () {
for (var i = 0; i < levels.length; i++) {
levels[i].update();
}
};
game.down = function (x, y, obj) {
for (var i = 0; i < levels.length; i++) {
levels[i].character.x = x;
levels[i].character.y = y;
}
};
game.move = function (x, y, obj) {
for (var i = 0; i < levels.length; i++) {
levels[i].character.x = x;
levels[i].character.y = y;
}
};