Code edit (1 edits merged)
Please save this source code
User prompt
The Walrus's Belly
Initial prompt
The Walrus's Belly Characters: TUSKARR: A massive, blubbery walrus. NEMO: A perky corgi. MACCHIATO: A sleek, somewhat disdainful cat. CARROT: A perpetually optimistic bunny. PANEL 1 Setting: A surprisingly large bed, looking a bit stressed under the weight. Visual: TUSKARR, a truly enormous walrus, is asleep on the bed. His large, blubbery belly is prominently featured, with a noticeable, slightly lumpy bulge in the middle. Zzz's emanate from his open snout. A half-eaten fish lies discarded nearby. Caption: Later that night, after a very satisfying snack... PANEL 2 Setting: Close-up on TUSKARR's belly. Visual: The bulge on TUSKARR's belly now has distinct, albeit muffled, shapes pushing against it from within. A small, muffled THUMP can be seen. TUSKARR remains sound asleep, perhaps a snore bubble near his nose. Sound Effect: GURGLE... RUMBLE... Speech Bubble (Muffled, from inside Tuskarr): NEMO: (Small, muffled) Ugh... where in the... PANEL 3 Setting: Still inside TUSKARR's belly, implied by the dark, fleshy textures around the animals. Visual: NEMO, MACCHIATO, and CARROT are huddled together in a very confined, dark, and squishy space. They look disoriented and a bit grossed out. Speech Bubble: MACCHIATO: (Annoyed) This is not ergonomic. And what is that smell?! CARROT: (Confused) Is this... a new kind of burrow? It’s very warm! And a bit... squishy. NEMO: (Realizing) Squishy? Guys... I think... I think we're inside something. Something very, very big. PANEL 4 Setting: External view of TUSKARR on the bed. Visual: TUSKARR's belly is now noticeably churning and shifting. The lumps are more pronounced. TUSKARR lets out a loud, contented snore, completely oblivious. A little drool escapes his mouth. Sound Effect: GROOOOAN (from Tuskarr), SQUELCH (from inside) Speech Bubble (Muffled, from inside Tuskarr): NEMO: (Panicked) He ate us! The walrus! He ate us all! MACCHIATO: (Disgusted) I need a bath! Immediately! And a lint roller! CARROT: (Optimistic) Oh! So that's where my carrots went! Are we going to be part of a grand digestive adventure? PANEL 5 Setting: Inside TUSKARR's belly again. Visual: The space is becoming even darker and more viscous. The outlines of the animals are starting to blur slightly, as if their fur/skin is beginning to dissolve. CARROT still has a wide-eyed, naive look, while NEMO and MACCHIATO look increasingly distressed. Sound Effect: SLURP GULP FIZZZ Speech Bubble: NEMO: (Fading, panicked) It's getting... hot! And... bubbly! MACCHIATO: (Fading, horrified) My beautiful fur! It's... it's disappearing! CARROT: (Still cheerful, but fading) Oh! So this is the "digestion" part! Fascinating! Are we becoming... nutrients? PANEL 6 Setting: TUSKARR on the bed. Visual: TUSKARR is still sound asleep, but his belly is now perfectly smooth again. No more lumps. Just a vast expanse of contented blubber. A small, almost imperceptible "burp" cloud drifts from his mouth. Sound Effect: * contented SNORE... * ...BLURP. Speech Bubble (from Tuskarr, sleepy): TUSKARR: Mmmphh... best... snack... ever... (Trails off into a deeper snore) Caption: By morning, the walrus was well-rested... and incredibly full. With Video And Keyboard And Without Game
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Animal = Container.expand(function (type) { var self = Container.call(this); self.type = type; self.speed = 3; self.isSelected = false; var graphics = self.attachAsset(type, { anchorX: 0.5, anchorY: 0.5 }); self.setSelected = function (selected) { self.isSelected = selected; if (selected) { graphics.tint = 0xFFFFFF; graphics.alpha = 1.0; } else { graphics.tint = 0x888888; graphics.alpha = 0.7; } }; self.getAbility = function () { switch (self.type) { case 'nemo': return 'jump'; case 'macchiato': return 'squeeze'; case 'carrot': return 'dig'; default: return 'none'; } }; return self; }); var Passage = Container.expand(function () { var self = Container.call(this); self.isOpen = false; self.requiredAbility = 'none'; var graphics = self.attachAsset('passage', { anchorX: 0.5, anchorY: 0.5 }); self.setRequirement = function (ability) { self.requiredAbility = ability; switch (ability) { case 'jump': graphics.tint = 0xD2691E; // Nemo's color break; case 'squeeze': graphics.tint = 0x8B4513; // Macchiato's color break; case 'dig': graphics.tint = 0xFFFFFF; // Carrot's color break; } }; self.open = function () { if (!self.isOpen) { self.isOpen = true; graphics.alpha = 0.3; } }; return self; }); var Switch = Container.expand(function () { var self = Container.call(this); self.activated = false; var graphics = self.attachAsset('switch', { anchorX: 0.5, anchorY: 0.5 }); self.activate = function () { if (!self.activated) { self.activated = true; graphics.tint = 0x00FF00; LK.getSound('switch_activate').play(); return true; } return false; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2F4F4F }); /**** * Game Code ****/ // Game state var gameTime = 0; var acidLevel = 2732 - 150; var acidRiseSpeed = 0.5; var currentAnimal = 0; var switchesActivated = 0; var totalSwitches = 3; var gameWon = false; // Create animals var animals = []; var nemo = new Animal('nemo'); var macchiato = new Animal('macchiato'); var carrot = new Animal('carrot'); animals.push(nemo, macchiato, carrot); // Position animals nemo.x = 200; nemo.y = 2200; macchiato.x = 300; macchiato.y = 2200; carrot.x = 400; carrot.y = 2200; // Add animals to game game.addChild(nemo); game.addChild(macchiato); game.addChild(carrot); // Set initial selection animals[currentAnimal].setSelected(true); // Create acid var acid = game.addChild(LK.getAsset('acid', { anchorX: 0, anchorY: 0, x: 0, y: acidLevel })); // Create walls and obstacles var walls = []; for (var i = 0; i < 8; i++) { var wall = new Container(); wall.addChild(LK.getAsset('wall', { anchorX: 0.5, anchorY: 0.5 })); wall.x = Math.random() * 1800 + 200; wall.y = Math.random() * 1800 + 400; walls.push(wall); game.addChild(wall); } // Create switches var switches = []; for (var i = 0; i < totalSwitches; i++) { var switchObj = new Switch(); switchObj.x = 300 + i * 600; switchObj.y = 1000 + Math.random() * 800; switches.push(switchObj); game.addChild(switchObj); } // Create passages var passages = []; var abilities = ['jump', 'squeeze', 'dig']; for (var i = 0; i < 3; i++) { var passage = new Passage(); passage.setRequirement(abilities[i]); passage.x = 500 + i * 500; passage.y = 800; passages.push(passage); game.addChild(passage); } // Create exit var exit = game.addChild(LK.getAsset('exit', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 200 })); // UI var timeText = new Text2('Time: 0', { size: 60, fill: 0xFFFFFF }); timeText.anchor.set(0, 0); LK.gui.topRight.addChild(timeText); var instructionText = new Text2('Tap to switch animals', { size: 40, fill: 0xFFFF00 }); instructionText.anchor.set(0.5, 0); LK.gui.top.addChild(instructionText); var animalText = new Text2('Nemo (Jump)', { size: 50, fill: 0xFFFFFF }); animalText.anchor.set(0, 0); LK.gui.topLeft.addChild(animalText); animalText.x = 120; // Avoid platform menu // Touch controls var dragAnimal = null; game.down = function (x, y, obj) { // Check if touching current animal var currentAnimalObj = animals[currentAnimal]; var globalPos = currentAnimalObj.toGlobal({ x: 0, y: 0 }); var distance = Math.sqrt(Math.pow(x - globalPos.x, 2) + Math.pow(y - globalPos.y, 2)); if (distance < 100) { dragAnimal = currentAnimalObj; } else { // Switch animal animals[currentAnimal].setSelected(false); currentAnimal = (currentAnimal + 1) % 3; animals[currentAnimal].setSelected(true); // Update UI var animalNames = ['Nemo (Jump)', 'Macchiato (Squeeze)', 'Carrot (Dig)']; animalText.setText(animalNames[currentAnimal]); } }; game.move = function (x, y, obj) { if (dragAnimal) { var newX = Math.max(50, Math.min(1998, x)); var newY = Math.max(50, Math.min(acidLevel - 50, y)); dragAnimal.x = newX; dragAnimal.y = newY; } }; game.up = function (x, y, obj) { if (dragAnimal) { // Check interactions checkSwitchInteraction(dragAnimal); checkPassageInteraction(dragAnimal); checkExitInteraction(dragAnimal); dragAnimal = null; } }; // Interaction functions function checkSwitchInteraction(animal) { for (var i = 0; i < switches.length; i++) { var switchObj = switches[i]; if (!switchObj.activated && animal.intersects(switchObj)) { if (switchObj.activate()) { switchesActivated++; // Open corresponding passage if (passages[i]) { passages[i].open(); } if (switchesActivated >= totalSwitches) { instructionText.setText('All switches activated! Reach the exit!'); } } } } } function checkPassageInteraction(animal) { for (var i = 0; i < passages.length; i++) { var passage = passages[i]; if (animal.intersects(passage)) { if (passage.requiredAbility === animal.getAbility() && !passage.isOpen) { passage.open(); instructionText.setText('Passage opened by ' + animal.type + '!'); } } } } function checkExitInteraction(animal) { if (animal.intersects(exit) && switchesActivated >= totalSwitches) { // Check if all animals are near exit var allNearExit = true; for (var i = 0; i < animals.length; i++) { var dist = Math.sqrt(Math.pow(animals[i].x - exit.x, 2) + Math.pow(animals[i].y - exit.y, 2)); if (dist > 200) { allNearExit = false; break; } } if (allNearExit && !gameWon) { gameWon = true; LK.getSound('escape_success').play(); LK.showYouWin(); } else if (!allNearExit) { instructionText.setText('Get all animals to the exit!'); } } } // Main update loop game.update = function () { gameTime++; if (gameWon) return; // Update time display var seconds = Math.floor(gameTime / 60); timeText.setText('Time: ' + seconds + 's'); // Raise acid level acidLevel -= acidRiseSpeed; acid.y = acidLevel; // Check if any animal touches acid for (var i = 0; i < animals.length; i++) { if (animals[i].y + 40 > acidLevel) { LK.getSound('acid_warning').play(); LK.effects.flashScreen(0x32CD32, 500); LK.showGameOver(); return; } } // Increase difficulty over time if (gameTime % 600 === 0) { // Every 10 seconds acidRiseSpeed += 0.1; } // Warning when acid gets close if (acidLevel < 2000 && gameTime % 120 === 0) { LK.effects.flashObject(acid, 0xFF0000, 300); } };
===================================================================
--- original.js
+++ change.js
@@ -1,6 +1,311 @@
-/****
+/****
+* Plugins
+****/
+var tween = LK.import("@upit/tween.v1");
+
+/****
+* Classes
+****/
+var Animal = Container.expand(function (type) {
+ var self = Container.call(this);
+ self.type = type;
+ self.speed = 3;
+ self.isSelected = false;
+ var graphics = self.attachAsset(type, {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.setSelected = function (selected) {
+ self.isSelected = selected;
+ if (selected) {
+ graphics.tint = 0xFFFFFF;
+ graphics.alpha = 1.0;
+ } else {
+ graphics.tint = 0x888888;
+ graphics.alpha = 0.7;
+ }
+ };
+ self.getAbility = function () {
+ switch (self.type) {
+ case 'nemo':
+ return 'jump';
+ case 'macchiato':
+ return 'squeeze';
+ case 'carrot':
+ return 'dig';
+ default:
+ return 'none';
+ }
+ };
+ return self;
+});
+var Passage = Container.expand(function () {
+ var self = Container.call(this);
+ self.isOpen = false;
+ self.requiredAbility = 'none';
+ var graphics = self.attachAsset('passage', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.setRequirement = function (ability) {
+ self.requiredAbility = ability;
+ switch (ability) {
+ case 'jump':
+ graphics.tint = 0xD2691E; // Nemo's color
+ break;
+ case 'squeeze':
+ graphics.tint = 0x8B4513; // Macchiato's color
+ break;
+ case 'dig':
+ graphics.tint = 0xFFFFFF; // Carrot's color
+ break;
+ }
+ };
+ self.open = function () {
+ if (!self.isOpen) {
+ self.isOpen = true;
+ graphics.alpha = 0.3;
+ }
+ };
+ return self;
+});
+var Switch = Container.expand(function () {
+ var self = Container.call(this);
+ self.activated = false;
+ var graphics = self.attachAsset('switch', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.activate = function () {
+ if (!self.activated) {
+ self.activated = true;
+ graphics.tint = 0x00FF00;
+ LK.getSound('switch_activate').play();
+ return true;
+ }
+ return false;
+ };
+ return self;
+});
+
+/****
* Initialize Game
-****/
+****/
var game = new LK.Game({
- backgroundColor: 0x000000
-});
\ No newline at end of file
+ backgroundColor: 0x2F4F4F
+});
+
+/****
+* Game Code
+****/
+// Game state
+var gameTime = 0;
+var acidLevel = 2732 - 150;
+var acidRiseSpeed = 0.5;
+var currentAnimal = 0;
+var switchesActivated = 0;
+var totalSwitches = 3;
+var gameWon = false;
+// Create animals
+var animals = [];
+var nemo = new Animal('nemo');
+var macchiato = new Animal('macchiato');
+var carrot = new Animal('carrot');
+animals.push(nemo, macchiato, carrot);
+// Position animals
+nemo.x = 200;
+nemo.y = 2200;
+macchiato.x = 300;
+macchiato.y = 2200;
+carrot.x = 400;
+carrot.y = 2200;
+// Add animals to game
+game.addChild(nemo);
+game.addChild(macchiato);
+game.addChild(carrot);
+// Set initial selection
+animals[currentAnimal].setSelected(true);
+// Create acid
+var acid = game.addChild(LK.getAsset('acid', {
+ anchorX: 0,
+ anchorY: 0,
+ x: 0,
+ y: acidLevel
+}));
+// Create walls and obstacles
+var walls = [];
+for (var i = 0; i < 8; i++) {
+ var wall = new Container();
+ wall.addChild(LK.getAsset('wall', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ }));
+ wall.x = Math.random() * 1800 + 200;
+ wall.y = Math.random() * 1800 + 400;
+ walls.push(wall);
+ game.addChild(wall);
+}
+// Create switches
+var switches = [];
+for (var i = 0; i < totalSwitches; i++) {
+ var switchObj = new Switch();
+ switchObj.x = 300 + i * 600;
+ switchObj.y = 1000 + Math.random() * 800;
+ switches.push(switchObj);
+ game.addChild(switchObj);
+}
+// Create passages
+var passages = [];
+var abilities = ['jump', 'squeeze', 'dig'];
+for (var i = 0; i < 3; i++) {
+ var passage = new Passage();
+ passage.setRequirement(abilities[i]);
+ passage.x = 500 + i * 500;
+ passage.y = 800;
+ passages.push(passage);
+ game.addChild(passage);
+}
+// Create exit
+var exit = game.addChild(LK.getAsset('exit', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1024,
+ y: 200
+}));
+// UI
+var timeText = new Text2('Time: 0', {
+ size: 60,
+ fill: 0xFFFFFF
+});
+timeText.anchor.set(0, 0);
+LK.gui.topRight.addChild(timeText);
+var instructionText = new Text2('Tap to switch animals', {
+ size: 40,
+ fill: 0xFFFF00
+});
+instructionText.anchor.set(0.5, 0);
+LK.gui.top.addChild(instructionText);
+var animalText = new Text2('Nemo (Jump)', {
+ size: 50,
+ fill: 0xFFFFFF
+});
+animalText.anchor.set(0, 0);
+LK.gui.topLeft.addChild(animalText);
+animalText.x = 120; // Avoid platform menu
+// Touch controls
+var dragAnimal = null;
+game.down = function (x, y, obj) {
+ // Check if touching current animal
+ var currentAnimalObj = animals[currentAnimal];
+ var globalPos = currentAnimalObj.toGlobal({
+ x: 0,
+ y: 0
+ });
+ var distance = Math.sqrt(Math.pow(x - globalPos.x, 2) + Math.pow(y - globalPos.y, 2));
+ if (distance < 100) {
+ dragAnimal = currentAnimalObj;
+ } else {
+ // Switch animal
+ animals[currentAnimal].setSelected(false);
+ currentAnimal = (currentAnimal + 1) % 3;
+ animals[currentAnimal].setSelected(true);
+ // Update UI
+ var animalNames = ['Nemo (Jump)', 'Macchiato (Squeeze)', 'Carrot (Dig)'];
+ animalText.setText(animalNames[currentAnimal]);
+ }
+};
+game.move = function (x, y, obj) {
+ if (dragAnimal) {
+ var newX = Math.max(50, Math.min(1998, x));
+ var newY = Math.max(50, Math.min(acidLevel - 50, y));
+ dragAnimal.x = newX;
+ dragAnimal.y = newY;
+ }
+};
+game.up = function (x, y, obj) {
+ if (dragAnimal) {
+ // Check interactions
+ checkSwitchInteraction(dragAnimal);
+ checkPassageInteraction(dragAnimal);
+ checkExitInteraction(dragAnimal);
+ dragAnimal = null;
+ }
+};
+// Interaction functions
+function checkSwitchInteraction(animal) {
+ for (var i = 0; i < switches.length; i++) {
+ var switchObj = switches[i];
+ if (!switchObj.activated && animal.intersects(switchObj)) {
+ if (switchObj.activate()) {
+ switchesActivated++;
+ // Open corresponding passage
+ if (passages[i]) {
+ passages[i].open();
+ }
+ if (switchesActivated >= totalSwitches) {
+ instructionText.setText('All switches activated! Reach the exit!');
+ }
+ }
+ }
+ }
+}
+function checkPassageInteraction(animal) {
+ for (var i = 0; i < passages.length; i++) {
+ var passage = passages[i];
+ if (animal.intersects(passage)) {
+ if (passage.requiredAbility === animal.getAbility() && !passage.isOpen) {
+ passage.open();
+ instructionText.setText('Passage opened by ' + animal.type + '!');
+ }
+ }
+ }
+}
+function checkExitInteraction(animal) {
+ if (animal.intersects(exit) && switchesActivated >= totalSwitches) {
+ // Check if all animals are near exit
+ var allNearExit = true;
+ for (var i = 0; i < animals.length; i++) {
+ var dist = Math.sqrt(Math.pow(animals[i].x - exit.x, 2) + Math.pow(animals[i].y - exit.y, 2));
+ if (dist > 200) {
+ allNearExit = false;
+ break;
+ }
+ }
+ if (allNearExit && !gameWon) {
+ gameWon = true;
+ LK.getSound('escape_success').play();
+ LK.showYouWin();
+ } else if (!allNearExit) {
+ instructionText.setText('Get all animals to the exit!');
+ }
+ }
+}
+// Main update loop
+game.update = function () {
+ gameTime++;
+ if (gameWon) return;
+ // Update time display
+ var seconds = Math.floor(gameTime / 60);
+ timeText.setText('Time: ' + seconds + 's');
+ // Raise acid level
+ acidLevel -= acidRiseSpeed;
+ acid.y = acidLevel;
+ // Check if any animal touches acid
+ for (var i = 0; i < animals.length; i++) {
+ if (animals[i].y + 40 > acidLevel) {
+ LK.getSound('acid_warning').play();
+ LK.effects.flashScreen(0x32CD32, 500);
+ LK.showGameOver();
+ return;
+ }
+ }
+ // Increase difficulty over time
+ if (gameTime % 600 === 0) {
+ // Every 10 seconds
+ acidRiseSpeed += 0.1;
+ }
+ // Warning when acid gets close
+ if (acidLevel < 2000 && gameTime % 120 === 0) {
+ LK.effects.flashObject(acid, 0xFF0000, 300);
+ }
+};
\ No newline at end of file