User prompt
Start the game with the shop menu closed
User prompt
Make the upgrade shop button a square
User prompt
Move it to the left
User prompt
Move the shop I can only see to fifty
User prompt
Make a button where I can pull up the upgrade menu and when I press the upgrade menu the upgrades dissapear and if I press the upgrade shop button again the shop options reappear
User prompt
Make it a clicker game where I can buy upgrades for my clicks to equal more and the upgrades stack you can buy x1 x10 x50 x100x1000 make these climb up in price as the list goes make 1 cost a little 10 cost way more (20)
User prompt
Do it
User prompt
Make this game a clicker where you can buy upgrades
User prompt
Make the dog teleport to the middle after the animation
User prompt
If i spam it the dog slowly moves to the left fix this
User prompt
Make the button feel more imerseve
User prompt
Resize the square
User prompt
Make the person one single square
User prompt
Do it
User prompt
Make a person standin and recording
Code edit (1 edits merged)
Please save this source code
User prompt
Bro I Just Farted on My Dog
Initial prompt
A game called bro I just farted on my dog where the player has a fart button and when farted on the dogs face changes and then goes back and you can do this forever
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Dog face class var DogFace = Container.expand(function () { var self = Container.call(this); // Normal face var normalFace = self.attachAsset('dog_normal', { anchorX: 0.5, anchorY: 0.5 }); // React face var reactFace = self.attachAsset('dog_react', { anchorX: 0.5, anchorY: 0.5, alpha: 0 }); // Show normal face self.showNormal = function () { normalFace.alpha = 1; reactFace.alpha = 0; }; // Show react face self.showReact = function () { normalFace.alpha = 0; reactFace.alpha = 1; }; // Flash react face for a short time, then return to normal self.react = function () { self.showReact(); // Store original X to restore after animation var originalX = self.x; // Animate a little shake for fun tween(self, { x: originalX + 30 }, { duration: 80, easing: tween.cubicOut, onFinish: function onFinish() { tween(self, { x: originalX - 30 }, { duration: 120, easing: tween.cubicInOut, onFinish: function onFinish() { tween(self, { x: originalX }, { duration: 80, easing: tween.cubicIn, onFinish: function onFinish() { // Return to normal face after 500ms LK.setTimeout(function () { self.showNormal(); // Teleport dog to center after animation self.x = 2048 / 2; }, 500); } }); } }); } }); }; self.showNormal(); return self; }); // Fart button class var FartButton = Container.expand(function () { var self = Container.call(this); // Button shape var btn = self.attachAsset('fart_btn', { anchorX: 0.5, anchorY: 0.5 }); // "FART" text var fartTxt = new Text2('FART', { size: 120, fill: 0x7A5C00 }); fartTxt.anchor.set(0.5, 0.5); fartTxt.x = 0; fartTxt.y = 0; self.addChild(fartTxt); // Fart cloud effect (hidden by default) var fartCloud = self.attachAsset('centerCircle', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 0.7, x: 0, y: -110, alpha: 0, tint: 0xeeeecc }); fartCloud.width = btn.width * 0.7; fartCloud.height = btn.height * 0.7; // Show fart cloud with animation self.showFartCloud = function () { fartCloud.alpha = 0.85; fartCloud.scaleX = 1.2; fartCloud.scaleY = 0.7; fartCloud.y = -110; tween(fartCloud, { alpha: 0, y: fartCloud.y - 80, scaleX: 1.5, scaleY: 1.1 }, { duration: 420, easing: tween.cubicOut }); }; // Simple press animation self.animatePress = function () { tween(self, { scaleX: 0.92, scaleY: 0.92 }, { duration: 60, easing: tween.cubicIn, onFinish: function onFinish() { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 80, easing: tween.cubicOut }); } }); self.showFartCloud(); }; return self; }); // Person standing and recording class var PersonRecording = Container.expand(function () { var self = Container.call(this); // Single square for the person var personSquare = self.attachAsset('person_leg', { anchorX: 0.5, anchorY: 0.5 }); return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0xE3F6FF }); /**** * Game Code ****/ // Fart sound // Big fart button // Cartoon dog face (shocked/disgusted) // Cartoon dog face (normal) // Center dog face // Person recording assets var dogFace = new DogFace(); dogFace.x = 2048 / 2; dogFace.y = 1100; game.addChild(dogFace); // Add person standing and recording at the left side var person = new PersonRecording(); person.x = 400; person.y = 1200; game.addChild(person); // Place fart button below dog face var fartBtn = new FartButton(); fartBtn.x = 2048 / 2; fartBtn.y = 2000; game.addChild(fartBtn); // Prevent accidental tap in top left (menu area): nothing is placed there // Instructions text (top center, GUI) var instrTxt = new Text2('Tap the FART button!', { size: 90, fill: 0x2D2D2D }); instrTxt.anchor.set(0.5, 0); LK.gui.top.addChild(instrTxt); // Handle button press fartBtn.down = function (x, y, obj) { // Animate button fartBtn.animatePress(); // Button color flash for feedback LK.effects.flashObject(fartBtn, 0xfff7b2, 120); // Play fart sound LK.getSound('fart_snd').play(); // Dog reacts dogFace.react(); }; // Make the button big and easy to tap: handle press anywhere on the button fartBtn.interactive = true; // No win/lose, no score, endless fun // No update loop needed for this game // No music, no pause, no game over // No dynamic resizing or orientation code needed // No keyboard controls, only touch/mouse // All elements are visible and centered // MVP complete!
===================================================================
--- original.js
+++ change.js
@@ -56,8 +56,10 @@
onFinish: function onFinish() {
// Return to normal face after 500ms
LK.setTimeout(function () {
self.showNormal();
+ // Teleport dog to center after animation
+ self.x = 2048 / 2;
}, 500);
}
});
}
@@ -156,14 +158,14 @@
/****
* Game Code
****/
-// Person recording assets
-// Center dog face
-// Cartoon dog face (normal)
-// Cartoon dog face (shocked/disgusted)
-// Big fart button
// Fart sound
+// Big fart button
+// Cartoon dog face (shocked/disgusted)
+// Cartoon dog face (normal)
+// Center dog face
+// Person recording assets
var dogFace = new DogFace();
dogFace.x = 2048 / 2;
dogFace.y = 1100;
game.addChild(dogFace);