User prompt
don't add the level logic
User prompt
platforms disappeared somehow fix the problem please
User prompt
doesn't work revert it back please to the simpler version
User prompt
still the same problem
User prompt
problem continues
User prompt
it is not possible to see the platforms sometimes because of the color mismatch of background and platforms
User prompt
add levels like every 100 platforms background and shape of platforms should change, the theme should change. also, always keep the jumping guy appear front of the platforms
User prompt
there are some bugs it is still not possible to get to the next platforms in some cases please fix it, also add a scoring system and keep high score ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
it is not possible to get to the next platform right now please fix it
User prompt
player should start at a platform guaranteed and also it should be easier to get to the next platform platforms should be wide it shouldn't be much of a problem to get to the next platform
User prompt
create me icy tower
Code edit (1 edits merged)
Please save this source code
User prompt
Impossible Casino Puzzle
User prompt
Impossible Casino Puzzle is a minimalist, one-level brain teaser that challenges players to fit exactly six poker chips into a small, rigid case. Each chip must be carefully placed without overlapping or crossing the boundaries of the container. There's no timer, no hints — just pure logic, spatial awareness, and the satisfaction of a perfect fit. Players can rotate and move the chips freely, but the space is tight and every placement counts. The puzzle appears simple at first glance, but only one or two arrangements will work. It’s a true test of geometry and creative problem solving. Ideal for puzzle lovers and fans of elegant, compact challenges, this game delivers a focused experience in just one level — but solving it feels like cracking a code. It’s the ultimate “Aha!” moment in puzzle form. Design a single-level puzzle game called "Impossible Casino Puzzle" where the player must fit 6 circular poker chips into a small rectangular case without any overlaps or chips extending beyond the case boundaries. Game Flow: 1. Display a small rectangular case and 6 movable circular poker chips. 2. Allow the player to drag and rotate each chip freely. 3. The goal is to arrange all 6 chips inside the case without overlapping. 4. If a chip is placed outside the case or overlaps another chip, show a red outline or vibration feedback. 5. When all 6 chips are correctly placed, display a success animation and a “Puzzle Solved” message. 6. Include basic UI: restart button and optional subtle gridlines for alignment. No scoring, no timer — just a clean, single-level logic challenge focused on precise placement and spatial reasoning.
User prompt
Please continue polishing my design document.
User prompt
I was talking about this game: https://tr.aliexpress.com/item/1005005644350096.html?gatewayAdapt=glo2tur
Initial prompt
make a chips puzzle game where one tries to put 6 chips in a box
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // PokerChip class: draggable, rotatable, circular var PokerChip = Container.expand(function () { var self = Container.call(this); // Asset id and color are passed in self.assetId = self.assetId || 'chipRed'; var chip = self.attachAsset(self.assetId, { anchorX: 0.5, anchorY: 0.5 }); // For rotation handle var handle = self.attachAsset('chipWhite', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.18, scaleY: 0.18, y: -chip.height / 2 - 40 }); handle.alpha = 0.7; // For drag/rotate state self.isDragging = false; self.isRotating = false; self.dragOffsetX = 0; self.dragOffsetY = 0; self.startAngle = 0; self.startRotation = 0; // For hit testing self.radius = chip.width / 2; // Used to distinguish between drag and rotate self.down = function (x, y, obj) { var local = self.toLocal({ x: x, y: y }); // If touch is on handle, start rotating var dx = local.x - handle.x; var dy = local.y - handle.y; if (dx * dx + dy * dy < handle.width / 2 * (handle.width / 2)) { self.isRotating = true; // Angle from center to pointer var cx = self.x, cy = self.y; self.startAngle = Math.atan2(y - cy, x - cx); self.startRotation = self.rotation; } else { // Otherwise, start dragging self.isDragging = true; self.dragOffsetX = x - self.x; self.dragOffsetY = y - self.y; } // Bring to front if (self.parent) { self.parent.setChildIndex(self, self.parent.children.length - 1); } }; self.up = function (x, y, obj) { self.isDragging = false; self.isRotating = false; }; // No per-chip move handler; handled globally return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x18181b }); /**** * Game Code ****/ // --- Icy Tower Constants --- var GAME_W = 2048; var GAME_H = 2732; var PLATFORM_W = 400; var PLATFORM_H = 40; var PLAYER_W = 120; var PLAYER_H = 120; var GRAVITY = 2.2; var JUMP_VELOCITY = -48; var MOVE_SPEED = 22; var PLATFORM_SPACING_MIN = 220; var PLATFORM_SPACING_MAX = 340; var PLATFORM_X_MARGIN = 120; var CAMERA_OFFSET = 900; // How far from bottom the player is kept // --- State --- var platforms = []; var player = null; var vy = 0; var vx = 0; var isJumping = false; var isTouching = false; var touchStartX = 0; var cameraY = 0; var maxHeight = 0; var gameOver = false; // --- Assets --- var playerAsset = LK.getAsset('chipBlue', { anchorX: 0.5, anchorY: 1, scaleX: PLAYER_W / 320, scaleY: PLAYER_H / 320 }); var platformAsset = LK.getAsset('caseRect', { anchorX: 0.5, anchorY: 0.5, scaleX: PLATFORM_W / 1100, scaleY: PLATFORM_H / 700 }); // --- UI --- var scoreTxt = new Text2('0', { size: 90, fill: 0xffffff }); scoreTxt.anchor.set(0.5, 0); scoreTxt.x = GAME_W / 2; scoreTxt.y = 60; LK.gui.top.addChild(scoreTxt); // --- Helper: create a platform at (x, y) --- function createPlatform(x, y) { var plat = new Container(); var platGfx = plat.attachAsset('caseRect', { anchorX: 0.5, anchorY: 0.5, scaleX: PLATFORM_W / 1100, scaleY: PLATFORM_H / 700 }); plat.x = x; plat.y = y; plat.width = PLATFORM_W; plat.height = PLATFORM_H; game.addChild(plat); platforms.push(plat); return plat; } // --- Helper: reset game state --- function resetGame() { // Remove old platforms for (var i = 0; i < platforms.length; ++i) { platforms[i].destroy(); } platforms = []; // Remove player if (player) player.destroy(); // Create player player = new Container(); var pGfx = player.attachAsset('chipBlue', { anchorX: 0.5, anchorY: 1, scaleX: PLAYER_W / 320, scaleY: PLAYER_H / 320 }); player.x = GAME_W / 2; player.y = GAME_H - 400; player.width = PLAYER_W; player.height = PLAYER_H; game.addChild(player); vy = 0; vx = 0; isJumping = false; isTouching = false; cameraY = 0; maxHeight = 0; gameOver = false; // Create initial platforms var y = GAME_H - 200; for (var i = 0; i < 12; ++i) { var px = Math.random() * (GAME_W - PLATFORM_X_MARGIN * 2) + PLATFORM_X_MARGIN; createPlatform(px, y); y -= Math.random() * (PLATFORM_SPACING_MAX - PLATFORM_SPACING_MIN) + PLATFORM_SPACING_MIN; } // Sort platforms by y platforms.sort(function (a, b) { return a.y - b.y; }); // Score scoreTxt.setText('0'); } // --- Helper: check collision between player and platform --- function playerOnPlatform() { for (var i = 0; i < platforms.length; ++i) { var plat = platforms[i]; // Only check if player is falling if (vy >= 0) { var px = player.x; var py = player.y; var platTop = plat.y - PLATFORM_H / 2; var platLeft = plat.x - PLATFORM_W / 2; var platRight = plat.x + PLATFORM_W / 2; // Check if player's feet are just above platform if (py >= platTop && py <= platTop + vy + 8) { if (px > platLeft && px < platRight) { return plat; } } } } return null; } // --- Touch controls: left/right jump --- game.down = function (x, y, obj) { if (gameOver) return; isTouching = true; touchStartX = x; // If player is on ground/platform, jump if (!isJumping) { vy = JUMP_VELOCITY; // Direction: left or right half of screen if (x < GAME_W / 2) { vx = -MOVE_SPEED; } else { vx = MOVE_SPEED; } isJumping = true; } }; game.up = function (x, y, obj) { isTouching = false; vx = 0; }; game.move = function (x, y, obj) { // Optionally, allow swiping to control direction if (isTouching && !gameOver) { if (x < GAME_W / 2) { vx = -MOVE_SPEED; } else { vx = MOVE_SPEED; } } }; // --- Main update loop --- game.update = function () { if (gameOver) return; // Physics vy += GRAVITY; player.x += vx; player.y += vy; // Clamp player to screen if (player.x < PLAYER_W / 2) player.x = PLAYER_W / 2; if (player.x > GAME_W - PLAYER_W / 2) player.x = GAME_W - PLAYER_W / 2; // Platform collision var plat = playerOnPlatform(); if (plat && vy > 0) { player.y = plat.y - PLATFORM_H / 2; vy = JUMP_VELOCITY; isJumping = false; } else { isJumping = true; } // Camera follows player upward if (player.y < GAME_H - CAMERA_OFFSET) { var diff = GAME_H - CAMERA_OFFSET - player.y; cameraY += diff; // Move all platforms and player down by diff for (var i = 0; i < platforms.length; ++i) { platforms[i].y += diff; } player.y += diff; maxHeight += diff; } // Remove platforms that are off screen, add new ones at top for (var i = platforms.length - 1; i >= 0; --i) { if (platforms[i].y > GAME_H + 100) { platforms[i].destroy(); platforms.splice(i, 1); } } // Add new platforms if needed while (platforms.length < 12) { var topY = platforms[0].y; var newY = topY - Math.random() * (PLATFORM_SPACING_MAX - PLATFORM_SPACING_MIN) - PLATFORM_SPACING_MIN; var px = Math.random() * (GAME_W - PLATFORM_X_MARGIN * 2) + PLATFORM_X_MARGIN; var plat = createPlatform(px, newY); // Keep sorted platforms.sort(function (a, b) { return a.y - b.y; }); } // Score: based on maxHeight climbed var score = Math.floor(maxHeight / 10); scoreTxt.setText(score.toString()); // Game over: fall below screen if (player.y > GAME_H + 200) { gameOver = true; LK.setTimeout(function () { LK.showGameOver(); }, 800); } }; // --- Start game --- resetGame();
===================================================================
--- original.js
+++ change.js
@@ -77,218 +77,224 @@
/****
* Game Code
****/
-// For subtle case border
-// Case: rectangle, dark gray
-// Poker chip: ellipse, white
-// Poker chip: ellipse, purple
-// Poker chip: ellipse, yellow
-// Poker chip: ellipse, green
-// Poker chip: ellipse, blue
-// Poker chip: ellipse, red
-// --- Constants ---
-var CASE_W = 1100;
-var CASE_H = 700;
-var CASE_X = (2048 - CASE_W) / 2;
-var CASE_Y = 600;
-var CASE_BORDER = 10;
-var CHIP_RADIUS = 160; // 320/2
-var CHIP_DIAM = 320;
-var CHIP_COLORS = ['chipRed', 'chipBlue', 'chipGreen', 'chipYellow', 'chipPurple', 'chipWhite'];
+// --- Icy Tower Constants ---
+var GAME_W = 2048;
+var GAME_H = 2732;
+var PLATFORM_W = 400;
+var PLATFORM_H = 40;
+var PLAYER_W = 120;
+var PLAYER_H = 120;
+var GRAVITY = 2.2;
+var JUMP_VELOCITY = -48;
+var MOVE_SPEED = 22;
+var PLATFORM_SPACING_MIN = 220;
+var PLATFORM_SPACING_MAX = 340;
+var PLATFORM_X_MARGIN = 120;
+var CAMERA_OFFSET = 900; // How far from bottom the player is kept
// --- State ---
-var chips = [];
-var selectedChip = null;
-var puzzleSolved = false;
-// --- Draw case (border + inner) ---
-var caseBorder = LK.getAsset('caseBorder', {
- anchorX: 0,
- anchorY: 0,
- x: CASE_X - 10,
- y: CASE_Y - 10
+var platforms = [];
+var player = null;
+var vy = 0;
+var vx = 0;
+var isJumping = false;
+var isTouching = false;
+var touchStartX = 0;
+var cameraY = 0;
+var maxHeight = 0;
+var gameOver = false;
+// --- Assets ---
+var playerAsset = LK.getAsset('chipBlue', {
+ anchorX: 0.5,
+ anchorY: 1,
+ scaleX: PLAYER_W / 320,
+ scaleY: PLAYER_H / 320
});
-game.addChild(caseBorder);
-var caseRect = LK.getAsset('caseRect', {
- anchorX: 0,
- anchorY: 0,
- x: CASE_X,
- y: CASE_Y
+var platformAsset = LK.getAsset('caseRect', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: PLATFORM_W / 1100,
+ scaleY: PLATFORM_H / 700
});
-game.addChild(caseRect);
-// --- Add chips in initial positions (scattered, not solved) ---
-var chipStartPos = [
-// Spread out, not solved
-{
- x: CASE_X + CASE_W / 2 - CHIP_RADIUS,
- y: CASE_Y + CHIP_RADIUS + 30,
- rot: 0
-}, {
- x: CASE_X + CHIP_RADIUS + 40,
- y: CASE_Y + CASE_H - CHIP_RADIUS - 40,
- rot: 0.2
-}, {
- x: CASE_X + CASE_W - CHIP_RADIUS - 40,
- y: CASE_Y + CASE_H - CHIP_RADIUS - 40,
- rot: -0.2
-}, {
- x: CASE_X + CHIP_RADIUS + 60,
- y: CASE_Y + CHIP_RADIUS + 60,
- rot: 0.5
-}, {
- x: CASE_X + CASE_W - CHIP_RADIUS - 60,
- y: CASE_Y + CHIP_RADIUS + 60,
- rot: -0.5
-}, {
- x: CASE_X + CASE_W / 2 + CHIP_RADIUS / 2,
- y: CASE_Y + CASE_H / 2,
- rot: 0.8
-}];
-for (var i = 0; i < 6; ++i) {
- var chip = new PokerChip();
- chip.assetId = CHIP_COLORS[i];
- chip.x = chipStartPos[i].x;
- chip.y = chipStartPos[i].y;
- chip.rotation = chipStartPos[i].rot;
- chips.push(chip);
- game.addChild(chip);
-}
-// --- Minimalist title text ---
-var titleTxt = new Text2('Impossible Casino Puzzle', {
+// --- UI ---
+var scoreTxt = new Text2('0', {
size: 90,
- fill: 0xF1F5F9
+ fill: 0xffffff
});
-titleTxt.anchor.set(0.5, 0);
-titleTxt.x = 2048 / 2;
-titleTxt.y = 80;
-LK.gui.top.addChild(titleTxt);
-// --- Instructions text ---
-var instrTxt = new Text2('Fit all 6 chips inside the case.\nDrag to move, rotate using the small handle.', {
- size: 54,
- fill: 0xB3B3B3
-});
-instrTxt.anchor.set(0.5, 0);
-instrTxt.x = 2048 / 2;
-instrTxt.y = 200;
-LK.gui.top.addChild(instrTxt);
-// --- Success text (hidden until solved) ---
-var solvedTxt = new Text2('Perfect! Puzzle Solved.', {
- size: 110,
- fill: 0x22C55E
-});
-solvedTxt.anchor.set(0.5, 0.5);
-solvedTxt.x = 2048 / 2;
-solvedTxt.y = CASE_Y + CASE_H / 2;
-solvedTxt.visible = false;
-game.addChild(solvedTxt);
-// --- Helper: check if a chip is fully inside the case ---
-function chipInsideCase(chip) {
- // Get chip center in game coords
- var cx = chip.x,
- cy = chip.y;
- // All points on chip's circumference must be inside case
- // Since chip is a circle, just check that the farthest point in any direction is inside
- if (cx - CHIP_RADIUS < CASE_X + CASE_BORDER) return false;
- if (cy - CHIP_RADIUS < CASE_Y + CASE_BORDER) return false;
- if (cx + CHIP_RADIUS > CASE_X + CASE_W - CASE_BORDER) return false;
- if (cy + CHIP_RADIUS > CASE_Y + CASE_H - CASE_BORDER) return false;
- return true;
+scoreTxt.anchor.set(0.5, 0);
+scoreTxt.x = GAME_W / 2;
+scoreTxt.y = 60;
+LK.gui.top.addChild(scoreTxt);
+// --- Helper: create a platform at (x, y) ---
+function createPlatform(x, y) {
+ var plat = new Container();
+ var platGfx = plat.attachAsset('caseRect', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: PLATFORM_W / 1100,
+ scaleY: PLATFORM_H / 700
+ });
+ plat.x = x;
+ plat.y = y;
+ plat.width = PLATFORM_W;
+ plat.height = PLATFORM_H;
+ game.addChild(plat);
+ platforms.push(plat);
+ return plat;
}
-// --- Helper: check if two chips overlap ---
-function chipsOverlap(chipA, chipB) {
- var dx = chipA.x - chipB.x;
- var dy = chipA.y - chipB.y;
- var dist = Math.sqrt(dx * dx + dy * dy);
- // Allow a tiny epsilon for floating point
- return dist < CHIP_DIAM - 2;
-}
-// --- Helper: check if all chips are inside and non-overlapping ---
-function checkSolved() {
- // All chips inside
- for (var i = 0; i < chips.length; ++i) {
- if (!chipInsideCase(chips[i])) return false;
+// --- Helper: reset game state ---
+function resetGame() {
+ // Remove old platforms
+ for (var i = 0; i < platforms.length; ++i) {
+ platforms[i].destroy();
}
- // No overlaps
- for (var i = 0; i < chips.length; ++i) {
- for (var j = i + 1; j < chips.length; ++j) {
- if (chipsOverlap(chips[i], chips[j])) return false;
+ platforms = [];
+ // Remove player
+ if (player) player.destroy();
+ // Create player
+ player = new Container();
+ var pGfx = player.attachAsset('chipBlue', {
+ anchorX: 0.5,
+ anchorY: 1,
+ scaleX: PLAYER_W / 320,
+ scaleY: PLAYER_H / 320
+ });
+ player.x = GAME_W / 2;
+ player.y = GAME_H - 400;
+ player.width = PLAYER_W;
+ player.height = PLAYER_H;
+ game.addChild(player);
+ vy = 0;
+ vx = 0;
+ isJumping = false;
+ isTouching = false;
+ cameraY = 0;
+ maxHeight = 0;
+ gameOver = false;
+ // Create initial platforms
+ var y = GAME_H - 200;
+ for (var i = 0; i < 12; ++i) {
+ var px = Math.random() * (GAME_W - PLATFORM_X_MARGIN * 2) + PLATFORM_X_MARGIN;
+ createPlatform(px, y);
+ y -= Math.random() * (PLATFORM_SPACING_MAX - PLATFORM_SPACING_MIN) + PLATFORM_SPACING_MIN;
+ }
+ // Sort platforms by y
+ platforms.sort(function (a, b) {
+ return a.y - b.y;
+ });
+ // Score
+ scoreTxt.setText('0');
+}
+// --- Helper: check collision between player and platform ---
+function playerOnPlatform() {
+ for (var i = 0; i < platforms.length; ++i) {
+ var plat = platforms[i];
+ // Only check if player is falling
+ if (vy >= 0) {
+ var px = player.x;
+ var py = player.y;
+ var platTop = plat.y - PLATFORM_H / 2;
+ var platLeft = plat.x - PLATFORM_W / 2;
+ var platRight = plat.x + PLATFORM_W / 2;
+ // Check if player's feet are just above platform
+ if (py >= platTop && py <= platTop + vy + 8) {
+ if (px > platLeft && px < platRight) {
+ return plat;
+ }
+ }
}
}
- return true;
+ return null;
}
-// --- Helper: snap chip inside case if slightly out ---
-function snapChipIntoCase(chip) {
- var minX = CASE_X + CASE_BORDER + CHIP_RADIUS;
- var maxX = CASE_X + CASE_W - CASE_BORDER - CHIP_RADIUS;
- var minY = CASE_Y + CASE_BORDER + CHIP_RADIUS;
- var maxY = CASE_Y + CASE_H - CASE_BORDER - CHIP_RADIUS;
- if (chip.x < minX) chip.x = minX;
- if (chip.x > maxX) chip.x = maxX;
- if (chip.y < minY) chip.y = minY;
- if (chip.y > maxY) chip.y = maxY;
-}
-// --- Drag/rotate logic ---
-// Only one chip can be selected at a time
+// --- Touch controls: left/right jump ---
game.down = function (x, y, obj) {
- if (puzzleSolved) return;
- // Find topmost chip under pointer
- for (var i = chips.length - 1; i >= 0; --i) {
- var chip = chips[i];
- var local = chip.toLocal({
- x: x,
- y: y
- });
- // Check if pointer is inside chip circle or handle
- var dx = local.x,
- dy = local.y;
- if (dx * dx + dy * dy < CHIP_RADIUS * CHIP_RADIUS) {
- selectedChip = chip;
- chip.down(x, y, obj);
- break;
+ if (gameOver) return;
+ isTouching = true;
+ touchStartX = x;
+ // If player is on ground/platform, jump
+ if (!isJumping) {
+ vy = JUMP_VELOCITY;
+ // Direction: left or right half of screen
+ if (x < GAME_W / 2) {
+ vx = -MOVE_SPEED;
+ } else {
+ vx = MOVE_SPEED;
}
+ isJumping = true;
}
};
game.up = function (x, y, obj) {
- if (selectedChip) {
- selectedChip.up(x, y, obj);
- // Snap into case if needed
- snapChipIntoCase(selectedChip);
- selectedChip = null;
- }
+ isTouching = false;
+ vx = 0;
};
game.move = function (x, y, obj) {
- if (puzzleSolved) return;
- if (!selectedChip) return;
- var chip = selectedChip;
- if (chip.isDragging) {
- chip.x = x - chip.dragOffsetX;
- chip.y = y - chip.dragOffsetY;
- } else if (chip.isRotating) {
- var cx = chip.x,
- cy = chip.y;
- var angle = Math.atan2(y - cy, x - cx);
- chip.rotation = chip.startRotation + (angle - chip.startAngle);
+ // Optionally, allow swiping to control direction
+ if (isTouching && !gameOver) {
+ if (x < GAME_W / 2) {
+ vx = -MOVE_SPEED;
+ } else {
+ vx = MOVE_SPEED;
+ }
}
};
-// --- Main update loop: check for solved state, animate solved text ---
+// --- Main update loop ---
game.update = function () {
- if (puzzleSolved) return;
- // After every move, check for solved
- if (checkSolved()) {
- puzzleSolved = true;
- solvedTxt.visible = true;
- // Animate solved text
- solvedTxt.scaleX = solvedTxt.scaleY = 0.7;
- tween(solvedTxt, {
- scaleX: 1,
- scaleY: 1
- }, {
- duration: 600,
- easing: tween.elasticOut
+ if (gameOver) return;
+ // Physics
+ vy += GRAVITY;
+ player.x += vx;
+ player.y += vy;
+ // Clamp player to screen
+ if (player.x < PLAYER_W / 2) player.x = PLAYER_W / 2;
+ if (player.x > GAME_W - PLAYER_W / 2) player.x = GAME_W - PLAYER_W / 2;
+ // Platform collision
+ var plat = playerOnPlatform();
+ if (plat && vy > 0) {
+ player.y = plat.y - PLATFORM_H / 2;
+ vy = JUMP_VELOCITY;
+ isJumping = false;
+ } else {
+ isJumping = true;
+ }
+ // Camera follows player upward
+ if (player.y < GAME_H - CAMERA_OFFSET) {
+ var diff = GAME_H - CAMERA_OFFSET - player.y;
+ cameraY += diff;
+ // Move all platforms and player down by diff
+ for (var i = 0; i < platforms.length; ++i) {
+ platforms[i].y += diff;
+ }
+ player.y += diff;
+ maxHeight += diff;
+ }
+ // Remove platforms that are off screen, add new ones at top
+ for (var i = platforms.length - 1; i >= 0; --i) {
+ if (platforms[i].y > GAME_H + 100) {
+ platforms[i].destroy();
+ platforms.splice(i, 1);
+ }
+ }
+ // Add new platforms if needed
+ while (platforms.length < 12) {
+ var topY = platforms[0].y;
+ var newY = topY - Math.random() * (PLATFORM_SPACING_MAX - PLATFORM_SPACING_MIN) - PLATFORM_SPACING_MIN;
+ var px = Math.random() * (GAME_W - PLATFORM_X_MARGIN * 2) + PLATFORM_X_MARGIN;
+ var plat = createPlatform(px, newY);
+ // Keep sorted
+ platforms.sort(function (a, b) {
+ return a.y - b.y;
});
- // Flash case green
- LK.effects.flashObject(caseRect, 0x22c55e, 900);
- // Show win popup
+ }
+ // Score: based on maxHeight climbed
+ var score = Math.floor(maxHeight / 10);
+ scoreTxt.setText(score.toString());
+ // Game over: fall below screen
+ if (player.y > GAME_H + 200) {
+ gameOver = true;
LK.setTimeout(function () {
- LK.showYouWin();
- }, 1200);
+ LK.showGameOver();
+ }, 800);
}
-};
\ No newline at end of file
+};
+// --- Start game ---
+resetGame();
\ No newline at end of file
icy tower guy. In-Game asset. 2d. High contrast. No shadows
mario or icy tower like platforms. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
icy tower advanced level platform. In-Game asset. 2d. High contrast. No shadows
diamond. In-Game asset. 2d. High contrast. No shadows
dollar. In-Game asset. 2d. High contrast. No shadows
Design a single floating 2D game platform made of levitating crystal shards, connected by glowing magical runes or light energy. No ice or snow. The platform should feel arcane and unique. No background.. In-Game asset. 2d. High contrast. No shadows
rectangle shape jumping platform for a simple 2D game. In-Game asset. 2d. High contrast. No shadows
super mario facing camera. In-Game asset. 2d. High contrast. No shadows
blue transparent cloud. In-Game asset. 2d. High contrast. No shadows
bright transparent cloud. In-Game asset. 2d. High contrast. No shadows
fluffy transparent cloud. In-Game asset. 2d. High contrast. No shadows
orange transparent cloud. In-Game asset. 2d. High contrast. No shadows
grey transparent cloud. In-Game asset. 2d. High contrast. No shadows
star. In-Game asset. 2d. High contrast. No shadows
icy tower background without platforms, just walls. In-Game asset. 2d. High contrast. No shadows
just a start line without any text. In-Game asset. 2d. High contrast. No shadows
stuart little jumping and raised its arms. In-Game asset. 2d. High contrast. No shadows. facing camera
shout
Sound effect
fall
Sound effect
darara
Music
garavel-1
Sound effect
garavel-2
Sound effect
garavel-3
Sound effect
garavel-4
Sound effect
garavel-5
Sound effect
death-1
Sound effect
death-2
Sound effect
opening-sound
Sound effect
opening-music
Music
game-theme-song-1
Music
game-theme-song-2
Music
game-theme-song-3
Music
game-theme-song-4
Music