User prompt
don't fly ulti
User prompt
Let there be 1 ultimate, let the ultimate be full after 5 minutes, let the ultimate be full of tran bolin
User prompt
no tran bolin
User prompt
changing the shape of the tran bolin
User prompt
Add a trampoline and make it jump 5 blocks and make it come out of 1 block 5 times.
User prompt
no menu
User prompt
add menu
User prompt
add money
User prompt
Migrate to the latest version of LK
Remix started
Copy Frog Jumper
/**** * Classes ****/ var Indicator = Container.expand(function () { var self = Container.call(this); var indicatorGraphics = self.attachAsset('indicator', { anchorY: 0.5 }); self.alpha = 0; self._update_migrated = function (x, y) { this.rotation = Math.atan2(y, x); this.scale.x = Math.sqrt(x * x + y * y) / 100; }; }); var Platform = Container.expand(function () { var self = Container.call(this); var platformGraphics = self.attachAsset('platform', { anchorX: 0.5, anchorY: 0.5 }); self.hitTestAsset = self.attachAsset('hitTest', { anchorX: 0.5, anchorY: 0.5 }); self.hitTestAsset.alpha = 0; }); var Player = Container.expand(function () { var self = Container.call(this); self.indicator = self.addChild(new Indicator()); self.playerGraphics = self.attachAsset('player', { anchorX: 0.5, anchorY: 0.5 }); self.gravity = 1; self.jumpForce = 20; self.velocityX = 0; self.velocityY = 0; self.setJumpForce = function (x, y) { var vectorMagnitude = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); var maxMagnitude = 1100; if (vectorMagnitude > maxMagnitude) { x = x / vectorMagnitude * maxMagnitude; y = y / vectorMagnitude * maxMagnitude; } this.jumpForceX = x / 12.5; this.jumpForceY = y / 12.5; }; self.jumping = false; self.onPlatform = false; self._update_migrated = function () { this.x += this.velocityX; this.y += this.velocityY; this.velocityY += this.gravity; this.velocityX *= 0.98; this.velocityY *= 0.98; if (this.y > 2732) { LK.showGameOver(); } if (this.x < 0 || this.x > 2048) { this.velocityX *= -1; } if (this.velocityY >= 0) { this.jumping = false; } else if (this.velocityY < 0) { this.jumping = true; this.onPlatform = false; } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x385b50 }); /**** * Game Code ****/ var gameSpeed = 0; var score = 0; var money = 0; var background = game.attachAsset('background', {}); background.alpha = 0.5; game.on('up', function (x, y, obj) { if (dragStart && player.onPlatform) { var pos = game.toLocal(obj.global); player.setJumpForce(dragStart.x - pos.x, dragStart.y - pos.y); player.velocityX = player.jumpForceX; player.velocityY = player.jumpForceY; dragStart = null; gameSpeed += 0.5; score += 1; LK.setScore(score); scoreTxt.setText(LK.getScore()); money += 1; moneyTxt.setText('💰 ' + money); instructionTxt.destroy(); player.indicator.alpha = 0; } }); game.on('move', function (x, y, obj) { if (dragStart && !player.jumping) { var pos = game.toLocal(obj.global); player.indicator._update_migrated(dragStart.x - pos.x, dragStart.y - pos.y); player.indicator.alpha = 1; } }); var platforms = []; var platformSpeed = 0; for (var i = 0; i < 5; i++) { var platform = new Platform(); platform.x = Math.random() * 2048; platform.y = i * (2732 / 5); platforms.push(platform); game.addChild(platform); } var scoreTxt = new Text2('0', { size: 150, fill: '#ffffff', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); LK.gui.top.addChild(scoreTxt); var moneyTxt = new Text2('💰 0', { size: 100, fill: '#ffe066', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); moneyTxt.anchor.set(0, 0); moneyTxt.x = 120; // Avoid top left menu, place right of it moneyTxt.y = 0; LK.gui.top.addChild(moneyTxt); var instructionTxt = new Text2('Drag and release to jump', { size: 100, fill: '#ffffff', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); instructionTxt.anchor.set(.5, .5); instructionTxt.x = 2048 / 2; instructionTxt.y = 2732 / 2; game.addChild(instructionTxt); // Add menu button to top right var menuBtn = new Text2('≡', { size: 120, fill: '#ffe066', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); menuBtn.anchor.set(1, 0); menuBtn.x = LK.gui.top.width - 40; menuBtn.y = 0; LK.gui.top.addChild(menuBtn); // Menu overlay (hidden by default) var menuOverlay = new Container(); var menuBg = new Text2(' ', { size: 1, fill: '#000000' }); menuBg.width = 1200; menuBg.height = 900; menuBg.alpha = 0.85; menuBg.anchor.set(0.5, 0.5); menuBg.x = 2048 / 2; menuBg.y = 2732 / 2; menuOverlay.addChild(menuBg); var menuTitle = new Text2('Menu', { size: 160, fill: '#ffe066', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); menuTitle.anchor.set(0.5, 0); menuTitle.x = 2048 / 2; menuTitle.y = 2732 / 2 - 350; menuOverlay.addChild(menuTitle); var menuInstructions = new Text2('Drag and release to jump\nLand on lillypads to survive!\nCollect coins for money.', { size: 90, fill: '#ffffff', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); menuInstructions.anchor.set(0.5, 0); menuInstructions.x = 2048 / 2; menuInstructions.y = 2732 / 2 - 120; menuOverlay.addChild(menuInstructions); var closeBtn = new Text2('Close', { size: 120, fill: '#ffe066', font: 'Impact', dropShadow: true, dropShadowColor: '#000000', dropShadowBlur: 4, dropShadowAngle: Math.PI / 6, dropShadowDistance: 6 }); closeBtn.anchor.set(0.5, 1); closeBtn.x = 2048 / 2; closeBtn.y = 2732 / 2 + 400; menuOverlay.addChild(closeBtn); menuOverlay.visible = false; game.addChild(menuOverlay); // Show menu on menuBtn press menuBtn.interactive = true; menuBtn.on('down', function () { menuOverlay.visible = true; game.paused = true; }); // Hide menu on closeBtn press closeBtn.interactive = true; closeBtn.on('down', function () { menuOverlay.visible = false; game.paused = false; }); var player = game.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 - player.playerGraphics.height; var firstJump = false; platforms[0].x = player.x; platforms[0].y = player.y + player.playerGraphics.height; LK.on('tick', function () { player._update_migrated(); if (player.y < 2732 / 2) { platformSpeed = Math.min(platformSpeed + 0.1, 5); } else { platformSpeed = Math.max(platformSpeed - 0.1, 0); } for (var i = 0; i < platforms.length; i++) { platforms[i].y += platformSpeed + gameSpeed; } player.y += platformSpeed + gameSpeed; for (var i = 0; i < platforms.length; i++) { if (player.intersects(platforms[i].hitTestAsset) && !player.jumping && player.y + player.playerGraphics.height / 2 < platforms[i].y) { player.y = platforms[i].y - player.playerGraphics.height / 2 - platforms[i].hitTestAsset.height / 2; player.velocityY = 0; player.velocityX *= 0.8; player.onPlatform = true; } else if (platforms[i].y - platforms[i].height > 2732) { platforms[i].y = -platforms[i].height; platforms[i].x = Math.random() * 2048; } } }); var dragStart = null; game.on('down', function (x, y, obj) { dragStart = game.toLocal(obj.global); });
===================================================================
--- original.js
+++ change.js
@@ -154,8 +154,92 @@
instructionTxt.anchor.set(.5, .5);
instructionTxt.x = 2048 / 2;
instructionTxt.y = 2732 / 2;
game.addChild(instructionTxt);
+// Add menu button to top right
+var menuBtn = new Text2('≡', {
+ size: 120,
+ fill: '#ffe066',
+ font: 'Impact',
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ dropShadowBlur: 4,
+ dropShadowAngle: Math.PI / 6,
+ dropShadowDistance: 6
+});
+menuBtn.anchor.set(1, 0);
+menuBtn.x = LK.gui.top.width - 40;
+menuBtn.y = 0;
+LK.gui.top.addChild(menuBtn);
+// Menu overlay (hidden by default)
+var menuOverlay = new Container();
+var menuBg = new Text2(' ', {
+ size: 1,
+ fill: '#000000'
+});
+menuBg.width = 1200;
+menuBg.height = 900;
+menuBg.alpha = 0.85;
+menuBg.anchor.set(0.5, 0.5);
+menuBg.x = 2048 / 2;
+menuBg.y = 2732 / 2;
+menuOverlay.addChild(menuBg);
+var menuTitle = new Text2('Menu', {
+ size: 160,
+ fill: '#ffe066',
+ font: 'Impact',
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ dropShadowBlur: 4,
+ dropShadowAngle: Math.PI / 6,
+ dropShadowDistance: 6
+});
+menuTitle.anchor.set(0.5, 0);
+menuTitle.x = 2048 / 2;
+menuTitle.y = 2732 / 2 - 350;
+menuOverlay.addChild(menuTitle);
+var menuInstructions = new Text2('Drag and release to jump\nLand on lillypads to survive!\nCollect coins for money.', {
+ size: 90,
+ fill: '#ffffff',
+ font: 'Impact',
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ dropShadowBlur: 4,
+ dropShadowAngle: Math.PI / 6,
+ dropShadowDistance: 6
+});
+menuInstructions.anchor.set(0.5, 0);
+menuInstructions.x = 2048 / 2;
+menuInstructions.y = 2732 / 2 - 120;
+menuOverlay.addChild(menuInstructions);
+var closeBtn = new Text2('Close', {
+ size: 120,
+ fill: '#ffe066',
+ font: 'Impact',
+ dropShadow: true,
+ dropShadowColor: '#000000',
+ dropShadowBlur: 4,
+ dropShadowAngle: Math.PI / 6,
+ dropShadowDistance: 6
+});
+closeBtn.anchor.set(0.5, 1);
+closeBtn.x = 2048 / 2;
+closeBtn.y = 2732 / 2 + 400;
+menuOverlay.addChild(closeBtn);
+menuOverlay.visible = false;
+game.addChild(menuOverlay);
+// Show menu on menuBtn press
+menuBtn.interactive = true;
+menuBtn.on('down', function () {
+ menuOverlay.visible = true;
+ game.paused = true;
+});
+// Hide menu on closeBtn press
+closeBtn.interactive = true;
+closeBtn.on('down', function () {
+ menuOverlay.visible = false;
+ game.paused = false;
+});
var player = game.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 - player.playerGraphics.height;
var firstJump = false;
Single cartoon frog sitting. Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Cartoon lillypad edge on. No flower Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cozy cartoon swamp background Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Gradient from black to green Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
frog language. In-Game asset. 2d. High contrast. No shadows