User prompt
1000 skorda bir arka olanın rengi değişsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
başlangıç hızını yüzde 25 daha arttır
User prompt
başlangıç hızını yüzde 20 arttır
User prompt
başlangıç hızını yüzde 20 arttır
User prompt
başlangıç hızını yüzde 15 arttır
User prompt
başlangıç hızını yüzde 20 arttır
User prompt
başlangıç hızını yüzde 10 arttır
User prompt
başalangıç hızını yüzde 10 arttır
User prompt
başalngıç hızını yüzde 5 daha arttır
User prompt
başlangıç hızı yüzde 5 artsın
User prompt
karakter biraz daha yüksege zıplasın
User prompt
bloklar birbirine çok yakın
User prompt
Oyuncu her başarılı zıplamada 100 puan kazansın Başlangıç skoru: 0 Skoru ekranda göster: "Skor: [skor]" üstte, ortada, büyük beyaz yazı ile Engeller başlangıçta yavaş hareket etsin Her 500 skor kazanıldığında engellerin hızı %10 artsın Toplam skor sınırı: 10.000 Skor 10.000'e ulaşınca oyun dursun ve "Tebrikler! Ritim Ustası Oldun!" yazısı gösterilsin Oyun bitince 3 buton gelsin: - "Tekrar Oyna" - "Ana Menü" - "Paylaş" ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
oyunun son skoru 10.000 olsun
User prompt
karakter çarptıgında oyun direk dursun
User prompt
karakter çarptıktan sonra hareket etmesin
User prompt
karakterin zıplama gücünü arttır
User prompt
karakter daha yüksege zıplasın ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
karakterin ilerlemesini durdur
User prompt
Oyuncu tıkladığında karakter yukarı zıplasın Yer çekimi ekle: karakter zıpladıktan sonra yavaşça aşağı düşsün Karakter yerdeyse tekrar zıplayabilsin Zıplama yüksekliği: orta (çok değil, az da değil) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
tek tıkla zıplasın çift tıkla degil
User prompt
zıplamada sorun var zıpmamıyor takılıyor
User prompt
karakter zıplarken ikinci zıplamada takılıyor zıplamıyor bunu düzelt
User prompt
karakter sabit duruyor kötü hareket etsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Oyuncu 10 skora ulaştığında, nota simgeleri daha hızlı kaymaya başlasın Arka planın tonu yavaşça mora veya sarıya geçsin (enerji artışı gibi) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var BackgroundWave = Container.expand(function () {
var self = Container.call(this);
var wave = self.attachAsset('backgroundWave', {
anchorX: 0,
anchorY: 0.5,
alpha: 0.3
});
self.speed = -1;
self.amplitude = 20;
self.frequency = 0.02;
self.offset = Math.random() * Math.PI * 2;
self.update = function () {
self.x += self.speed;
self.y += Math.sin(LK.ticks * self.frequency + self.offset) * 0.5;
if (self.x < -100) {
self.x = 2148;
}
};
return self;
});
var MusicNote = Container.expand(function () {
var self = Container.call(this);
// Array of musical note symbols
var noteSymbols = ['♪', '♫', '♬', '♩', '♭', '♯'];
// Create text object with musical note
var noteText = new Text2(noteSymbols[Math.floor(Math.random() * noteSymbols.length)], {
size: 50 + Math.random() * 30,
// Varying sizes from 50-80
fill: 0x4A90E2 // Blue color
});
noteText.anchor.set(0.5, 0.5);
self.addChild(noteText);
// Movement properties - falling from top to bottom
self.speed = 1 + Math.random() * 2; // Slow downward movement
self.horizontalSpeed = (Math.random() - 0.5) * 0.5; // Slight horizontal drift
self.rotationSpeed = (Math.random() - 0.5) * 0.02; // Gentle rotation
self.fadeSpeed = 0.003 + Math.random() * 0.005;
self.changeTimer = 0;
self.changeInterval = 120 + Math.random() * 120; // Change symbol every 2-4 seconds
// Color cycling for variety
var colors = [0x4A90E2, 0x87CEEB, 0x9370DB, 0x20B2AA, 0x4169E1];
self.colorIndex = Math.floor(Math.random() * colors.length);
self.update = function () {
// Move vertically (falling down)
self.y += self.speed;
// Slight horizontal drift
self.x += self.horizontalSpeed;
// Gentle rotation
noteText.rotation += self.rotationSpeed;
// Reset position when off screen (bottom)
if (self.y > 2800) {
self.x = Math.random() * 2048;
self.y = -100;
self.alpha = 0.6 + Math.random() * 0.4;
// Reset speed for variation
self.speed = 1 + Math.random() * 2;
self.horizontalSpeed = (Math.random() - 0.5) * 0.5;
}
// Subtle fade effect
self.alpha -= self.fadeSpeed;
if (self.alpha <= 0.3) {
self.alpha = 0.6 + Math.random() * 0.4;
}
// Change note symbol periodically
self.changeTimer++;
if (self.changeTimer >= self.changeInterval) {
noteText.setText(noteSymbols[Math.floor(Math.random() * noteSymbols.length)]);
self.changeTimer = 0;
self.changeInterval = 120 + Math.random() * 120;
// Change color occasionally
if (Math.random() < 0.4) {
self.colorIndex = (self.colorIndex + 1) % colors.length;
noteText.fill = colors[self.colorIndex];
}
}
// Gentle floating animation
self.x += Math.sin(LK.ticks * 0.01 + self.y * 0.002) * 0.3;
};
return self;
});
var NoteParticle = Container.expand(function () {
var self = Container.call(this);
// Array of musical note symbols
var noteSymbols = ['♬', '♪', '♫', '♩'];
// Create text object with musical note
var noteText = new Text2(noteSymbols[Math.floor(Math.random() * noteSymbols.length)], {
size: 80 + Math.random() * 40,
// Size between 80-120
fill: 0xFFD700 // Gold color
});
noteText.anchor.set(0.5, 0.5);
self.addChild(noteText);
// Initial glow effect
noteText.alpha = 1;
noteText.scaleX = 0.5;
noteText.scaleY = 0.5;
// Animate the note particle
self.animate = function () {
// Scale up and glow
tween(noteText, {
scaleX: 1.5,
scaleY: 1.5,
alpha: 1
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
// Float up and fade out
tween(self, {
y: self.y - 150
}, {
duration: 1000,
easing: tween.easeOut
});
tween(noteText, {
alpha: 0,
scaleX: 0.8,
scaleY: 0.8
}, {
duration: 1000,
easing: tween.easeOut,
onFinish: function onFinish() {
self.destroy();
}
});
}
});
};
return self;
});
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGraphics = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 1
});
self.speed = -4;
self.update = function () {
self.x += self.speed;
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var ball = self.attachAsset('ballCharacter', {
anchorX: 0.5,
anchorY: 0.5
});
self.isJumping = false;
self.jumpVelocity = 0;
self.gravity = 0.8;
self.jumpPower = -35;
self.groundY = 2532;
self.jump = function () {
// Only jump if on ground (not jumping)
if (!self.isJumping) {
self.isJumping = true;
self.jumpVelocity = self.jumpPower;
LK.getSound('jump').play();
// White flash effect on jump
tween(ball, {
tint: 0xFFFFFF
}, {
duration: 300,
onFinish: function onFinish() {
tween(ball, {
tint: 0xFFFF00
}, {
duration: 0
});
}
});
// Jump animation
tween(ball, {
scaleX: 1.2,
scaleY: 0.8
}, {
duration: 100,
onFinish: function onFinish() {
tween(ball, {
scaleX: 1,
scaleY: 1
}, {
duration: 200
});
}
});
}
};
self.update = function () {
// Always apply gravity when jumping
if (self.isJumping) {
self.jumpVelocity += self.gravity;
self.y += self.jumpVelocity;
// Check if landed on ground
if (self.y >= self.groundY) {
self.y = self.groundY;
self.isJumping = false;
self.jumpVelocity = 0;
}
} else {
// Ensure player stays on ground when not jumping
self.y = self.groundY;
}
// Smooth movement animations when on ground
if (!self.isJumping) {
// Continuous bouncing motion for walking effect
var walkBounceOffset = Math.sin(LK.ticks * 0.3) * 8;
ball.y = walkBounceOffset;
// Gentle rotation for walking effect
var walkRotation = Math.sin(LK.ticks * 0.2) * 0.15;
ball.rotation = walkRotation;
// Slight scale variation for walking rhythm
var walkScale = 1 + Math.sin(LK.ticks * 0.25) * 0.05;
ball.scaleX = walkScale;
// Add smooth horizontal swaying motion
var horizontalSway = Math.sin(LK.ticks * 0.15) * 15;
ball.x = horizontalSway;
} else {
// Reset position and rotation when jumping
ball.y = 0;
ball.rotation = 0;
ball.x = 0;
}
// Periodic smooth movement animations
if (!self.isJumping && LK.ticks % 180 === 0) {
// Random smooth bobbing motion
tween(ball, {
scaleY: 0.9 + Math.random() * 0.2,
scaleX: 0.9 + Math.random() * 0.2
}, {
duration: 300 + Math.random() * 200,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(ball, {
scaleY: 1,
scaleX: 1
}, {
duration: 300 + Math.random() * 200,
easing: tween.easeInOut
});
}
});
}
// Additional periodic tilt animation
if (!self.isJumping && LK.ticks % 300 === 0) {
var randomTilt = (Math.random() - 0.5) * 0.4;
tween(ball, {
rotation: randomTilt
}, {
duration: 800,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(ball, {
rotation: 0
}, {
duration: 800,
easing: tween.easeInOut
});
}
});
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x0F1A3D
});
/****
* Game Code
****/
// Create gradient background effect with dark blue
game.setBackgroundColor(0x0F1A3D);
// Game variables
var player;
var obstacles = [];
var backgroundWaves = [];
var ground;
var isGameRunning = true;
var obstacleSpawnTimer = 0;
var obstacleSpawnInterval = 120; // 2 seconds at 60fps (1.5x faster)
var gameSpeed = 1;
var speedIncreaseTimer = 0;
var speedIncreaseInterval = 300; // 5 seconds at 60fps
// Score display
var scoreTxt = new Text2('Skor: 0', {
size: 80,
fill: 0x4A90E2
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
scoreTxt.y = 100;
// High score display
var highScoreTxt = new Text2('En Yüksek: ' + (storage.highScore || 0), {
size: 60,
fill: 0xFFD700
});
highScoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(highScoreTxt);
highScoreTxt.y = 180;
// New record text (initially hidden)
var newRecordTxt = new Text2('Yeni Rekor!', {
size: 100,
fill: 0xFF00FF
});
newRecordTxt.anchor.set(0.5, 0.5);
newRecordTxt.x = 1024;
newRecordTxt.y = 800;
newRecordTxt.alpha = 0;
game.addChild(newRecordTxt);
// Title text
var titleTxt = new Text2('Ritimle Zıpla', {
size: 120,
fill: 0xFFFFFF
});
titleTxt.anchor.set(0.5, 0.5);
titleTxt.x = 1024;
titleTxt.y = 400;
game.addChild(titleTxt);
// Subtitle text
var subtitleTxt = new Text2('Müziği dinle, ritmi yakala!', {
size: 60,
fill: 0xCCCCCC
});
subtitleTxt.anchor.set(0.5, 0.5);
subtitleTxt.x = 1024;
subtitleTxt.y = 520;
game.addChild(subtitleTxt);
// Create ground
ground = game.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 0,
x: 0,
y: 2632
}));
// Create musical notes background
var musicNotes = [];
for (var i = 0; i < 30; i++) {
var note = new MusicNote();
note.x = Math.random() * 2048;
note.y = Math.random() * 2732;
note.alpha = 0.4 + Math.random() * 0.3;
musicNotes.push(note);
game.addChild(note);
}
// Create background waves (keep some for layering effect but reduce opacity)
for (var i = 0; i < 4; i++) {
var wave = new BackgroundWave();
wave.x = Math.random() * 2048;
wave.y = 300 + i * 400;
wave.alpha = 0.1; // Much more transparent
backgroundWaves.push(wave);
game.addChild(wave);
}
// Create player
player = game.addChild(new Player());
player.x = 300;
player.y = 2532;
// Game start flag
var gameStarted = false;
// Start game function
function startGame() {
if (!gameStarted) {
gameStarted = true;
// Hide title texts
tween(titleTxt, {
alpha: 0
}, {
duration: 500
});
tween(subtitleTxt, {
alpha: 0
}, {
duration: 500
});
// Start background music
LK.playMusic('bgMusic');
// Update score display
scoreTxt.setText('Skor: ' + LK.getScore());
}
}
// Touch/click handler for jumping
game.down = function (x, y, obj) {
if (!gameStarted) {
startGame();
} else if (isGameRunning) {
// Use player jump method for single tap jump
player.jump();
}
};
// Collision detection function
function checkCollisions() {
var _loop = function _loop() {
obstacle = obstacles[i];
if (player.intersects(obstacle)) {
// Shake effect
var _shake = function shake() {
if (shakeCount < maxShakes) {
var offsetX = (Math.random() - 0.5) * shakeIntensity;
var offsetY = (Math.random() - 0.5) * shakeIntensity;
tween(game, {
x: originalX + offsetX,
y: originalY + offsetY
}, {
duration: 50,
onFinish: function onFinish() {
shakeCount++;
_shake();
}
});
} else {
// Return to original position and scale
tween(game, {
x: originalX,
y: originalY,
scaleX: 1,
scaleY: 1,
alpha: 1
}, {
duration: 100
});
}
};
// Game over
isGameRunning = false;
LK.getSound('hit').play();
LK.effects.flashScreen(0xFF0000, 1000);
// Flash player red
LK.effects.flashObject(player, 0xFF0000, 1000);
// Screen shake and blur effect
originalX = game.x;
originalY = game.y;
shakeIntensity = 20;
shakeCount = 0;
maxShakes = 10; // Blur effect by scaling slightly and reducing alpha
tween(game, {
scaleX: 1.05,
scaleY: 1.05,
alpha: 0.7
}, {
duration: 500
});
_shake();
LK.setTimeout(function () {
LK.showGameOver();
}, 1000);
return {
v: void 0
};
}
// Check if obstacle passed player (score point)
if (obstacle.lastX === undefined) obstacle.lastX = obstacle.x;
if (obstacle.lastX > player.x && obstacle.x <= player.x) {
LK.setScore(LK.getScore() + 1);
currentScore = LK.getScore();
currentHighScore = storage.highScore || 0;
scoreTxt.setText('Skor: ' + currentScore);
// Create glowing musical note particle
var noteParticle = new NoteParticle();
noteParticle.x = player.x;
noteParticle.y = player.y - 50;
game.addChild(noteParticle);
noteParticle.animate();
// Create particle effect when obstacle is passed
for (p = 0; p < 6; p++) {
particle = LK.getAsset('ballCharacter', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.3,
scaleY: 0.3,
tint: 0xFFD700
});
particle.x = obstacle.x;
particle.y = obstacle.y - 100;
game.addChild(particle);
// Random particle movement
randomX = (Math.random() - 0.5) * 200;
randomY = -Math.random() * 150 - 50;
randomRotation = Math.random() * Math.PI * 4;
tween(particle, {
x: particle.x + randomX,
y: particle.y + randomY,
rotation: randomRotation,
alpha: 0,
scaleX: 0.1,
scaleY: 0.1
}, {
duration: 800,
easing: tween.easeOut,
onFinish: function onFinish() {
particle.destroy();
}
});
}
// Check if new high score
if (currentScore > currentHighScore) {
storage.highScore = currentScore;
highScoreTxt.setText('En Yüksek: ' + currentScore);
// Show new record message
newRecordTxt.alpha = 1;
tween(newRecordTxt, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 300,
onFinish: function onFinish() {
tween(newRecordTxt, {
scaleX: 1,
scaleY: 1
}, {
duration: 300,
onFinish: function onFinish() {
tween(newRecordTxt, {
alpha: 0
}, {
duration: 1000
});
}
});
}
});
}
// Increase game speed more aggressively over time
gameSpeed += 0.05;
}
obstacle.lastX = obstacle.x;
// Remove obstacles that are off screen
if (obstacle.x < -100) {
obstacle.destroy();
obstacles.splice(i, 1);
}
},
obstacle,
originalX,
originalY,
shakeIntensity,
shakeCount,
maxShakes,
currentScore,
currentHighScore,
p,
particle,
randomX,
randomY,
randomRotation,
_ret;
for (var i = obstacles.length - 1; i >= 0; i--) {
_ret = _loop();
if (_ret) return _ret.v;
}
}
// Spawn obstacle function
function spawnObstacle() {
if (gameStarted && isGameRunning) {
var obstacle = new Obstacle();
obstacle.x = 2148;
obstacle.y = 2632;
obstacle.speed = -6 * gameSpeed; // 1.5x faster initial speed
obstacles.push(obstacle);
game.addChild(obstacle);
}
}
// Main game update loop
game.update = function () {
if (!isGameRunning) return;
// Update music notes with speed boost after score 10
for (var i = 0; i < musicNotes.length; i++) {
// Increase music note speed when score >= 10
if (LK.getScore() >= 10) {
musicNotes[i].speed = (1 + Math.random() * 2) * 1.8; // 1.8x faster
}
musicNotes[i].update();
}
// Update background waves
for (var i = 0; i < backgroundWaves.length; i++) {
backgroundWaves[i].update();
}
if (gameStarted) {
// Add smooth floating movement to player position
if (!player.isJumping && LK.ticks % 120 === 0) {
var targetY = player.groundY + (Math.random() - 0.5) * 20;
tween(player, {
y: targetY
}, {
duration: 800,
easing: tween.easeInOut
});
}
// Update player
player.update();
// Update obstacles
for (var j = 0; j < obstacles.length; j++) {
obstacles[j].speed = -6 * gameSpeed; // 1.5x faster base speed
obstacles[j].update();
}
// Spawn obstacles
obstacleSpawnTimer++;
if (obstacleSpawnTimer >= obstacleSpawnInterval) {
spawnObstacle();
obstacleSpawnTimer = 0;
// Gradually decrease spawn interval (increase difficulty) - more aggressive reduction
if (obstacleSpawnInterval > 60) {
obstacleSpawnInterval -= 3;
} else if (obstacleSpawnInterval > 30) {
obstacleSpawnInterval -= 1;
}
}
// Increase speed every 5 seconds
speedIncreaseTimer++;
if (speedIncreaseTimer >= speedIncreaseInterval) {
gameSpeed *= 1.2; // Increase by 20%
speedIncreaseTimer = 0;
// Flash background to red and back on speed increase
game.setBackgroundColor(0x4a1a1a); // Reddish tint
tween(game, {}, {
duration: 300,
onFinish: function onFinish() {
// Change background color based on score
if (LK.getScore() >= 10) {
game.setBackgroundColor(0x4B0082); // Purple for energy boost
} else {
game.setBackgroundColor(0x0F1A3D); // Back to dark blue
}
}
});
}
// Background color transition when reaching score 10
if (LK.getScore() === 10) {
tween(game, {}, {
duration: 1000,
onFinish: function onFinish() {
game.setBackgroundColor(0x4B0082); // Transition to purple
}
});
}
// Check collisions
checkCollisions();
// Win condition (reach score of 20)
if (LK.getScore() >= 20) {
isGameRunning = false;
LK.effects.flashScreen(0x00FF00, 1000);
LK.setTimeout(function () {
LK.showYouWin();
}, 1000);
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -159,15 +159,12 @@
self.jumpVelocity = 0;
self.gravity = 0.8;
self.jumpPower = -35;
self.groundY = 2532;
- self.jumpCount = 0;
- self.maxJumps = 2; // Allow double jump
self.jump = function () {
- // Allow jump only when on ground or first jump in air
- if (!self.isJumping || self.jumpCount === 0) {
+ // Only jump if on ground (not jumping)
+ if (!self.isJumping) {
self.isJumping = true;
- self.jumpCount = 1;
self.jumpVelocity = self.jumpPower;
LK.getSound('jump').play();
// White flash effect on jump
tween(ball, {
@@ -199,16 +196,17 @@
});
}
};
self.update = function () {
+ // Always apply gravity when jumping
if (self.isJumping) {
self.jumpVelocity += self.gravity;
self.y += self.jumpVelocity;
+ // Check if landed on ground
if (self.y >= self.groundY) {
self.y = self.groundY;
self.isJumping = false;
self.jumpVelocity = 0;
- self.jumpCount = 0; // Reset jump count when landing
}
} else {
// Ensure player stays on ground when not jumping
self.y = self.groundY;
@@ -399,31 +397,10 @@
game.down = function (x, y, obj) {
if (!gameStarted) {
startGame();
} else if (isGameRunning) {
- // Direct jump without conditions
- player.isJumping = true;
- player.jumpVelocity = player.jumpPower;
- LK.getSound('jump').play();
- // White flash effect on jump
- tween(player.attachAsset('ballCharacter', {
- anchorX: 0.5,
- anchorY: 0.5
- }), {
- tint: 0xFFFFFF
- }, {
- duration: 300,
- onFinish: function onFinish() {
- tween(player.attachAsset('ballCharacter', {
- anchorX: 0.5,
- anchorY: 0.5
- }), {
- tint: 0xFFFF00
- }, {
- duration: 0
- });
- }
- });
+ // Use player jump method for single tap jump
+ player.jump();
}
};
// Collision detection function
function checkCollisions() {