User prompt
Add a background of falling peanuts that never stop falling ever
User prompt
remove the redscreeen
User prompt
replace the current asset with Peanut1
User prompt
remove any shops
User prompt
make the peanut a little bigger
User prompt
Replace the peanut asset with Peanut1
User prompt
Add a shop Where u can spend your points on point multipliers
User prompt
add a point multiplier that you can buy with enough points from clicking the peanut
User prompt
remove the point multiplier
User prompt
add a point multiplier at the right middle part of the screen
User prompt
remove the death screen
User prompt
make it so the peanut doesent dissapear when you click it
User prompt
replace the brown boxes with a peanut fixed to the center of the screen
Initial prompt
Peanut clicker
/**** * Classes ****/ //<Assets used in the game will automatically appear here> // Peanut class to represent each peanut on the screen var Peanut = Container.expand(function () { var self = Container.call(this); var peanutGraphics = self.attachAsset('peanut', { anchorX: 0.5, anchorY: 0.5 }); // Event handler for when a peanut is tapped self.down = function (x, y, obj) { // Increase score LK.setScore(LK.getScore() + 1); scoreTxt.setText(LK.getScore()); // Destroy the peanut self.destroy(); }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize score display var scoreTxt = new Text2('0', { size: 150, fill: "#ffffff" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Array to keep track of peanuts var peanuts = []; // Function to spawn a new peanut function spawnPeanut() { var newPeanut = new Peanut(); newPeanut.x = Math.random() * 2048; newPeanut.y = Math.random() * 2732; peanuts.push(newPeanut); game.addChild(newPeanut); } // Set interval to spawn peanuts every second var peanutSpawnInterval = LK.setInterval(spawnPeanut, 1000); // Update function called every tick game.update = function () { // Check for game over condition if (peanuts.length > 50) { LK.effects.flashScreen(0xff0000, 1000); LK.showGameOver(); } }; // Start the game by spawning the first peanut spawnPeanut();
/****
* Classes
****/
//<Assets used in the game will automatically appear here>
// Peanut class to represent each peanut on the screen
var Peanut = Container.expand(function () {
var self = Container.call(this);
var peanutGraphics = self.attachAsset('peanut', {
anchorX: 0.5,
anchorY: 0.5
});
// Event handler for when a peanut is tapped
self.down = function (x, y, obj) {
// Increase score
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore());
// Destroy the peanut
self.destroy();
};
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000 //Init game with black background
});
/****
* Game Code
****/
// Initialize score display
var scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Array to keep track of peanuts
var peanuts = [];
// Function to spawn a new peanut
function spawnPeanut() {
var newPeanut = new Peanut();
newPeanut.x = Math.random() * 2048;
newPeanut.y = Math.random() * 2732;
peanuts.push(newPeanut);
game.addChild(newPeanut);
}
// Set interval to spawn peanuts every second
var peanutSpawnInterval = LK.setInterval(spawnPeanut, 1000);
// Update function called every tick
game.update = function () {
// Check for game over condition
if (peanuts.length > 50) {
LK.effects.flashScreen(0xff0000, 1000);
LK.showGameOver();
}
};
// Start the game by spawning the first peanut
spawnPeanut();