User prompt
When reaching level 5000, don’t have only platforms; the game shouldn’t stop, and the character should keep jumping
User prompt
Instead of 'Game Over', display the text 'Mehmet kidnapped Emre'.
User prompt
After level 5000, no more platforms will appear, and if the player loses, the message will be: “Emre has kidnapped Mehmet.” If the player wins, the message will say: “Congratulations! You’ve rescued your girlfriend!”
User prompt
Reveal the one inside the cage as a new image, not as a playable character.
User prompt
Increase the distance between the balls a bit more, and make the two balls that rise upward different from each other
User prompt
There are now 4 balls — remove the ones on the left, and arrange the right-side balls side by side instead of stacking them.
User prompt
Revert to the previous state.
User prompt
The balls that are separate from us should move side by side
User prompt
When the player reaches level 5000, a large key should appear right in the center. When the key is collected, the game should end and the player should win.
User prompt
After level 2500, the gaps between platforms become too large and the ball can't keep up. So, don’t increase the distance between platforms after level 2200 — only make the side balls speed up more
User prompt
The side balls should rise at a speed that is neither as fast as before nor as slow as now—somewhere in between.
User prompt
Towards the end, have the balls on the side rise a bit slower.
User prompt
Reduce the distance between the platforms a bit more, and increase the speed of the balls on the side by 50%.
User prompt
Make the distances between platforms short enough to be jumpable, and have the balls that rise with us move up much faster. At the start of the game, they should move slowly and gradually speed up, but they should never fall below the bottom of the screen.
User prompt
If our ball rises very quickly, the ball inside the cage and the one next to it should rise even faster.
User prompt
Make our ball move by dragging
User prompt
Make our ball move when the screen is tapped, not dragged.
User prompt
If the ball inside the cage goes off the top of the screen, the game should be over.
User prompt
Make the character jump a little higher.
User prompt
At the start, there must be a platform exactly below us. Also, as we ascend, there should be two rising balls on the far right side of the screen — one inside a cage and the other outside the cage. They should not be touchable; just serve as part of the background.
User prompt
Make the character jump a little higher.
Code edit (1 edits merged)
Please save this source code
User prompt
Sky Hopper
Initial prompt
make me a game like doodle jump
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Platform = Container.expand(function (type) {
var self = Container.call(this);
self.type = type || 'regular';
self.broken = false;
var assetName = 'platform';
if (self.type === 'moving') assetName = 'movingPlatform';else if (self.type === 'breakable') assetName = 'breakablePlatform';else if (self.type === 'spring') assetName = 'springPlatform';
var platformGraphics = self.attachAsset(assetName, {
anchorX: 0.5,
anchorY: 0.5
});
self.direction = Math.random() > 0.5 ? 1 : -1;
self.speed = 2;
self.update = function () {
if (self.type === 'moving' && !self.broken) {
self.x += self.direction * self.speed;
if (self.x < 100 || self.x > 1948) {
self.direction *= -1;
}
}
};
self.onPlayerLand = function () {
if (self.type === 'breakable' && !self.broken) {
self.broken = true;
tween(self, {
alpha: 0
}, {
duration: 200
});
LK.getSound('break').play();
} else if (self.type === 'spring') {
player.springJump();
tween(self, {
scaleY: 0.5
}, {
duration: 100,
onFinish: function onFinish() {
tween(self, {
scaleY: 1
}, {
duration: 100
});
}
});
}
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityY = 0;
self.gravity = 0.8;
self.jumpStrength = -26;
self.horizontalSpeed = 8;
self.isJumping = true;
self.update = function () {
// Apply gravity
self.velocityY += self.gravity;
self.y += self.velocityY;
// Horizontal movement boundaries
if (self.x < 40) self.x = 40;
if (self.x > 2008) self.x = 2008;
// Check platform collisions only when falling
if (self.velocityY > 0) {
for (var i = 0; i < platforms.length; i++) {
var platform = platforms[i];
if (self.intersects(platform) && self.y < platform.y) {
self.jump();
platform.onPlayerLand();
break;
}
}
}
};
self.jump = function () {
self.velocityY = self.jumpStrength;
self.isJumping = true;
LK.getSound('jump').play();
};
self.springJump = function () {
self.velocityY = self.jumpStrength * 1.5;
self.isJumping = true;
LK.getSound('spring').play();
};
return self;
});
var RisingBall = Container.expand(function (hasCage) {
var self = Container.call(this);
self.hasCage = hasCage || false;
self.riseSpeed = 0.45;
if (self.hasCage) {
var cage = self.attachAsset('ballCage', {
anchorX: 0.5,
anchorY: 0.5
});
cage.alpha = 0.7;
var ball = self.attachAsset('character', {
anchorX: 0.5,
anchorY: 0.5
});
ball.alpha = 0.8;
} else {
var ball = self.attachAsset('risingBall', {
anchorX: 0.5,
anchorY: 0.5
});
ball.alpha = 0.8;
}
self.update = function () {
// Base speed increases with game progression (height climbed)
var progressMultiplier = 1 + Math.max(0, (2732 - player.y) / 2000);
// Slow down progression at high levels (towards the end)
var endGameHeight = 2732 - player.y;
if (endGameHeight > 1500) {
// Reduce multiplier for late game - moderate reduction
var lateGameReduction = Math.min(0.4, (endGameHeight - 1500) / 1000);
progressMultiplier *= 1 - lateGameReduction;
}
// Additional speed boost based on player's upward velocity
var velocityMultiplier = 1;
if (player.velocityY < -10) {
// Player is rising quickly - moderate speed boost
velocityMultiplier = 1.5 + Math.abs(player.velocityY) / 15;
}
// Combine both multipliers for final speed
var totalSpeed = self.riseSpeed * progressMultiplier * velocityMultiplier;
self.y -= totalSpeed;
// Prevent balls from going below bottom of screen
if (self.y > cameraY + 2732) {
self.y = cameraY + 2732;
}
// Reset position when too far above camera
if (self.y < cameraY - 1000) {
self.y = cameraY + 3000;
}
};
return self;
});
var WinKey = Container.expand(function () {
var self = Container.call(this);
var keyGraphics = self.attachAsset('winKey', {
anchorX: 0.5,
anchorY: 0.5
});
// Add visual effects to make the key stand out
self.animationTime = 0;
self.update = function () {
// Floating animation
self.animationTime += 0.1;
keyGraphics.y = Math.sin(self.animationTime) * 10;
// Rotation animation
keyGraphics.rotation += 0.05;
// Pulsing scale effect
var scale = 1 + Math.sin(self.animationTime * 2) * 0.2;
keyGraphics.scaleX = scale;
keyGraphics.scaleY = scale;
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
var player;
var platforms = [];
var cameraY = 0;
var highestY = 2732;
var platformSpacing = 200;
var lastPlatformY = 2732;
var risingBalls = [];
var winKey = null;
var keySpawned = false;
// UI Elements
var heightText = new Text2('Height: 0m', {
size: 60,
fill: 0xFFFFFF
});
heightText.anchor.set(0.5, 0);
LK.gui.top.addChild(heightText);
// Initialize player
player = game.addChild(new Player());
player.x = 1024;
player.y = 2500;
// Create starting platform directly below player
var startPlatform = new Platform('regular');
startPlatform.x = 1024;
startPlatform.y = 2600;
platforms.push(startPlatform);
game.addChild(startPlatform);
// Create rising balls on right side, positioned side by side with more distance
var rightCagedBall = new RisingBall(true);
rightCagedBall.x = 1750;
rightCagedBall.y = 2400;
risingBalls.push(rightCagedBall);
game.addChild(rightCagedBall);
var rightFreeBall = new RisingBall(false);
rightFreeBall.x = 1950;
rightFreeBall.y = 2400;
risingBalls.push(rightFreeBall);
game.addChild(rightFreeBall);
// Create initial platforms
for (var i = 0; i < 15; i++) {
createPlatform();
}
function createPlatform() {
var platformType = 'regular';
var rand = Math.random();
// Platform type probabilities
if (rand < 0.1) platformType = 'spring';else if (rand < 0.25) platformType = 'breakable';else if (rand < 0.4) platformType = 'moving';
var platform = new Platform(platformType);
platform.x = Math.random() * 1600 + 224; // Keep platforms within bounds
platform.y = lastPlatformY - platformSpacing;
// Increase difficulty with height - reduced spacing for jumpability
var heightFactor = Math.max(0, (2732 - lastPlatformY) / 1000);
// Cap platform spacing after level 2200 to keep gaps jumpable
var currentLevel = Math.floor((2732 - lastPlatformY) / 10);
if (currentLevel > 2200) {
// Use spacing from level 2200 and don't increase further
var cappedHeightFactor = Math.max(0, (2732 - (2732 - 2200 * 10)) / 1000);
platformSpacing = 60 + Math.random() * 30 + cappedHeightFactor * 15;
} else {
platformSpacing = 60 + Math.random() * 30 + heightFactor * 15;
}
platforms.push(platform);
game.addChild(platform);
lastPlatformY = platform.y;
}
// Drag controls
var isDragging = false;
game.down = function (x, y, obj) {
isDragging = true;
player.x = x;
};
game.move = function (x, y, obj) {
if (isDragging) {
player.x = x;
}
};
game.up = function (x, y, obj) {
isDragging = false;
};
game.update = function () {
// Update camera to follow player
var targetCameraY = player.y - 1500;
if (targetCameraY < cameraY) {
cameraY = targetCameraY;
game.y = -cameraY;
}
// Update highest point reached
if (player.y < highestY) {
highestY = player.y;
var height = Math.floor((2732 - highestY) / 10);
LK.setScore(height);
heightText.setText('Height: ' + height + 'm');
// Spawn win key at level 5000
if (height >= 5000 && !keySpawned) {
winKey = new WinKey();
winKey.x = 1024; // Center of screen
winKey.y = player.y - 200; // Above player
game.addChild(winKey);
keySpawned = true;
}
}
// Check for key collection
if (winKey && player.intersects(winKey)) {
LK.showYouWin();
return;
}
// Generate new platforms as player climbs
while (lastPlatformY > cameraY - 500) {
createPlatform();
}
// Remove platforms that are too far below
for (var i = platforms.length - 1; i >= 0; i--) {
var platform = platforms[i];
if (platform.y > cameraY + 3000) {
platform.destroy();
platforms.splice(i, 1);
}
}
// Check if caged ball goes off screen top
for (var i = 0; i < risingBalls.length; i++) {
var ball = risingBalls[i];
if (ball.hasCage && ball.y < cameraY - 100) {
LK.showGameOver();
return;
}
}
// Game over if player falls below screen
if (player.y > cameraY + 2732 + 200) {
LK.showGameOver();
}
}; ===================================================================
--- original.js
+++ change.js
@@ -104,9 +104,9 @@
anchorX: 0.5,
anchorY: 0.5
});
cage.alpha = 0.7;
- var ball = self.attachAsset('player', {
+ var ball = self.attachAsset('character', {
anchorX: 0.5,
anchorY: 0.5
});
ball.alpha = 0.8;
cloud 200x20. In-Game asset. 2d. High contrast. No shadows
wood platform 200x20. In-Game asset. 2d. High contrast. No shadows
trampoline 200x20. In-Game asset. 2d. High contrast. No shadows
black cage. In-Game asset. 2d. High contrast. No shadows
yellow key. In-Game asset. 2d. High contrast. No shadows