User prompt
when it gets too big too big too big the model is exchanged for Fatmaximus and when it gets too small it is exchanged again for character
User prompt
when the character gets too big it should be exchanged with the Fat3 asset and when it gets too small it should be exchanged with the character asset.
User prompt
when the character is smaller, it will be changed back to the asset character.
User prompt
when the size of the character is large enough to be changed to asset fat2
User prompt
have the asset changed to fat2 when the size exceeds 1.50
User prompt
have the ultraburgerpizzacafecake asset appear from time to time to fill your food capacity to the max and add 8 more points to it.
User prompt
increase your food capacity
User prompt
further increases food capacity
User prompt
that the cake costs 110 coins
User prompt
othat the silence music plays and repeats throughout the game.
User prompt
you lose hearts only when you eat the asset fish
User prompt
Make a life system with three hearts
User prompt
food to appear a little slower
User prompt
to make the food appear faster
User prompt
that there is a maximum amount of food you can eat, and that you can buy upgrades to increase the maximum amount of food.
User prompt
make all buttons bigger
User prompt
that when you sell the food the size of the character returns to its original state.
User prompt
make the sell button bigger
User prompt
there should be a button in the top left corner where you can sell the food you have in your stomach.
User prompt
make the shop interface bigger
Code edit (1 edits merged)
Please save this source code
User prompt
Feast Master
Initial prompt
the game is about a person who eats and has to get fatter, there are food upgrades and stomach upgrades to fit more food.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Character = Container.expand(function () { var self = Container.call(this); self.graphics = self.attachAsset('character', { anchorX: 0.5, anchorY: 0.5 }); self.baseSize = 80; self.growthMultiplier = 1; self.updateSize = function () { var newScale = self.growthMultiplier; self.graphics.scaleX = newScale; self.graphics.scaleY = newScale; }; return self; }); var FoodItem = Container.expand(function (foodType) { var self = Container.call(this); self.foodType = foodType || 'apple'; self.nutritionValue = 1; self.requiredStomachSize = 1; // Set properties based on food type switch (self.foodType) { case 'apple': self.graphics = self.attachAsset('apple', { anchorX: 0.5, anchorY: 0.5 }); self.nutritionValue = 1; self.requiredStomachSize = 1; break; case 'burger': self.graphics = self.attachAsset('burger', { anchorX: 0.5, anchorY: 0.5 }); self.nutritionValue = 3; self.requiredStomachSize = 2; break; case 'pizza': self.graphics = self.attachAsset('pizza', { anchorX: 0.5, anchorY: 0.5 }); self.nutritionValue = 5; self.requiredStomachSize = 3; break; case 'cake': self.graphics = self.attachAsset('cake', { anchorX: 0.5, anchorY: 0.5 }); self.nutritionValue = 8; self.requiredStomachSize = 4; break; } self.lifespan = 300; // 5 seconds at 60fps self.update = function () { self.lifespan--; if (self.lifespan <= 60) { self.alpha = self.lifespan / 60; } }; self.down = function (x, y, obj) { if (stomachFood + self.nutritionValue <= maxFoodCapacity) { eatFood(self); } }; return self; }); var UpgradeButton = Container.expand(function (upgradeType, cost, description) { var self = Container.call(this); self.upgradeType = upgradeType; self.cost = cost; self.background = self.attachAsset('upgradeButton', { anchorX: 0, anchorY: 0 }); self.titleText = new Text2(description, { size: 42, fill: 0xFFFFFF }); self.titleText.anchor.set(0, 0); self.titleText.x = 10; self.titleText.y = 10; self.addChild(self.titleText); self.costText = new Text2('Cost: ' + cost, { size: 36, fill: 0xFFFFFF }); self.costText.anchor.set(0, 0); self.costText.x = 10; self.costText.y = 65; self.addChild(self.costText); self.updateCost = function (newCost) { self.cost = newCost; self.costText.setText('Cost: ' + newCost); }; self.down = function (x, y, obj) { if (currency >= self.cost) { purchaseUpgrade(self.upgradeType, self.cost); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ // Game variables var currency = storage.currency || 0; var totalEaten = storage.totalEaten || 0; var stomachLevel = storage.stomachLevel || 1; var stomachFood = storage.stomachFood || 0; // Track food in stomach var maxFoodCapacity = storage.maxFoodCapacity || 5; // Maximum food that can be eaten var foodSpawnRate = 120; // frames between spawns var spawnTimer = 0; var foods = []; var showingUpgrades = false; // Food costs and levels var foodUpgradeCosts = { burger: storage.burgerUnlocked || false, pizza: storage.pizzaUnlocked || false, cake: storage.cakeUnlocked || false }; var stomachUpgradeCost = storage.stomachUpgradeCost || 10; // Create character var playerCharacter = game.addChild(new Character()); playerCharacter.x = 1024; playerCharacter.y = 1366; playerCharacter.growthMultiplier = 1 + totalEaten * 0.02; playerCharacter.updateSize(); // UI Elements var currencyText = new Text2('Coins: ' + currency, { size: 40, fill: 0xFFFFFF }); currencyText.anchor.set(0, 0); LK.gui.top.addChild(currencyText); currencyText.x = 120; currencyText.y = 20; var sizeText = new Text2('Size: x' + playerCharacter.growthMultiplier.toFixed(2), { size: 32, fill: 0xFFFFFF }); sizeText.anchor.set(0, 0); LK.gui.top.addChild(sizeText); sizeText.x = 120; sizeText.y = 70; var stomachText = new Text2('Stomach: ' + stomachLevel, { size: 32, fill: 0xFFFFFF }); stomachText.anchor.set(0, 0); stomachText.x = 120; stomachText.y = 110; LK.gui.top.addChild(stomachText); // Sell food button in top left var sellButton = new Text2('SELL', { size: 48, fill: 0xFF6B35 }); sellButton.anchor.set(0, 0); sellButton.x = 120; sellButton.y = 150; LK.gui.topLeft.addChild(sellButton); // Upgrade shop button var shopButton = new Text2('SHOP', { size: 56, fill: 0xFFD700 }); shopButton.anchor.set(1, 0); LK.gui.topRight.addChild(shopButton); shopButton.x = -20; shopButton.y = 20; // Upgrade panels var upgradePanel = new Container(); upgradePanel.visible = false; LK.gui.center.addChild(upgradePanel); var panelBackground = LK.getAsset('upgradeButton', { scaleX: 8, scaleY: 10, anchorX: 0.5, anchorY: 0.5 }); panelBackground.tint = 0x333333; upgradePanel.addChild(panelBackground); var closeButton = new Text2('X', { size: 68, fill: 0xFF0000 }); closeButton.anchor.set(0.5, 0.5); closeButton.x = 600; closeButton.y = -350; upgradePanel.addChild(closeButton); // Create upgrade buttons var stomachUpgradeBtn = upgradePanel.addChild(new UpgradeButton('stomach', stomachUpgradeCost, 'Upgrade Stomach')); stomachUpgradeBtn.x = -200; stomachUpgradeBtn.y = -250; var burgerUpgradeBtn = upgradePanel.addChild(new UpgradeButton('burger', 15, 'Unlock Burgers')); burgerUpgradeBtn.x = -200; burgerUpgradeBtn.y = -120; var pizzaUpgradeBtn = upgradePanel.addChild(new UpgradeButton('pizza', 50, 'Unlock Pizza')); pizzaUpgradeBtn.x = -200; pizzaUpgradeBtn.y = 10; var cakeUpgradeBtn = upgradePanel.addChild(new UpgradeButton('cake', 150, 'Unlock Cake')); cakeUpgradeBtn.x = -200; cakeUpgradeBtn.y = 140; var maxFoodUpgradeBtn = upgradePanel.addChild(new UpgradeButton('maxFood', 25, 'Increase Max Food')); maxFoodUpgradeBtn.x = -200; maxFoodUpgradeBtn.y = 270; // Shop button functionality shopButton.down = function (x, y, obj) { showingUpgrades = !showingUpgrades; upgradePanel.visible = showingUpgrades; updateUpgradeButtons(); }; closeButton.down = function (x, y, obj) { showingUpgrades = false; upgradePanel.visible = false; }; // Sell button functionality sellButton.down = function (x, y, obj) { if (stomachFood > 0) { currency += stomachFood; stomachFood = 0; // Reset character size to original state totalEaten = 0; playerCharacter.growthMultiplier = 1; playerCharacter.updateSize(); LK.getSound('purchase').play(); updateUI(); saveGame(); } }; // Functions function spawnFood() { var availableFoods = ['apple']; if (foodUpgradeCosts.burger) availableFoods.push('burger'); if (foodUpgradeCosts.pizza) availableFoods.push('pizza'); if (foodUpgradeCosts.cake) availableFoods.push('cake'); var randomType = availableFoods[Math.floor(Math.random() * availableFoods.length)]; var food = game.addChild(new FoodItem(randomType)); food.x = Math.random() * (2048 - 100) + 50; food.y = Math.random() * (2732 - 400) + 200; foods.push(food); } function eatFood(food) { stomachFood += food.nutritionValue; totalEaten += food.nutritionValue; // Update character size playerCharacter.growthMultiplier = 1 + totalEaten * 0.02; playerCharacter.updateSize(); // Flash effect LK.effects.flashObject(food, 0xFFFFFF, 200); // Remove food var index = foods.indexOf(food); if (index > -1) { foods.splice(index, 1); } food.destroy(); // Play sound LK.getSound('eat').play(); // Update UI updateUI(); // Save progress saveGame(); } function purchaseUpgrade(type, cost) { if (currency >= cost) { currency -= cost; LK.getSound('purchase').play(); switch (type) { case 'stomach': stomachLevel++; stomachUpgradeCost = Math.floor(stomachUpgradeCost * 1.5); stomachUpgradeBtn.updateCost(stomachUpgradeCost); break; case 'maxFood': maxFoodCapacity += 3; var newCost = Math.floor(25 * Math.pow(1.8, (maxFoodCapacity - 5) / 3)); maxFoodUpgradeBtn.updateCost(newCost); break; case 'burger': foodUpgradeCosts.burger = true; burgerUpgradeBtn.titleText.setText('Burgers Unlocked!'); burgerUpgradeBtn.background.tint = 0x666666; break; case 'pizza': foodUpgradeCosts.pizza = true; pizzaUpgradeBtn.titleText.setText('Pizza Unlocked!'); pizzaUpgradeBtn.background.tint = 0x666666; break; case 'cake': foodUpgradeCosts.cake = true; cakeUpgradeBtn.titleText.setText('Cake Unlocked!'); cakeUpgradeBtn.background.tint = 0x666666; break; } updateUI(); saveGame(); } } function updateUpgradeButtons() { // Update button states based on currency and unlocks stomachUpgradeBtn.background.tint = currency >= stomachUpgradeCost ? 0x4CAF50 : 0x666666; var maxFoodCost = Math.floor(25 * Math.pow(1.8, (maxFoodCapacity - 5) / 3)); maxFoodUpgradeBtn.background.tint = currency >= maxFoodCost ? 0x4CAF50 : 0x666666; burgerUpgradeBtn.background.tint = currency >= 15 && !foodUpgradeCosts.burger ? 0x4CAF50 : 0x666666; pizzaUpgradeBtn.background.tint = currency >= 50 && !foodUpgradeCosts.pizza ? 0x4CAF50 : 0x666666; cakeUpgradeBtn.background.tint = currency >= 150 && !foodUpgradeCosts.cake ? 0x4CAF50 : 0x666666; } function updateUI() { currencyText.setText('Coins: ' + currency); sizeText.setText('Size: x' + playerCharacter.growthMultiplier.toFixed(2)); stomachText.setText('Stomach: ' + stomachLevel + ' | Food: ' + stomachFood + '/' + maxFoodCapacity); } function saveGame() { storage.currency = currency; storage.totalEaten = totalEaten; storage.stomachLevel = stomachLevel; storage.stomachFood = stomachFood; storage.maxFoodCapacity = maxFoodCapacity; storage.stomachUpgradeCost = stomachUpgradeCost; storage.burgerUnlocked = foodUpgradeCosts.burger; storage.pizzaUnlocked = foodUpgradeCosts.pizza; storage.cakeUnlocked = foodUpgradeCosts.cake; } // Game update loop game.update = function () { // Spawn food spawnTimer++; if (spawnTimer >= foodSpawnRate) { spawnFood(); spawnTimer = 0; } // Update and remove expired foods for (var i = foods.length - 1; i >= 0; i--) { var food = foods[i]; if (food.lifespan <= 0) { food.destroy(); foods.splice(i, 1); } } // Update upgrade buttons if shop is open if (showingUpgrades) { updateUpgradeButtons(); } };
===================================================================
--- original.js
+++ change.js
@@ -127,9 +127,9 @@
var totalEaten = storage.totalEaten || 0;
var stomachLevel = storage.stomachLevel || 1;
var stomachFood = storage.stomachFood || 0; // Track food in stomach
var maxFoodCapacity = storage.maxFoodCapacity || 5; // Maximum food that can be eaten
-var foodSpawnRate = 90; // frames between spawns
+var foodSpawnRate = 120; // frames between spawns
var spawnTimer = 0;
var foods = [];
var showingUpgrades = false;
// Food costs and levels
fat. In-Game asset. 2d. High contrast. No shadows
apple. In-Game asset. 2d. High contrast. No shadows
burger. In-Game asset. 2d. High contrast. No shadows
cake. In-Game asset. 2d. High contrast. No shadows
heart. In-Game asset. 2d. High contrast. No shadows
poison fish. In-Game asset. 2d. High contrast. No shadows
ultraburgerpizzacafecake. In-Game asset. 2d. High contrast. No shadows
a lot fat. In-Game asset. 2d. High contrast. No shadows
zombie fat. In-Game asset. 2d. High contrast. No shadows