User prompt
add Main Background Music Track
User prompt
add 1. **Main Background Music Track** 2. **Menu / UI Background Loop** 3. **Sound Effects (SFX)**: **Jump Sound** - **Dash Sound** - **Slide Sound** - **Success Hit Sound** - **Failure/Miss Sound**
Code edit (1 edits merged)
Please save this source code
User prompt
Rhythm Pulse: Echo Runner
Initial prompt
Create a music-themed rhythm platformer game titled “Rhythm Pulse: Echo Runner”. The player controls a glowing character who runs through an abstract neon world. Every level is synced with an electronic music track. Obstacles appear on the beat, and the player must jump, dash, or slide to match the rhythm and avoid collisions. The visuals pulse and shift based on the frequency and intensity of the music. Key features: - Rhythm-based movement and timing (like Geometry Dash or Beat Saber) - Reactive visual effects synced to bass and treble frequencies - Increasing difficulty with more complex patterns per level - Score system based on accuracy and beat-sync performance - Music-reactive environments (lights flash, platforms appear/disappear with sound) - 3 levels of difficulty: Chill (easy), Flow (medium), Surge (hard) Visual style: - Neon, cyberpunk atmosphere - Abstract, minimalistic backgrounds - Smooth motion trails and light particles - User interface should be minimal and modern Target platform: web/mobile Objective: Complete levels by syncing actions with the rhythm. Mistimed actions reduce score or cause game-over. Create a set of original audio assets for a futuristic rhythm-based platformer game titled “Rhythm Pulse: Echo Runner”. 1. **Main Background Music Track**: Generate a high-energy electronic music track (duration: 60–90 seconds, tempo: 120–130 BPM) with a strong beat and dynamic rhythm. The music should feel immersive and reactive, suitable for a rhythm game. Use punchy drums, a driving bassline, futuristic synth leads, and glitchy transitions. Avoid vocals. Structure the track with an intro, build-up, drop, and outro to enhance the intensity curve of gameplay. Style: Cyberpunk, EDM, retro-futuristic. Mood: Energetic, focused, immersive, pulsing with rhythm. Reference vibes: Beat Saber, Geometry Dash, Tron Legacy. 2. **Menu / UI Background Loop**: Create a soft, loopable background track for the game’s main menu. Use dreamy synths, low-tempo beats (around 90 BPM), and smooth, retro-futuristic textures. The music should feel ambient and calm, with a digital yet relaxing tone. Style: Chillwave / Synthwave Mood: Ambient, minimal, nostalgic. 3. **Sound Effects (SFX)**: Produce short, crisp, electronic sound effects suitable for the following actions in a music game: - **Jump Sound**: A light, musical chime with a quick upward pitch glide, synced to rhythm. - **Dash Sound**: A short, fast swoosh with a sparkly electronic accent. - **Slide Sound**: A smooth, lower-pitched whoosh with a soft tail. - **Success Hit Sound**: A bright, satisfying pluck or tone that feels rewarding. - **Failure/Miss Sound**: A muted, distorted bass thud that indicates loss or error without being too harsh. All sounds should feel like they belong in a neon-lit, futuristic world. Keep the aesthetic cohesive across the entire audio set.
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Obstacle = Container.expand(function () {
var self = Container.call(this);
var obstacleGfx = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 1
});
self.speed = -6;
self.pulsePhase = 0;
self.update = function () {
self.x += self.speed;
// Pulse effect
self.pulsePhase += 0.15;
var scale = 1 + Math.sin(self.pulsePhase) * 0.1;
obstacleGfx.scaleX = scale;
obstacleGfx.scaleY = scale;
// Beat sync glow
if (beatPulse > 0.5) {
obstacleGfx.tint = 0xffffff;
} else {
obstacleGfx.tint = 0xff0044;
}
};
return self;
});
var Particle = Container.expand(function () {
var self = Container.call(this);
var particleGfx = self.attachAsset('particle', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityX = 0;
self.velocityY = 0;
self.life = 60;
self.maxLife = 60;
self.update = function () {
self.x += self.velocityX;
self.y += self.velocityY;
self.velocityY += 0.2;
self.life--;
particleGfx.alpha = self.life / self.maxLife;
if (self.life <= 0) {
self.shouldDestroy = true;
}
};
return self;
});
var Platform = Container.expand(function () {
var self = Container.call(this);
var platformGfx = self.attachAsset('platform', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = -6;
self.glowPhase = 0;
self.update = function () {
self.x += self.speed;
// Glow effect
self.glowPhase += 0.1;
platformGfx.alpha = 0.7 + Math.sin(self.glowPhase) * 0.3;
};
return self;
});
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGfx = self.attachAsset('player', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityY = 0;
self.velocityX = 0;
self.isGrounded = false;
self.isDashing = false;
self.dashCooldown = 0;
self.glowPhase = 0;
self.update = function () {
// Gravity
if (!self.isGrounded) {
self.velocityY += 0.8;
}
// Apply velocity
self.y += self.velocityY;
self.x += self.velocityX;
// Ground collision
if (self.y >= groundLevel - 30) {
self.y = groundLevel - 30;
self.velocityY = 0;
self.isGrounded = true;
}
// Dash cooldown
if (self.dashCooldown > 0) {
self.dashCooldown--;
}
// Glow effect
self.glowPhase += 0.1;
playerGfx.alpha = 0.8 + Math.sin(self.glowPhase) * 0.2;
// Keep player on screen
if (self.x < 0) self.x = 0;
if (self.x > 2048) self.x = 2048;
};
self.jump = function () {
if (self.isGrounded) {
self.velocityY = -18;
self.isGrounded = false;
LK.getSound('jump').play();
self.createJumpEffect();
}
};
self.dash = function () {
if (self.dashCooldown <= 0) {
self.velocityX = 15;
self.isDashing = true;
self.dashCooldown = 30;
LK.getSound('dash').play();
self.createDashEffect();
tween(self, {
velocityX: 0
}, {
duration: 400
});
LK.setTimeout(function () {
self.isDashing = false;
}, 400);
}
};
self.createJumpEffect = function () {
for (var i = 0; i < 5; i++) {
var particle = new Particle();
particle.x = self.x + (Math.random() - 0.5) * 40;
particle.y = self.y + 20;
particle.velocityY = Math.random() * 5 + 2;
particle.velocityX = (Math.random() - 0.5) * 8;
game.addChild(particle);
particles.push(particle);
}
};
self.createDashEffect = function () {
for (var i = 0; i < 8; i++) {
var particle = new Particle();
particle.x = self.x - 30;
particle.y = self.y + (Math.random() - 0.5) * 40;
particle.velocityY = (Math.random() - 0.5) * 6;
particle.velocityX = -Math.random() * 10 - 5;
game.addChild(particle);
particles.push(particle);
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x0a0a0a
});
/****
* Game Code
****/
// Game variables
var player;
var obstacles = [];
var platforms = [];
var particles = [];
var groundLevel = 2200;
var gameSpeed = 6;
var spawnTimer = 0;
var beatTimer = 0;
var beatInterval = 60; // 60 frames = 1 second at 60fps
var beatPulse = 0;
var combo = 0;
var perfectHits = 0;
// UI
var scoreText = new Text2('Score: 0', {
size: 80,
fill: 0x00FFFF
});
scoreText.anchor.set(0, 0);
scoreText.x = 100;
scoreText.y = 100;
LK.gui.topLeft.addChild(scoreText);
var comboText = new Text2('Combo: 0', {
size: 60,
fill: 0xFFFF00
});
comboText.anchor.set(0, 0);
comboText.x = 100;
comboText.y = 200;
LK.gui.topLeft.addChild(comboText);
// Create ground
var ground = [];
for (var i = 0; i < 10; i++) {
var groundPiece = LK.getAsset('ground', {
anchorX: 0,
anchorY: 0
});
groundPiece.x = i * 300;
groundPiece.y = groundLevel;
ground.push(groundPiece);
game.addChild(groundPiece);
}
// Create player
player = new Player();
player.x = 300;
player.y = groundLevel - 30;
game.addChild(player);
// Background pulse effect
function updateBackgroundPulse() {
var intensity = beatPulse * 0.3;
var color = Math.floor(intensity * 255);
game.setBackgroundColor(color << 16 | color << 8 | Math.floor(intensity * 100));
}
// Spawn obstacles on beat
function spawnObstacle() {
var obstacle = new Obstacle();
obstacle.x = 2200;
obstacle.y = groundLevel;
obstacles.push(obstacle);
game.addChild(obstacle);
}
// Spawn platforms
function spawnPlatform() {
var platform = new Platform();
platform.x = 2200;
platform.y = groundLevel - 150 - Math.random() * 100;
platforms.push(platform);
game.addChild(platform);
}
// Check collisions
function checkCollisions() {
// Obstacle collisions
for (var i = obstacles.length - 1; i >= 0; i--) {
var obstacle = obstacles[i];
if (player.intersects(obstacle) && !player.isDashing) {
LK.getSound('hit').play();
LK.effects.flashScreen(0xff0000, 500);
combo = 0;
LK.setScore(Math.max(0, LK.getScore() - 50));
// Remove obstacle
obstacle.destroy();
obstacles.splice(i, 1);
}
}
}
// Beat detection and rhythm mechanics
function updateBeat() {
beatTimer++;
// Simple beat simulation (in real game this would sync with music)
if (beatTimer >= beatInterval) {
beatTimer = 0;
beatPulse = 1;
// Spawn obstacles on beat
if (Math.random() < 0.7) {
spawnObstacle();
}
// Spawn platforms occasionally
if (Math.random() < 0.3) {
spawnPlatform();
}
}
// Beat pulse decay
beatPulse *= 0.9;
}
// Touch controls
game.down = function (x, y, obj) {
if (x < 1024) {
// Left side - jump
player.jump();
// Check if jump was on beat
if (beatPulse > 0.7) {
perfectHits++;
combo++;
LK.setScore(LK.getScore() + 10 + combo * 2);
LK.effects.flashObject(player, 0x00ff00, 200);
}
} else {
// Right side - dash
player.dash();
// Check if dash was on beat
if (beatPulse > 0.7) {
perfectHits++;
combo++;
LK.setScore(LK.getScore() + 15 + combo * 3);
LK.effects.flashObject(player, 0xffff00, 200);
}
}
};
// Main game loop
game.update = function () {
updateBeat();
updateBackgroundPulse();
checkCollisions();
// Update ground
for (var i = 0; i < ground.length; i++) {
ground[i].x -= gameSpeed;
if (ground[i].x <= -300) {
ground[i].x += 3000;
}
}
// Update and remove obstacles
for (var i = obstacles.length - 1; i >= 0; i--) {
if (obstacles[i].x < -100) {
obstacles[i].destroy();
obstacles.splice(i, 1);
// Bonus points for passing obstacles
LK.setScore(LK.getScore() + 5);
}
}
// Update and remove platforms
for (var i = platforms.length - 1; i >= 0; i--) {
if (platforms[i].x < -200) {
platforms[i].destroy();
platforms.splice(i, 1);
}
}
// Update and remove particles
for (var i = particles.length - 1; i >= 0; i--) {
if (particles[i].shouldDestroy) {
particles[i].destroy();
particles.splice(i, 1);
}
}
// Update UI
scoreText.setText('Score: ' + LK.getScore());
comboText.setText('Combo: ' + combo);
// Gradually increase difficulty
if (LK.ticks % 1800 == 0) {
// Every 30 seconds
gameSpeed += 0.5;
beatInterval = Math.max(30, beatInterval - 2);
}
// Game over condition (if player falls off screen)
if (player.y > 2732 + 100) {
LK.showGameOver();
}
// Win condition
if (LK.getScore() >= 1000) {
LK.showYouWin();
}
};
// Start the music
LK.playMusic('gameMusic'); ===================================================================
--- original.js
+++ change.js
@@ -1,6 +1,350 @@
-/****
+/****
+* Plugins
+****/
+var tween = LK.import("@upit/tween.v1");
+
+/****
+* Classes
+****/
+var Obstacle = Container.expand(function () {
+ var self = Container.call(this);
+ var obstacleGfx = self.attachAsset('obstacle', {
+ anchorX: 0.5,
+ anchorY: 1
+ });
+ self.speed = -6;
+ self.pulsePhase = 0;
+ self.update = function () {
+ self.x += self.speed;
+ // Pulse effect
+ self.pulsePhase += 0.15;
+ var scale = 1 + Math.sin(self.pulsePhase) * 0.1;
+ obstacleGfx.scaleX = scale;
+ obstacleGfx.scaleY = scale;
+ // Beat sync glow
+ if (beatPulse > 0.5) {
+ obstacleGfx.tint = 0xffffff;
+ } else {
+ obstacleGfx.tint = 0xff0044;
+ }
+ };
+ return self;
+});
+var Particle = Container.expand(function () {
+ var self = Container.call(this);
+ var particleGfx = self.attachAsset('particle', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.velocityX = 0;
+ self.velocityY = 0;
+ self.life = 60;
+ self.maxLife = 60;
+ self.update = function () {
+ self.x += self.velocityX;
+ self.y += self.velocityY;
+ self.velocityY += 0.2;
+ self.life--;
+ particleGfx.alpha = self.life / self.maxLife;
+ if (self.life <= 0) {
+ self.shouldDestroy = true;
+ }
+ };
+ return self;
+});
+var Platform = Container.expand(function () {
+ var self = Container.call(this);
+ var platformGfx = self.attachAsset('platform', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.speed = -6;
+ self.glowPhase = 0;
+ self.update = function () {
+ self.x += self.speed;
+ // Glow effect
+ self.glowPhase += 0.1;
+ platformGfx.alpha = 0.7 + Math.sin(self.glowPhase) * 0.3;
+ };
+ return self;
+});
+var Player = Container.expand(function () {
+ var self = Container.call(this);
+ var playerGfx = self.attachAsset('player', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.velocityY = 0;
+ self.velocityX = 0;
+ self.isGrounded = false;
+ self.isDashing = false;
+ self.dashCooldown = 0;
+ self.glowPhase = 0;
+ self.update = function () {
+ // Gravity
+ if (!self.isGrounded) {
+ self.velocityY += 0.8;
+ }
+ // Apply velocity
+ self.y += self.velocityY;
+ self.x += self.velocityX;
+ // Ground collision
+ if (self.y >= groundLevel - 30) {
+ self.y = groundLevel - 30;
+ self.velocityY = 0;
+ self.isGrounded = true;
+ }
+ // Dash cooldown
+ if (self.dashCooldown > 0) {
+ self.dashCooldown--;
+ }
+ // Glow effect
+ self.glowPhase += 0.1;
+ playerGfx.alpha = 0.8 + Math.sin(self.glowPhase) * 0.2;
+ // Keep player on screen
+ if (self.x < 0) self.x = 0;
+ if (self.x > 2048) self.x = 2048;
+ };
+ self.jump = function () {
+ if (self.isGrounded) {
+ self.velocityY = -18;
+ self.isGrounded = false;
+ LK.getSound('jump').play();
+ self.createJumpEffect();
+ }
+ };
+ self.dash = function () {
+ if (self.dashCooldown <= 0) {
+ self.velocityX = 15;
+ self.isDashing = true;
+ self.dashCooldown = 30;
+ LK.getSound('dash').play();
+ self.createDashEffect();
+ tween(self, {
+ velocityX: 0
+ }, {
+ duration: 400
+ });
+ LK.setTimeout(function () {
+ self.isDashing = false;
+ }, 400);
+ }
+ };
+ self.createJumpEffect = function () {
+ for (var i = 0; i < 5; i++) {
+ var particle = new Particle();
+ particle.x = self.x + (Math.random() - 0.5) * 40;
+ particle.y = self.y + 20;
+ particle.velocityY = Math.random() * 5 + 2;
+ particle.velocityX = (Math.random() - 0.5) * 8;
+ game.addChild(particle);
+ particles.push(particle);
+ }
+ };
+ self.createDashEffect = function () {
+ for (var i = 0; i < 8; i++) {
+ var particle = new Particle();
+ particle.x = self.x - 30;
+ particle.y = self.y + (Math.random() - 0.5) * 40;
+ particle.velocityY = (Math.random() - 0.5) * 6;
+ particle.velocityX = -Math.random() * 10 - 5;
+ game.addChild(particle);
+ particles.push(particle);
+ }
+ };
+ return self;
+});
+
+/****
* Initialize Game
-****/
+****/
var game = new LK.Game({
- backgroundColor: 0x000000
-});
\ No newline at end of file
+ backgroundColor: 0x0a0a0a
+});
+
+/****
+* Game Code
+****/
+// Game variables
+var player;
+var obstacles = [];
+var platforms = [];
+var particles = [];
+var groundLevel = 2200;
+var gameSpeed = 6;
+var spawnTimer = 0;
+var beatTimer = 0;
+var beatInterval = 60; // 60 frames = 1 second at 60fps
+var beatPulse = 0;
+var combo = 0;
+var perfectHits = 0;
+// UI
+var scoreText = new Text2('Score: 0', {
+ size: 80,
+ fill: 0x00FFFF
+});
+scoreText.anchor.set(0, 0);
+scoreText.x = 100;
+scoreText.y = 100;
+LK.gui.topLeft.addChild(scoreText);
+var comboText = new Text2('Combo: 0', {
+ size: 60,
+ fill: 0xFFFF00
+});
+comboText.anchor.set(0, 0);
+comboText.x = 100;
+comboText.y = 200;
+LK.gui.topLeft.addChild(comboText);
+// Create ground
+var ground = [];
+for (var i = 0; i < 10; i++) {
+ var groundPiece = LK.getAsset('ground', {
+ anchorX: 0,
+ anchorY: 0
+ });
+ groundPiece.x = i * 300;
+ groundPiece.y = groundLevel;
+ ground.push(groundPiece);
+ game.addChild(groundPiece);
+}
+// Create player
+player = new Player();
+player.x = 300;
+player.y = groundLevel - 30;
+game.addChild(player);
+// Background pulse effect
+function updateBackgroundPulse() {
+ var intensity = beatPulse * 0.3;
+ var color = Math.floor(intensity * 255);
+ game.setBackgroundColor(color << 16 | color << 8 | Math.floor(intensity * 100));
+}
+// Spawn obstacles on beat
+function spawnObstacle() {
+ var obstacle = new Obstacle();
+ obstacle.x = 2200;
+ obstacle.y = groundLevel;
+ obstacles.push(obstacle);
+ game.addChild(obstacle);
+}
+// Spawn platforms
+function spawnPlatform() {
+ var platform = new Platform();
+ platform.x = 2200;
+ platform.y = groundLevel - 150 - Math.random() * 100;
+ platforms.push(platform);
+ game.addChild(platform);
+}
+// Check collisions
+function checkCollisions() {
+ // Obstacle collisions
+ for (var i = obstacles.length - 1; i >= 0; i--) {
+ var obstacle = obstacles[i];
+ if (player.intersects(obstacle) && !player.isDashing) {
+ LK.getSound('hit').play();
+ LK.effects.flashScreen(0xff0000, 500);
+ combo = 0;
+ LK.setScore(Math.max(0, LK.getScore() - 50));
+ // Remove obstacle
+ obstacle.destroy();
+ obstacles.splice(i, 1);
+ }
+ }
+}
+// Beat detection and rhythm mechanics
+function updateBeat() {
+ beatTimer++;
+ // Simple beat simulation (in real game this would sync with music)
+ if (beatTimer >= beatInterval) {
+ beatTimer = 0;
+ beatPulse = 1;
+ // Spawn obstacles on beat
+ if (Math.random() < 0.7) {
+ spawnObstacle();
+ }
+ // Spawn platforms occasionally
+ if (Math.random() < 0.3) {
+ spawnPlatform();
+ }
+ }
+ // Beat pulse decay
+ beatPulse *= 0.9;
+}
+// Touch controls
+game.down = function (x, y, obj) {
+ if (x < 1024) {
+ // Left side - jump
+ player.jump();
+ // Check if jump was on beat
+ if (beatPulse > 0.7) {
+ perfectHits++;
+ combo++;
+ LK.setScore(LK.getScore() + 10 + combo * 2);
+ LK.effects.flashObject(player, 0x00ff00, 200);
+ }
+ } else {
+ // Right side - dash
+ player.dash();
+ // Check if dash was on beat
+ if (beatPulse > 0.7) {
+ perfectHits++;
+ combo++;
+ LK.setScore(LK.getScore() + 15 + combo * 3);
+ LK.effects.flashObject(player, 0xffff00, 200);
+ }
+ }
+};
+// Main game loop
+game.update = function () {
+ updateBeat();
+ updateBackgroundPulse();
+ checkCollisions();
+ // Update ground
+ for (var i = 0; i < ground.length; i++) {
+ ground[i].x -= gameSpeed;
+ if (ground[i].x <= -300) {
+ ground[i].x += 3000;
+ }
+ }
+ // Update and remove obstacles
+ for (var i = obstacles.length - 1; i >= 0; i--) {
+ if (obstacles[i].x < -100) {
+ obstacles[i].destroy();
+ obstacles.splice(i, 1);
+ // Bonus points for passing obstacles
+ LK.setScore(LK.getScore() + 5);
+ }
+ }
+ // Update and remove platforms
+ for (var i = platforms.length - 1; i >= 0; i--) {
+ if (platforms[i].x < -200) {
+ platforms[i].destroy();
+ platforms.splice(i, 1);
+ }
+ }
+ // Update and remove particles
+ for (var i = particles.length - 1; i >= 0; i--) {
+ if (particles[i].shouldDestroy) {
+ particles[i].destroy();
+ particles.splice(i, 1);
+ }
+ }
+ // Update UI
+ scoreText.setText('Score: ' + LK.getScore());
+ comboText.setText('Combo: ' + combo);
+ // Gradually increase difficulty
+ if (LK.ticks % 1800 == 0) {
+ // Every 30 seconds
+ gameSpeed += 0.5;
+ beatInterval = Math.max(30, beatInterval - 2);
+ }
+ // Game over condition (if player falls off screen)
+ if (player.y > 2732 + 100) {
+ LK.showGameOver();
+ }
+ // Win condition
+ if (LK.getScore() >= 1000) {
+ LK.showYouWin();
+ }
+};
+// Start the music
+LK.playMusic('gameMusic');
\ No newline at end of file
2d rock for game. In-Game asset. 2d. High contrast. No shadows
agaç gövdesi 2d. In-Game asset. 2d. High contrast. No shadows
bush 2d. In-Game asset. 2d. High contrast. No shadows
nehiri kaldır
oxygen tank 2d. In-Game asset. 2d. High contrast. No shadows
shark shadow 2d. In-Game asset. 2d. High contrast. No shadows
2 yapraklı deniz yosunu 2d. In-Game asset. 2d. High contrast. No shadows
piranha 2d. In-Game asset. 2d. High contrast. No shadows
deniz mercanı 2d. In-Game asset. 2d. High contrast. No shadows
jump
Sound effect
dash
Sound effect
failureMiss
Sound effect
mainBgMusic
Music
skyLevelMusic
Music
speedMusic
Music
natureMusic
Music
jumpNature
Sound effect
jumpUnderwater
Sound effect
dashNature
Sound effect
dashUnderwater
Sound effect
underwaterMusic
Music
jumpSpeed
Sound effect
dashSpeed
Sound effect