User prompt
skor yazısını baştan yap ya
User prompt
skor yazısınını 100x büyütür müsün
User prompt
skoru eski haline getir
User prompt
skor okunmuyor çok küçük kalmış, karakter sadece hareket ederken iz olsun hep gözükmesin
User prompt
karakktere bir tray ekler misin, bir de sağa giderken hafif sol yapsın sola giderken hafif sağ yapsın, bir de skorun yazısını beyaz renk yapar mısın fontu da bold olsun
User prompt
oyun her 1000 metrede bir 2x değil 0.2x hızlansın
User prompt
engeller 1 saniye sonra gelmeye başlasın
User prompt
oyun her 1000 metrede 2x hızlansın, aldığımız sarı toplar + diye gözükmesin direkt eklensin
User prompt
karakter yine y ekseninde ortada başlasın sadece duvarları en alttan başlatalım
User prompt
duvarları kaldıralım ya da oyunun en altından başlatalım
User prompt
sol engelleri y ekseninde yansıt, sağ soldaki duvarı kaldır olmasın hiç
User prompt
soldaki engellerin assetini yansıt sağa baksınlar
User prompt
soldaki engelleri yansıtsana attığım asset ters duruyor
User prompt
Karakter y ekseninde ekranın tam ortasında dursun
User prompt
kırmızı objenin başlangıç noktasını y ekseninde 2 birim eksilt
User prompt
kırmızı obje 2 kat geride başlasın
User prompt
obje ekranın ortasında başlasın
User prompt
oyunu ortada oynalayım ileride gidiyor obje ekranın
User prompt
tepkisini hızlandır bastığım halde atlamadı karşıya
User prompt
sarı objeyi de sonsuz ekle, beyaz engellerin arasını %10 arttır, bir de oyuna fizik ekle çok küt atlayışlar daha smooth olsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
beyaz engeller bitti düzeltir misin
User prompt
yahu, şu lacivert kısmı ya hiç koyma ya devam ettir, beyaz engeller neden en alta değince değişiyor sonsuza devam etsinler
User prompt
baştan tüm bugları çöz ya yanlış yapıyorsun
User prompt
oyun infinite runner, sürekli devam etsin yukarıdan aşağıya
User prompt
sağ ve solun aralığını kıs, engeller en alta değince yok olsunlar, arkaplan siyah olsun engeller beyaz olsun
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Bonus class var Bonus = Container.expand(function () { var self = Container.call(this); var bonusGfx = self.attachAsset('bonus', { anchorX: 0.5, anchorY: 0.5 }); // Update: move down (relative to world) self.update = function (speed) { self.y += speed; }; return self; }); // Climber (player) class var Climber = Container.expand(function () { var self = Container.call(this); // Add tray under climber var trayGfx = self.attachAsset('bonus', { anchorX: 0.5, anchorY: 0.0, scaleX: 1.2, scaleY: 0.35, y: 70 }); trayGfx.alpha = 0.7; trayGfx.visible = false; // Tray is hidden by default var climberGfx = self.attachAsset('climber', { anchorX: 0.5, anchorY: 0.5 }); // State: which wall (0 = left, 1 = right) self.wallSide = 0; // Vertical speed (pixels per tick) self.vy = 10; // Horizontal jump speed (pixels per tick) self.vx = 0; // Is currently jumping self.isJumping = false; // Target wall x self.targetX = 0; // Jump to the other wall self.jump = function () { // If already jumping, allow to interrupt and jump to the other wall if (self.isJumping) { // Instantly stop current tween by setting isJumping to false self.isJumping = false; } self.wallSide = 1 - self.wallSide; self.isJumping = true; trayGfx.visible = true; // Show tray when jumping // Set target x (climber sits just outside the wall, not inside) if (self.wallSide === 0) { self.targetX = wallLeftX + wallWidth / 2 + climberWidth / 2 + 2; } else { self.targetX = wallRightX - wallWidth / 2 - climberWidth / 2 - 2; } // Add a diagonal jump: also move y a bit up, then back to fixed y var jumpPeakY = self.y - 180; // jump up by 180px var originalY = self.y; // Animate jump with smooth physics using easing for both X and Y // Tilt climber during jump var tilt = self.wallSide === 0 ? -0.25 : 0.25; tween(self.children[1], { rotation: tilt }, { duration: 120, easing: tween.cubicOut }); tween(self, { x: self.targetX, y: jumpPeakY }, { duration: 180, easing: tween.cubicOut, onFinish: function onFinish() { // Fall back to original y with smooth ease tween(self, { y: originalY }, { duration: 180, easing: tween.bounceOut, onFinish: function onFinish() { self.x = self.targetX; self.isJumping = false; trayGfx.visible = false; // Hide tray when jump ends // Return tilt to neutral tween(self.children[1], { rotation: 0 }, { duration: 180, easing: tween.cubicOut }); } }); } }); }; // Update: move up self.update = function () { self.y -= self.vy; }; return self; }); // Obstacle class var Obstacle = Container.expand(function () { var self = Container.call(this); var obsGfx = self.attachAsset('obstacle', { anchorX: 0.5, anchorY: 0.5 }); // Update: move down (relative to world) self.update = function (speed) { self.y += speed; }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // --- Constants --- var wallWidth = 180; var climberWidth = 120; var climberHeight = 120; // Make the gap between walls much narrower and ensure climber fits var wallGap = 420; var wallLeftX = (2048 - wallGap) / 2 - wallWidth / 2; var wallRightX = (2048 + wallGap) / 2 + wallWidth / 2; var playTopMargin = 100; // leave top 100px for menu var playBottomMargin = 0; // --- State --- var climber; var obstacles = []; var bonuses = []; var distance = 0; // in pixels var bonusScore = 0; var scrollSpeed = 18; // initial vertical speed (pixels per tick) - increased for faster game var speedIncreaseEvery = 400; // increase speed more frequently var speedIncreaseAmount = 1.2; // increase speed more per step var maxScrollSpeed = 48; // allow higher max speed var lastObstacleY = 0; var lastBonusY = 0; var obstacleSpacing = 420 * 1.1; // min vertical distance between obstacles, increased by 10% var bonusSpacing = 900; // min vertical distance between bonuses var scoreTxt; // --- Walls --- // Walls removed: no wall graphics are added to the game // --- Climber --- climber = new Climber(); climber.x = wallLeftX + wallWidth / 2 + climberWidth / 2; climber.y = 2732 / 2; // start at vertical center of the screen game.addChild(climber); // --- Score Display --- scoreTxt = new Text2('0 m', { size: 220, fill: 0xFFFFFF, font: "bold 220px Arial" }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // --- Helper: format distance --- function formatDistance(px) { var meters = Math.floor(px / 10); if (meters < 1000) return meters + " m"; return (meters / 1000).toFixed(2) + " km"; } // --- Helper: update score text --- function updateScoreText() { var meters = Math.floor(distance / 10); if (bonusScore > 0) { scoreTxt.setText(meters + " m +" + bonusScore); } else { scoreTxt.setText(meters + " m"); } } // --- Helper: spawn obstacle --- function spawnObstacle() { // Randomly pick left or right wall var side = Math.random() < 0.5 ? 0 : 1; var obs = new Obstacle(); if (side === 0) { obs.x = wallLeftX + wallWidth / 2 + climberWidth / 2 + 2; obs.children[0].flipX = 1; // Mirror horizontally for left-side obstacles } else { obs.x = wallRightX - wallWidth / 2 - climberWidth / 2 - 2; obs.children[0].flipX = 0; // No flip for right-side obstacles } obs.y = lastObstacleY - obstacleSpacing - Math.random() * 220; obstacles.push(obs); game.addChild(obs); lastObstacleY = obs.y; } // --- Helper: spawn bonus --- function spawnBonus() { var bonus = new Bonus(); bonus.x = 2048 / 2; bonus.y = lastBonusY - bonusSpacing - Math.random() * 400; bonuses.push(bonus); game.addChild(bonus); lastBonusY = bonus.y; } // --- Initial obstacles/bonuses --- // Start obstacles and bonuses from the bottom of the screen lastObstacleY = 2732 - climberHeight / 2; lastBonusY = 2732 - climberHeight / 2; // Delay obstacle and bonus spawning by 1 second LK.setTimeout(function () { for (var i = 0; i < 6; i++) { spawnObstacle(); } for (var i = 0; i < 2; i++) { spawnBonus(); } }, 1000); // --- Input: tap to jump --- game.down = function (x, y, obj) { // Allow jump if not already moving to the same wall (ignore isJumping) var nextWall = 1 - climber.wallSide; // Only allow jump if not already moving to that wall if (!(climber.isJumping && climber.targetX === (nextWall === 0 ? wallLeftX + wallWidth / 2 + climberWidth / 2 + 2 : wallRightX - wallWidth / 2 - climberWidth / 2 - 2))) { climber.jump(); } }; // --- Move handler (not used for drag, but required by LK) --- game.move = function (x, y, obj) {}; // --- Main update loop --- game.update = function () { // Increase speed every 1000 meters (10,000 pixels) if (!game.lastSpeedMilestone) game.lastSpeedMilestone = 0; var metersNow = Math.floor(distance / 10); if (metersNow - game.lastSpeedMilestone >= 1000) { scrollSpeed *= 1.2; if (scrollSpeed > maxScrollSpeed) scrollSpeed = maxScrollSpeed; climber.vy = scrollSpeed; game.lastSpeedMilestone += 1000; } // Keep climber fixed at the vertical center of the screen, move obstacles/bonuses down by scrollSpeed var screenClimberY = 2732 / 2; // fixed Y position for climber at vertical center climber.y = screenClimberY; // Move all obstacles and bonuses down by scrollSpeed for (var i = 0; i < obstacles.length; i++) { obstacles[i].y += scrollSpeed; } for (var j = 0; j < bonuses.length; j++) { bonuses[j].y += scrollSpeed; } // Walls removed: no wall movement needed // Update distance distance += scrollSpeed; updateScoreText(); // Move obstacles and check collision for (var i = obstacles.length - 1; i >= 0; i--) { var obs = obstacles[i]; // If obstacle goes off the bottom, move it back to the top with new random Y and side if (obs.y > 2732 + 100) { // Randomly pick left or right wall var side = Math.random() < 0.5 ? 0 : 1; if (side === 0) { obs.x = wallLeftX + wallWidth / 2 + climberWidth / 2 + 2; obs.children[0].flipX = 1; // Mirror horizontally for left-side obstacles } else { obs.x = wallRightX - wallWidth / 2 - climberWidth / 2 - 2; obs.children[0].flipX = 0; // No flip for right-side obstacles } // Place above the highest obstacle var highestY = climber.y - 400; for (var k = 0; k < obstacles.length; k++) { if (obstacles[k].y < highestY) highestY = obstacles[k].y; } obs.y = highestY - obstacleSpacing - Math.random() * 220; lastObstacleY = obs.y; } // Collision: only if climber is on same wall and overlaps in Y if (Math.abs(obs.x - climber.x) < climberWidth / 2 + 10 && Math.abs(obs.y - screenClimberY) < climberHeight / 2 + 30) { LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); return; } } // Move bonuses and check collection for (var j = bonuses.length - 1; j >= 0; j--) { var b = bonuses[j]; // If bonus goes off the bottom, move it back to the top (like obstacles) if (b.y > 2732 + 100) { // Place above the highest bonus var highestBonusY = climber.y - 800; for (var k = 0; k < bonuses.length; k++) { if (bonuses[k].y < highestBonusY) highestBonusY = bonuses[k].y; } b.y = highestBonusY - bonusSpacing - Math.random() * 400; lastBonusY = b.y; continue; } // Collect if (Math.abs(b.x - climber.x) < climberWidth / 2 + 40 && Math.abs(b.y - screenClimberY) < climberHeight / 2 + 40) { bonusScore += 10; updateScoreText(); LK.effects.flashObject(b, 0xffff00, 400); // Move collected bonus to top (infinite) var highestBonusY = climber.y - 800; for (var k = 0; k < bonuses.length; k++) { if (bonuses[k].y < highestBonusY) highestBonusY = bonuses[k].y; } b.y = highestBonusY - bonusSpacing - Math.random() * 400; lastBonusY = b.y; continue; } } // Spawn new obstacles/bonuses as needed for infinite runner while (lastObstacleY > climber.y - 1200) { spawnObstacle(); } while (lastBonusY > climber.y - 1800) { spawnBonus(); } }; // --- Reset state on game over --- game.on('gameover', function () { // All state will be reset by LK, so nothing to do here }); // --- You win (not used in endless) --- game.on('youwin', function () { // Not used });
===================================================================
--- original.js
+++ change.js
@@ -166,11 +166,11 @@
climber.y = 2732 / 2; // start at vertical center of the screen
game.addChild(climber);
// --- Score Display ---
scoreTxt = new Text2('0 m', {
- size: 22000,
+ size: 220,
fill: 0xFFFFFF,
- font: "bold 22000px Arial"
+ font: "bold 220px Arial"
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// --- Helper: format distance ---
make cyberpunk retro, neon wall. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Make pixelart neon wall obstacle. In-Game asset. 2d. High contrast. No shadows
toony basic flame. In-Game asset. 2d. High contrast. No shadows
mavileri parlat daha renkli olsun
arkasına parıltı ekle
kalbi retro neon yap