User prompt
Make touch cantrol to move left and write
User prompt
Make touch cantrol
User prompt
Make it big game with levels
User prompt
Make it hard tooo
User prompt
Make win screen
User prompt
Make kitten is flying and make touch cantrols
User prompt
Make he is flying plz
User prompt
Make it better
User prompt
Make a kitten
Initial prompt
Kitten force 2 FRVR
/**** * Classes ****/ //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Kitten class representing the player character var Kitten = Container.expand(function () { var self = Container.call(this); var kittenGraphics = self.attachAsset('kitten', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 10; self.dashDistance = 200; self.dashCooldown = 1000; // 1 second cooldown self.lastDashTime = 0; self.update = function () { // Update logic for the kitten }; self.dash = function () { var currentTime = Date.now(); if (currentTime - self.lastDashTime >= self.dashCooldown) { self.x += self.dashDistance; self.lastDashTime = currentTime; } }; }); // Obstacle class representing obstacles in the game var Obstacle = Container.expand(function () { var self = Container.call(this); var obstacleGraphics = self.attachAsset('obstacle', { anchorX: 0.5, anchorY: 0.5 }); self.speed = 5; self.update = function () { self.y += self.speed; if (self.y > 2732) { self.y = -self.height; self.x = Math.random() * 2048; } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB // Light blue background }); /**** * Game Code ****/ // Initialize game elements var kitten = game.addChild(new Kitten()); kitten.x = 2048 / 2; kitten.y = 2732 - 200; var obstacles = []; for (var i = 0; i < 5; i++) { var obstacle = new Obstacle(); obstacle.x = Math.random() * 2048; obstacle.y = Math.random() * 2732; obstacles.push(obstacle); game.addChild(obstacle); } // Handle touch events for dashing game.down = function (x, y, obj) { kitten.dash(); }; // Update game logic game.update = function () { for (var i = 0; i < obstacles.length; i++) { obstacles[i].update(); if (kitten.intersects(obstacles[i])) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } } }; // Score display var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Update score function updateScore() { var score = parseInt(scoreTxt.text) + 1; scoreTxt.setText(score); if (score >= 50) { LK.showYouWin(); } } // Increment score every second LK.setInterval(updateScore, 1000);
/****
* Classes
****/
//<Assets used in the game will automatically appear here>
//<Write imports for supported plugins here>
// Kitten class representing the player character
var Kitten = Container.expand(function () {
var self = Container.call(this);
var kittenGraphics = self.attachAsset('kitten', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 10;
self.dashDistance = 200;
self.dashCooldown = 1000; // 1 second cooldown
self.lastDashTime = 0;
self.update = function () {
// Update logic for the kitten
};
self.dash = function () {
var currentTime = Date.now();
if (currentTime - self.lastDashTime >= self.dashCooldown) {
self.x += self.dashDistance;
self.lastDashTime = currentTime;
}
};
});
// Obstacle class representing obstacles in the game
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 5;
self.update = function () {
self.y += self.speed;
if (self.y > 2732) {
self.y = -self.height;
self.x = Math.random() * 2048;
}
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB // Light blue background
});
/****
* Game Code
****/
// Initialize game elements
var kitten = game.addChild(new Kitten());
kitten.x = 2048 / 2;
kitten.y = 2732 - 200;
var obstacles = [];
for (var i = 0; i < 5; i++) {
var obstacle = new Obstacle();
obstacle.x = Math.random() * 2048;
obstacle.y = Math.random() * 2732;
obstacles.push(obstacle);
game.addChild(obstacle);
}
// Handle touch events for dashing
game.down = function (x, y, obj) {
kitten.dash();
};
// Update game logic
game.update = function () {
for (var i = 0; i < obstacles.length; i++) {
obstacles[i].update();
if (kitten.intersects(obstacles[i])) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
}
};
// Score display
var scoreTxt = new Text2('0', {
size: 150,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Update score
function updateScore() {
var score = parseInt(scoreTxt.text) + 1;
scoreTxt.setText(score);
if (score >= 50) {
LK.showYouWin();
}
}
// Increment score every second
LK.setInterval(updateScore, 1000);