User prompt
biraz daha pixel olsun
User prompt
skor yazısının size sabit kalsın ama pixellenmiş gibi görünsün istiyorum
User prompt
ana menüde mor/violet olan her yere pulsing glow efekti ver ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
ekranda mor görünen her yere yanıp sönen glow efekti verme imkanımız var mı
User prompt
parıldama efektindeki yuvarlak sparkleları kare yapabilir miyiz
Code edit (1 edits merged)
Please save this source code
User prompt
150 px daha
User prompt
support us yazısının 400px soluna çek
User prompt
tween kütüphanesi ile support us butonunun 150px yanına sürekli parıldama animasyonu istiyorum turuncu renklerinde gradyen ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
dj assetini 15px aşağı indir
User prompt
dj bass kickstart textini DJ asseti ile değiştir
User prompt
button click animasyonları çalışmıyor
User prompt
button click animasyonu butona basınca buton içe doğru geçsin sonra geri düzelsin şeklinde düzenle
User prompt
tıklayınca buton küçülüp geri büyüsün
User prompt
bütün butonlara tıklama animasyonu ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
bütün butonları yeniden konumlandır. hepsi alt alta gelsin hepsinin arasında 5 px boşluk olsun
User prompt
bütün buton textlerini assetlerdeki butonlar ile değiştir
User prompt
start butonunu büyült ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
start buttonu yerine startbutton assetini ekle
User prompt
credits arkaplanını creditsbg ile değiştir
User prompt
settings arkaplanını settingsbg ile değiştir
User prompt
support us arkaplanını supportbg ile değiştir
User prompt
ana menü arkaplanını mainmenubg ile değiştir
User prompt
75bpmden 5er 5er artarak 100bpm'e kadar müzik assetleri oluştur. her müziğin her şeyi tam ancak kickleri eksik olsun. isminde yazılı olan bpme göre bastığımızda şarkıyı tamamlayacak şekilde tasarla müzikleri
User prompt
bpm ayarının tuttuğu halde örneğin 75bpmde ise 75bpm şarkısı ile oyunu başlat
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { bpm: 100 }); /**** * Classes ****/ // default bpm 100 // Beat marker class (moving dot) var BeatMarker = Container.expand(function () { var self = Container.call(this); var marker = self.attachAsset('beatMarker', { anchorX: 0.5, anchorY: 0.5 }); self.active = true; // Whether this beat is still hittable self.hit = false; // Whether this beat was hit // For feedback animation self.showFeedback = function (type) { var feedbackId = type === 'good' ? 'goodCircle' : 'missCircle'; var feedback = LK.getAsset(feedbackId, { anchorX: 0.5, anchorY: 0.5, x: self.x, y: self.y, alpha: 0.7, scaleX: 1, scaleY: 1 }); game.addChild(feedback); tween(feedback, { alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 400, easing: tween.easeOut, onFinish: function onFinish() { feedback.destroy(); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x6ec6f5 // light blue sky }); /**** * Game Code ****/ // --- BPM-specific music assets (kickless versions) --- // Music (looping, short demo) // Sound for kick // Good feedback // Miss feedback // Beat marker // Timeline bar // Bass drum (kick) hit circle when active // Bass drum (kick) hit circle // --- Game constants --- var TIMELINE_WIDTH = 2048; var TIMELINE_HEIGHT = 25; var TIMELINE_Y = 2000; // Y position of timeline bar var TIMELINE_X = 0; var HIT_ZONE_X = 2048 / 2; // Center of screen var HIT_ZONE_Y = TIMELINE_Y + TIMELINE_HEIGHT / 2; var HIT_WINDOW = 120; // px distance for perfect hit var BEAT_SPEED = 900; // px/sec, will increase with difficulty var INITIAL_BPM = 100; // Starting BPM var BEATS_PER_MEASURE = 4; var BEAT_INTERVAL = 60 / INITIAL_BPM; // seconds per beat var DIFFICULTY_STEP = 0.15; // How much to increase BPM per level var MAX_MISSES = 5; // --- Game state --- var beats = []; // Active BeatMarker objects var beatPattern = []; // Array of {time, type} var nextBeatIdx = 0; // Next beat to spawn var songTime = 0; // Elapsed time in seconds var lastTickTime = Date.now(); var score = 0; var misses = 0; var combo = 0; var bpm = typeof storage.bpm === "number" ? storage.bpm : INITIAL_BPM; var beatInterval = 60 / bpm; var gameActive = true; var feedbackTimeout = null; // --- UI elements --- // --- Heart/Life UI --- // (Initialization moved after scoreTxt is defined) var MAX_LIVES = 3; var lives = MAX_LIVES; var heartIcons = []; var heartSpacing = 40; // Heart/life UI will be initialized after scoreTxt is defined // --- Gameplay Screen Container --- var gamescreen = new Container(); gamescreen.visible = false; game.addChild(gamescreen); // Add isyeri background image, anchored top-left, covering the whole game area var isyeriBg = LK.getAsset('isyeri', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732 }); gamescreen.addChild(isyeriBg); var timelineBar = LK.getAsset('timelineBar', { anchorX: 0, anchorY: 0.5, x: TIMELINE_X, y: TIMELINE_Y + TIMELINE_HEIGHT / 2 }); gamescreen.addChild(timelineBar); // Hit zone (kick target) var kickTarget = LK.getAsset('kickTarget', { anchorX: 0.5, anchorY: 0.5, x: HIT_ZONE_X, y: HIT_ZONE_Y }); gamescreen.addChild(kickTarget); // Score text var scoreTxt = new Text2('0', { size: 120, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Combo text var comboTxt = new Text2('', { size: 70, fill: 0x00FF00 }); comboTxt.anchor.set(0.5, 0); LK.gui.top.addChild(comboTxt); comboTxt.y = 120; // No miss text, only hearts for lives display // --- Heart/Life UI --- (moved here to ensure scoreTxt is defined) // Calculate heartY based on scoreTxt position and height var heartY = scoreTxt.y; // Score text ile aynı hizada var heartWidth = 100; var totalHeartsWidth = MAX_LIVES * heartWidth + (MAX_LIVES - 1) * heartSpacing; var heartStartX = 2048 - 100 - totalHeartsWidth; // Sağdan 100px boşluk bırak // Remove any existing heart icons from their parents before recreating for (var i = 0; i < heartIcons.length; i++) { if (heartIcons[i] && heartIcons[i].parent) { heartIcons[i].parent.removeChild(heartIcons[i]); } } heartIcons = []; for (var i = 0; i < MAX_LIVES; i++) { var heart = LK.getAsset('heart', { anchorX: 0, anchorY: 0, x: heartStartX + i * (heartWidth + heartSpacing), y: heartY }); gamescreen.addChild(heart); heartIcons.push(heart); } // --- Beat pattern generation --- function generateBeatPattern(bpm, measures) { // Simple: 4/4, kick on every beat, can add more complex patterns later var pattern = []; var interval = 60 / bpm; for (var m = 0; m < measures; m++) { for (var b = 0; b < BEATS_PER_MEASURE; b++) { pattern.push({ time: (m * BEATS_PER_MEASURE + b) * interval, type: 'kick' }); } } return pattern; } // --- Start game --- function startGame() { // Reset state for (var i = 0; i < beats.length; i++) { beats[i].destroy(); } beats = []; // Use current bpm and beatInterval beatInterval = 60 / bpm; beatPattern = generateBeatPattern(bpm, 16); // 16 measures = 64 beats nextBeatIdx = 0; songTime = 0; lastTickTime = Date.now(); score = 0; misses = 0; combo = 0; lives = MAX_LIVES; // Remove any beat that is at the kick target at game start (defensive, in case of bug) // Also, prevent initial miss by ensuring no beat is at or past the hit zone at game start for (var i = beats.length - 1; i >= 0; i--) { if (typeof beats[i].x !== "undefined" && Math.abs(beats[i].x - HIT_ZONE_X) < 2 || typeof beats[i].x !== "undefined" && beats[i].x >= HIT_ZONE_X - HIT_WINDOW) { beats[i].destroy(); beats.splice(i, 1); } } // Defensive: Also ensure no beat is created at the kick target at game start if (beats.length > 0 && typeof beats[0].x !== "undefined" && Math.abs(beats[0].x - HIT_ZONE_X) < 2) { beats[0].destroy(); beats.splice(0, 1); } // Reset heart icons to full // Recalculate miss text width and heart positions on restart var heartWidth = 100; var totalHeartsWidth = MAX_LIVES * heartWidth + (MAX_LIVES - 1) * heartSpacing; var heartStartX = 2048 - 100 - totalHeartsWidth; var heartY = scoreTxt.y; for (var i = 0; i < heartIcons.length; i++) { var parent = heartIcons[i].parent; if (parent) parent.removeChild(heartIcons[i]); heartIcons[i] = LK.getAsset('heart', { anchorX: 0, anchorY: 0, x: heartStartX + i * (heartWidth + heartSpacing), y: heartY }); gamescreen.addChild(heartIcons[i]); } gameActive = true; scoreTxt.setText('0'); comboTxt.setText(''); // missTxt removed, only hearts for lives kickTarget.visible = true; LK.setScore(0); // --- Play correct BPM music (kickless) --- var musicId = 'music_100bpm_nokick'; if (bpm === 75) musicId = 'music_75bpm_nokick';else if (bpm === 80) musicId = 'music_80bpm_nokick';else if (bpm === 85) musicId = 'music_85bpm_nokick';else if (bpm === 90) musicId = 'music_90bpm_nokick';else if (bpm === 95) musicId = 'music_95bpm_nokick';else if (bpm === 100) musicId = 'music_100bpm_nokick'; LK.playMusic(musicId, { loop: true }); } // --- Main Menu Implementation --- // Add main menu background image, anchored top-left, covering the whole game area var mainMenuContainer = new Container(); mainMenuContainer.visible = true; var mainMenuBg = LK.getAsset('mainmanubg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732 }); mainMenuContainer.addChild(mainMenuBg); // Title var titleTxt = new Text2("DJ Bass Kickstart", { size: 160, fill: 0xffd700 }); titleTxt.anchor.set(0.5, 0); titleTxt.x = 2048 / 2; titleTxt.y = 300; mainMenuContainer.addChild(titleTxt); // Calculate button positions with 5px spacing var buttonStartY = 1000; var buttonHeight = 289; // Approximate height with scale 5 var buttonSpacing = 5; // Start Button var startBtn = LK.getAsset('startbutton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: buttonStartY, scaleX: 5, scaleY: 5 }); mainMenuContainer.addChild(startBtn); // Settings Button var settingsBtn = LK.getAsset('settingsbutton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: buttonStartY + buttonHeight + buttonSpacing, scaleX: 5, scaleY: 5 }); mainMenuContainer.addChild(settingsBtn); // Credits Button var creditsBtn = LK.getAsset('creditsbutton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: buttonStartY + 2 * (buttonHeight + buttonSpacing), scaleX: 5, scaleY: 5 }); mainMenuContainer.addChild(creditsBtn); // Support Us Button var supportBtn = LK.getAsset('supportbutton', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: buttonStartY + 3 * (buttonHeight + buttonSpacing), scaleX: 5, scaleY: 5 }); mainMenuContainer.addChild(supportBtn); // Overlay for credits/settings/support var settingsmenu = new Container(); settingsmenu.visible = false; game.addChild(settingsmenu); var creditsmenu = new Container(); creditsmenu.visible = false; game.addChild(creditsmenu); var supportmenu = new Container(); supportmenu.visible = false; game.addChild(supportmenu); // Helper to hide all overlays function hideAllMenus() { settingsmenu.visible = false; creditsmenu.visible = false; supportmenu.visible = false; } // Show credits menu function showCreditsMenu() { hideAllMenus(); creditsmenu.removeChildren(); var bg = LK.getAsset('creditsbg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732 }); creditsmenu.addChild(bg); var txt = new Text2("Credits\nTasarım & Kod: FRVR.Ava.Combo[POGAAS].v1.0\nInspired by Ada Lovelace", { size: 90, fill: 0xffffff }); txt.anchor.set(0.5, 0.5); txt.x = 2048 / 2; txt.y = 2732 / 2; creditsmenu.addChild(txt); // Close button (bottom right) var closeBtn = new Text2("KAPAT", { size: 90, fill: 0xffffff }); closeBtn.anchor.set(1, 1); closeBtn.x = 2048 - 60; closeBtn.y = 2732 - 60; creditsmenu.addChild(closeBtn); closeBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(closeBtn, { scaleX: 0.8, scaleY: 0.8 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(closeBtn, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); } }); creditsmenu.visible = false; mainMenuContainer.visible = true; }; creditsmenu.visible = true; // Remove tap-to-close on background creditsmenu.down = undefined; } // Show support menu function showSupportMenu() { hideAllMenus(); supportmenu.removeChildren(); var bg = LK.getAsset('supportbg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732 }); supportmenu.addChild(bg); var txt = new Text2("Support Us\nBizi desteklemek için sosyal medyada paylaşın!", { size: 90, fill: 0xffffff }); txt.anchor.set(0.5, 0.5); txt.x = 2048 / 2; txt.y = 2732 / 2; supportmenu.addChild(txt); // Close button (bottom right) var closeBtn = new Text2("KAPAT", { size: 90, fill: 0xffffff }); closeBtn.anchor.set(1, 1); closeBtn.x = 2048 - 60; closeBtn.y = 2732 - 60; supportmenu.addChild(closeBtn); closeBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(closeBtn, { scaleX: 0.8, scaleY: 0.8 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(closeBtn, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); } }); supportmenu.visible = false; mainMenuContainer.visible = true; }; supportmenu.visible = true; // Remove tap-to-close on background supportmenu.down = undefined; } // Show settings menu function showSettingsMenu() { hideAllMenus(); settingsmenu.removeChildren(); var bg = LK.getAsset('settingsbg', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2732 }); settingsmenu.addChild(bg); var txt = new Text2("Ayarlar", { size: 110, fill: 0xffffff }); txt.anchor.set(0.5, 0.5); txt.x = 2048 / 2; txt.y = 700; settingsmenu.addChild(txt); // --- BPM CIRCLE UI --- // Container for the whole BPM control var bpmCircleContainer = new Container(); bpmCircleContainer.x = 2048 / 2; bpmCircleContainer.y = 1100; settingsmenu.addChild(bpmCircleContainer); // Circle background var bpmCircleBg = LK.getAsset('kickTarget', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, scaleX: 1.1, scaleY: 1.1, alpha: 0.85 }); bpmCircleContainer.addChild(bpmCircleBg); // BPM value text var bpmValueTxt = new Text2(bpm + "", { size: 110, fill: 0x1e90ff }); bpmValueTxt.anchor.set(0.5, 0.5); bpmValueTxt.x = 0; bpmValueTxt.y = 0; bpmCircleContainer.addChild(bpmValueTxt); // BPM label text var bpmLabelTxt = new Text2("BPM", { size: 48, fill: 0xffffff }); bpmLabelTxt.anchor.set(0.5, 0.5); bpmLabelTxt.x = 0; bpmLabelTxt.y = 90; bpmCircleContainer.addChild(bpmLabelTxt); // --- Drag-to-change BPM logic --- var dragActive = false; var dragStartY = 0; var dragStartBpm = 0; var lastDragStep = 0; var BPM_MIN = 40; var BPM_MAX = 300; var BPM_STEP = 5; var PIXELS_PER_STEP = 20; // Touch start (down) on circle bpmCircleContainer.down = function (x, y, obj) { dragActive = true; dragStartY = y; dragStartBpm = bpm; lastDragStep = 0; // Animate circle slightly for feedback tween(bpmCircleBg, { scaleX: 1.18, scaleY: 1.18 }, { duration: 100, yoyo: true, repeat: 1 }); }; // Touch move on circle bpmCircleContainer.move = function (x, y, obj) { if (!dragActive) return; var dy = dragStartY - y; // Up is positive var step = Math.floor(dy / PIXELS_PER_STEP); if (step !== lastDragStep) { var newBpm = dragStartBpm + step * BPM_STEP; if (newBpm < BPM_MIN) newBpm = BPM_MIN; if (newBpm > BPM_MAX) newBpm = BPM_MAX; if (newBpm !== bpm) { bpm = newBpm; bpmValueTxt.setText(bpm + ""); beatInterval = 60 / bpm; storage.bpm = bpm; // persist bpm to storage } lastDragStep = step; } }; // Touch end (up) on circle bpmCircleContainer.up = function (x, y, obj) { dragActive = false; // Animate back to normal scale tween(bpmCircleBg, { scaleX: 1.1, scaleY: 1.1 }, { duration: 100 }); }; // Close button (bottom right) var closeBtn = new Text2("KAPAT", { size: 90, fill: 0xffffff }); closeBtn.anchor.set(1, 1); closeBtn.x = 2048 - 60; closeBtn.y = 2732 - 60; settingsmenu.addChild(closeBtn); closeBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(closeBtn, { scaleX: 0.8, scaleY: 0.8 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(closeBtn, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); } }); settingsmenu.visible = false; mainMenuContainer.visible = true; }; // Remove tap-to-close on background settingsmenu.down = undefined; settingsmenu.visible = true; } // Button event handlers // Countdown logic var countdownContainer = new Container(); countdownContainer.visible = false; game.addChild(countdownContainer); function showCountdown(onFinish) { gamescreen.visible = true; countdownContainer.visible = true; countdownContainer.removeChildren(); var numbers = ["3", "2", "1"]; var idx = 0; function showNext() { if (idx >= numbers.length) { countdownContainer.visible = false; countdownContainer.removeChildren(); // Only show gamescreen if game is active (startGame will set it visible) if (!gameActive) { gamescreen.visible = false; } if (typeof onFinish === "function") onFinish(); return; } countdownContainer.removeChildren(); var txt = new Text2(numbers[idx], { size: 400, fill: 0xffd700 }); txt.anchor.set(0.5, 0.5); txt.x = 2048 / 2; txt.y = 1200; txt.alpha = 0; txt.scale.x = 0.6; txt.scale.y = 0.6; countdownContainer.addChild(txt); // Animate in tween(txt, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 250, easing: tween.cubicOut, onFinish: function onFinish() { // Hold, then animate out tween(txt, { alpha: 0, scaleX: 1.5, scaleY: 1.5 }, { duration: 350, delay: 400, easing: tween.cubicIn, onFinish: function onFinish() { idx++; showNext(); } }); } }); } idx = 0; showNext(); } startBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(startBtn, { scaleX: 4, scaleY: 4 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(startBtn, { scaleX: 5, scaleY: 5 }, { duration: 100, easing: tween.easeOut }); } }); mainMenuContainer.visible = false; showCountdown(function () { startGame(); }); }; settingsBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(settingsBtn, { scaleX: 4, scaleY: 4 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(settingsBtn, { scaleX: 5, scaleY: 5 }, { duration: 100, easing: tween.easeOut }); } }); mainMenuContainer.visible = false; showSettingsMenu(); }; creditsBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(creditsBtn, { scaleX: 4, scaleY: 4 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(creditsBtn, { scaleX: 5, scaleY: 5 }, { duration: 100, easing: tween.easeOut }); } }); mainMenuContainer.visible = false; showCreditsMenu(); }; supportBtn.down = function (x, y, obj) { // Click animation - shrink then grow back tween(supportBtn, { scaleX: 4, scaleY: 4 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(supportBtn, { scaleX: 5, scaleY: 5 }, { duration: 100, easing: tween.easeOut }); } }); mainMenuContainer.visible = false; showSupportMenu(); }; // Add menu to game game.addChild(mainMenuContainer); // menus are already added above // Hide all gameplay UI until game starts scoreTxt.visible = false; comboTxt.visible = false; // missTxt removed, only hearts for lives // timelineBar and kickTarget are now children of gamescreen, so their visibility is managed by gamescreen // Patch startGame to show gameplay UI and gamescreen var _originalStartGame = startGame; startGame = function startGame() { scoreTxt.visible = true; comboTxt.visible = true; // missTxt removed, only hearts for lives gamescreen.visible = true; mainMenuContainer.visible = false; // overlayContainer.visible = false; // Removed, not defined _originalStartGame(); }; // On menu, hide gameplay UI and gamescreen mainMenuContainer.visible = true; scoreTxt.visible = false; comboTxt.visible = false; gamescreen.visible = false; // --- Beat spawning --- function spawnBeat(beat) { var marker = new BeatMarker(); // Always spawn at the very left of the timeline bar marker.x = TIMELINE_X; marker.y = HIT_ZONE_Y; marker.beatTime = beat.time; marker.type = beat.type; marker.active = true; marker.hit = false; marker.lastX = marker.x; // initialize lastX for correct miss logic marker.hasReachedHitZone = false; // initialize for correct miss logic beats.push(marker); gamescreen.addChild(marker); } // --- Game update --- game.update = function () { if (!gameActive) { return; } // Time management var now = Date.now(); var dt = (now - lastTickTime) / 1000; lastTickTime = now; songTime += dt; // Prevent beat spawning until countdown is finished and gameplay is visible if (!gamescreen.visible || countdownContainer.visible) { return; } // Only allow beat spawning after countdown is finished if (!countdownContainer.visible) { // Spawn new beats if it's time while (nextBeatIdx < beatPattern.length && beatPattern[nextBeatIdx].time - songTime < TIMELINE_WIDTH / BEAT_SPEED) { spawnBeat(beatPattern[nextBeatIdx]); nextBeatIdx++; } } // Move beats and check for misses for (var i = beats.length - 1; i >= 0; i--) { var beat = beats[i]; // Calculate progress: 0 (spawn) to 1 (hit zone) var timeToHit = beat.beatTime - songTime; var pxFromStart = TIMELINE_WIDTH * (1 - timeToHit / (TIMELINE_WIDTH / BEAT_SPEED)); beat.x = TIMELINE_X + Math.max(0, Math.min(TIMELINE_WIDTH, pxFromStart)); // Track lastX for miss detection if (typeof beat.lastX === "undefined") beat.lastX = beat.x; // Only check for miss if the beat has passed the hit zone (not before) // Also, do not count as miss if the beat has not yet reached the hit zone at least once if (!beat.hit && beat.active && typeof beat.hasReachedHitZone !== "undefined" && beat.hasReachedHitZone && beat.lastX <= HIT_ZONE_X + HIT_WINDOW && beat.x > HIT_ZONE_X + HIT_WINDOW) { // Missed beat.active = false; beat.showFeedback('miss'); misses++; combo = 0; // missTxt removed, only hearts for lives comboTxt.setText(''); LK.effects.flashObject(kickTarget, 0xff0000, 200); // Lose a life and update heart icon if (lives > 0) { var lostIndex = MAX_LIVES - lives; // soldan sağa kaybetmek için if (heartIcons[lostIndex]) { var parent = heartIcons[lostIndex].parent; if (parent) parent.removeChild(heartIcons[lostIndex]); heartIcons[lostIndex] = LK.getAsset('lostheart', { anchorX: 0, anchorY: 0, x: heartStartX + lostIndex * (heartWidth + heartSpacing), y: heartY }); gamescreen.addChild(heartIcons[lostIndex]); } lives--; } if (lives <= 0) { gameOver(); } } // Track if beat has reached the hit zone at least once if (typeof beat.hasReachedHitZone === "undefined") { beat.hasReachedHitZone = false; } if (!beat.hasReachedHitZone && beat.x >= HIT_ZONE_X - HIT_WINDOW) { beat.hasReachedHitZone = true; } // Remove if off screen if (beat.x > TIMELINE_X + TIMELINE_WIDTH + 100) { beat.destroy(); beats.splice(i, 1); } // Update lastX for next frame beat.lastX = beat.x; } }; // --- Input handling --- var isTouching = false; game.down = function (x, y, obj) { if (!gameActive) { return; } // Only register if touch is in hit zone var dx = x - HIT_ZONE_X; var dy = y - HIT_ZONE_Y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist < 120) { isTouching = true; // Animate kick target kickTarget.destroy(); kickTarget = LK.getAsset('kickActive', { anchorX: 0.5, anchorY: 0.5, x: HIT_ZONE_X, y: HIT_ZONE_Y }); gamescreen.addChild(kickTarget); // Check for beat hit var hit = false; for (var i = 0; i < beats.length; i++) { var beat = beats[i]; if (beat.active && !beat.hit && Math.abs(beat.x - HIT_ZONE_X) < HIT_WINDOW) { // Calculate timing accuracy var distFromCenter = Math.abs(beat.x - HIT_ZONE_X); var feedbackType = ''; var feedbackText = ''; var feedbackColor = 0xffffff; var scoreAdd = 0; if (distFromCenter < 20) { feedbackType = 'perfect'; feedbackText = 'PERFECT!'; feedbackColor = 0xffe600; scoreAdd = 200; } else if (distFromCenter < 40) { feedbackType = 'awesome'; feedbackText = 'AWESOME!'; feedbackColor = 0x00e6ff; scoreAdd = 150; } else if (distFromCenter < 70) { feedbackType = 'good'; feedbackText = 'GOOD'; feedbackColor = 0x00ff00; scoreAdd = 100; } else { feedbackType = 'ok'; feedbackText = 'OK'; feedbackColor = 0xcccccc; scoreAdd = 50; } beat.hit = true; beat.active = false; hit = true; score += scoreAdd; combo += 1; LK.setScore(score); scoreTxt.setText(score); comboTxt.setText('Combo: ' + combo); // Show feedback text at hit zone var feedbackTxt = new Text2(feedbackText, { size: 120, fill: feedbackColor }); feedbackTxt.anchor.set(0.5, 0.5); feedbackTxt.x = HIT_ZONE_X; feedbackTxt.y = HIT_ZONE_Y - 180; game.addChild(feedbackTxt); tween(feedbackTxt, { alpha: 0, y: feedbackTxt.y - 100 }, { duration: 600, easing: tween.easeOut, onFinish: function onFinish() { feedbackTxt.destroy(); } }); beat.showFeedback('good'); LK.getSound('kick').play(); // Play kick sound to complete the music LK.effects.flashObject(kickTarget, feedbackColor, 200); // Difficulty up every 10 combo if (combo % 10 === 0 && combo > 0) { bpm += 8; if (bpm > 300) bpm = 300; beatInterval = 60 / bpm; // Add more beats to pattern var extra = generateBeatPattern(bpm, 4); for (var j = 0; j < extra.length; j++) { extra[j].time += beatPattern[beatPattern.length - 1].time + beatInterval; beatPattern.push(extra[j]); } } break; } } if (!hit) { // Missed (tapped at wrong time) misses++; combo = 0; // missTxt removed, only hearts for lives comboTxt.setText(''); LK.getSound('kick').play(); // Play kick sound even if not a perfect hit LK.effects.flashObject(kickTarget, 0xff0000, 200); // Only lose a life if countdown is not visible if (!countdownContainer.visible) { // Lose a life and update heart icon if (lives > 0) { var lostIndex = MAX_LIVES - lives; // soldan sağa kaybetmek için if (heartIcons[lostIndex]) { var parent = heartIcons[lostIndex].parent; if (parent) parent.removeChild(heartIcons[lostIndex]); heartIcons[lostIndex] = LK.getAsset('lostheart', { anchorX: 0, anchorY: 0, x: heartStartX + lostIndex * (heartWidth + heartSpacing), y: heartY }); gamescreen.addChild(heartIcons[lostIndex]); } lives--; } if (lives <= 0) { gameOver(); } } } } }; game.up = function (x, y, obj) { isTouching = false; // Restore kick target kickTarget.destroy(); kickTarget = LK.getAsset('kickTarget', { anchorX: 0.5, anchorY: 0.5, x: HIT_ZONE_X, y: HIT_ZONE_Y }); gamescreen.addChild(kickTarget); }; // --- Game over --- function gameOver() { gameActive = false; LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); LK.stopMusic(); } // --- Win condition --- function checkWin() { if (score >= 5000) { gameActive = false; LK.effects.flashScreen(0x00ff00, 800); LK.showYouWin(); LK.stopMusic(); } } // --- Restart on game over --- LK.on('gameover', function () { startGame(); }); LK.on('youwin', function () { startGame(); });
===================================================================
--- original.js
+++ change.js
@@ -356,12 +356,12 @@
closeBtn.x = 2048 - 60;
closeBtn.y = 2732 - 60;
creditsmenu.addChild(closeBtn);
closeBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(closeBtn, {
- scaleX: 0.9,
- scaleY: 0.9
+ scaleX: 0.8,
+ scaleY: 0.8
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -411,12 +411,12 @@
closeBtn.x = 2048 - 60;
closeBtn.y = 2732 - 60;
supportmenu.addChild(closeBtn);
closeBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(closeBtn, {
- scaleX: 0.9,
- scaleY: 0.9
+ scaleX: 0.8,
+ scaleY: 0.8
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -555,12 +555,12 @@
closeBtn.x = 2048 - 60;
closeBtn.y = 2732 - 60;
settingsmenu.addChild(closeBtn);
closeBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(closeBtn, {
- scaleX: 0.9,
- scaleY: 0.9
+ scaleX: 0.8,
+ scaleY: 0.8
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -643,12 +643,12 @@
idx = 0;
showNext();
}
startBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(startBtn, {
- scaleX: 4.5,
- scaleY: 4.5
+ scaleX: 4,
+ scaleY: 4
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -666,12 +666,12 @@
startGame();
});
};
settingsBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(settingsBtn, {
- scaleX: 4.5,
- scaleY: 4.5
+ scaleX: 4,
+ scaleY: 4
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -687,12 +687,12 @@
mainMenuContainer.visible = false;
showSettingsMenu();
};
creditsBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(creditsBtn, {
- scaleX: 4.5,
- scaleY: 4.5
+ scaleX: 4,
+ scaleY: 4
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
@@ -708,12 +708,12 @@
mainMenuContainer.visible = false;
showCreditsMenu();
};
supportBtn.down = function (x, y, obj) {
- // Click animation
+ // Click animation - shrink then grow back
tween(supportBtn, {
- scaleX: 4.5,
- scaleY: 4.5
+ scaleX: 4,
+ scaleY: 4
}, {
duration: 100,
easing: tween.easeOut,
onFinish: function onFinish() {
empty heart
A 2048x2732 vertical pixel art background for the main menu of a rhythm game. The scene shows a moody, neon-lit cityscape at night through a big window behind a cozy, minimal DJ setup. The foreground includes soft lights, vinyl records, and glowing cables. Background buildings feature soft pulsing lights and pixel-style clouds or stars. The mood is dreamy, lo-fi, and rhythmic, with purple, indigo, and cyan tones. No characters or text, just a calm and stylish menu background.. In-Game asset. 2d. High contrast. No shadows
A 2048x2732 vertical pixel art background for a settings screen in a pixel-art rhythm game. The scene shows a cozy side corner of the same DJ studio seen in the main menu, with shelves full of vinyls, tangled audio cables, studio monitors, and an analog BPM dial glowing softly. A small desk lamp casts a warm light over a notepad and some buttons. The lighting is purple and blue, calm and focused. The mood is quiet, technical, and slightly futuristic — perfect for adjusting settings.. In-Game asset. 2d. High contrast. No shadows
A 2048x2732 vertical pixel art background for a credits screen in a rhythm-based pixel art game. The scene shows a cozy wall in the same neon-lit DJ studio, filled with pinned polaroid photos, signed posters, music flyers, sticky notes, and handwritten thank-you notes. Soft glowing fairy lights hang above. The lighting is soft pink, violet and blue, with a nostalgic, emotional, and heartfelt vibe. No characters or UI — just a decorative wall filled with creative memories and gratitude.. In-Game asset. 2d. High contrast. No shadows
A single rectangular pixel art button labeled “Start” in a purple neon tone, designed for a lo-fi rhythm-based pixel art game. The button has soft glowing edges, a subtle pixel shadow, and a clean 1-bit pixel font. The overall mood is cozy and dreamy, matching a neon-lit DJ studio aesthetic. The background should be transparent.. In-Game asset. 2d. High contrast. No shadows
Write SETTINGS instead of START.
Write CREDITS instead of START.
Write SUPPORT US instead of SETTINGS.
A bold and stylish pixel art logo text for the game title “DJ RHYTHMCOLIC” designed for a lo-fi rhythm pixel art game. The text is large, vibrant purple with neon glow effects, featuring a retro pixel font that looks futuristic and energetic. Behind the text, subtle pixelated neon sound waves and small music notes float gently in purple and blue hues, blending with a cozy DJ studio atmosphere. The background is transparent or very dark to highlight the glowing title. The style matches a dreamy, neon-lit nighttime vibe with pixel-perfect detail.. In-Game asset. 2d. High contrast. No shadows
yellow ball pixel-art. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A minimalist horizontal pixel art timeline bar, 2048x40 resolution, designed for a lo-fi rhythm pixel game. The bar is sleek and thin, with subtle purple and violet tones, no numbers or markers. The style is consistent with a DJ-themed interface — soft glowing edges, pixel-perfect precision, and no background (transparent). The bar should feel modern yet retro, fitting into a dreamy neon-lit rhythm game UI.. In-Game asset. 2d. High contrast. No shadows
A pixel art arrow starting from a glowing "TAP" label in retro pixel font, pointing diagonally from the bottom right toward the upper left, as if guiding the player to tap that area. The arrow is sleek, with a smooth curve or angled segments, styled in purple or violet neon tones with a soft glow effect. The design matches a lo-fi rhythm game aesthetic. The "TAP" label is positioned at the tail of the arrow and glows subtly. No background — transparent.. In-Game asset. 2d. High contrast. No shadows
A pixel art button with the word "READY" written in bold, retro pixel font. The button is rectangular with slightly rounded corners, styled in purple and violet tones with a soft glowing border to match a lo-fi rhythm game's aesthetic. The "READY" text is centered, white or light-colored for contrast, with pixel-perfect sharpness. The button has a slightly raised 3D appearance and no background (transparent). Designed for use in a minimalist, neon-themed rhythm game UI.. In-Game asset. 2d. High contrast. No shadows
A cozy pixel art bar interior viewed from the DJ's perspective. A dimly lit, moody atmosphere with purple and deep blue neon tones. Visible DJ desk with mixer and speakers in the foreground, blurred bar counter and patrons in the background. Small glowing lights, bottles on shelves, soft lighting, and retro vibes. Resolution: 2048x2732. No characters in front, focus on ambiance and depth.. In-Game asset. 2d. High contrast. No shadows
pixel-art purple heart. In-Game asset. 2d. High contrast. No shadows
heart with blue shield
A transparent background pixel art UI table showing game credits. Each credit line is inside a separate softly glowing purple pixel-style rectangular box. Pixel font text is centered in each box and reads: "Credits" "Tasarım & Kod: FRVR.Ava.Combo[POGAAS].v1.0" "Inspired by Ada Lovelace" "Prompt Engineering by cielique" No background or shadows. Only the pixel table with glowing boxes and readable pixel-style text. Maintain a clean, retro-modern design suitable for overlaying on a DJ bar scene. Resolution: 2048x2732, vertically aligned.. In-Game asset. 2d. High contrast. No shadows
A transparent background pixel art UI panel with "Support Us" title and a list of support actions. Each action is inside a separate glowing purple pixel-style rectangular box. Centered pixel font for text. The boxes are aligned vertically, styled like a clean UI overlay, no background or shadows. Resolution: 2048x2732. Text inside each box: "Support Us" "→ Upvote the game" "→ Share with your friends" "→ Leave a comment" "→ Send us your ideas" The overall design should feel fun, inviting, and in harmony with a DJ rhythm game's UI theme.. In-Game asset. 2d. High contrast. No shadows
A 2048x2732 vertical pixel art background for a “Support Us” screen in a rhythm-based pixel art game. The scene continues the cozy neon-lit DJ room theme from the main menu, but zooms in slightly on the desk. A pixel-art tip jar labeled “Thank you!”, a laptop covered in music-themed stickers, coffee mugs, and glowing synth equipment are visible. Lighting remains dreamy and lo-fi with purples and soft blues. The mood feels warm, humble, and inviting. No characters or text — just the environment.. In-Game asset. 2d. High contrast. No shadows. In-Game asset. 2d. High contrast. No shadows
Pixel art “Try Again” button, retro arcade style, purple tones, soft shadows, chunky text, fits rhythm game UI.. In-Game asset. 2d. High contrast. No shadows
change text with MAIN MENU
Pixel art “Game Over” text, bold retro arcade style, purple tones, glitch-free, clean and dramatic for rhythm game UI.. In-Game asset. 2d. High contrast. No shadows
Pixel art background, 2048x2732 resolution, defeat screen for a rhythm game set in a moody bar. Dim lighting, purple and dark tones, empty DJ booth, quiet atmosphere, no characters or text.. In-Game asset. 2d. High contrast. No shadows
orange
CLOSE
purple
daha koyu mor ve köşeler daha yuvarlak
soft edge square, violet purple, pixel art. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Pixel art tutorial table UI, clean layout with text blocks, purple-themed, 8-bit retro style, no background, no icons, fits game start screen "[How to Play] • Tap the button in time with the rhythm! • Earn points and combos by staying on beat. • Want to change speed or volume? → Check out the Settings menu for BPM & sound options. Get ready to groove!". In-Game asset. 2d. High contrast. No shadows
Pixel art pause button, purple color, rounded corners, 8-bit UI style, minimal design, no background, 80x80 size, suitable for mobile rhythm game interface. In-Game asset. 2d. High contrast. No shadows
A minimalist pixel art "Paused" menu screen in vertical format (2048x2732), with a retro DJ/bar theme. At the top center, the word "PAUSED" in large, glowing purple pixel letters. The rest of the screen should be clean and dark, with subtle lighting or atmospheric effects suggesting a nightclub or DJ booth. Leave the central and lower space empty for placing UI buttons (Resume, Restart, Settings, Main Menu). Smooth, moody pixel background, matching a futuristic arcade vibe.. In-Game asset. 2d. High contrast. No shadows
change text with RESUME
change text with RESTART
kick
Sound effect
miss
Sound effect
menumusic
Music
75BPMElectricDreams
Music
80BPMNeonNights
Music
85BPMCyberFlow
Music
90BPMDigitalPulse
Music
95BPMFutureBass
Music
100BPMSynthWave
Music
40BPMDeepVibes
Music
45BPMChillWave
Music
50BPMSlowMotion
Music
55BPMDreamscape
Music
60BPMLowKey
Music
65BPMRelaxed
Music
70BPMCalmVibes
Music
105BPMHyperDrive
Music
110BPMTechnoRush
Music
115BPMHighEnergy
Music
120BPMMaximum
Music
scratch
Sound effect
buttonclick
Sound effect
kick2
Sound effect
kick3
Sound effect
kick4
Sound effect
hihat
Sound effect
hihat2
Sound effect
hihat3
Sound effect
hihat4
Sound effect
snareclap
Sound effect
snareclap2
Sound effect
snareclap3
Sound effect
snareclap4
Sound effect
percussion
Sound effect
percussion2
Sound effect
percussion3
Sound effect
percussion4
Sound effect
thanks
Sound effect