User prompt
playerdrumstick biraz yukarıya
User prompt
drum biraz aşağıya kaydıralım
User prompt
playerdrumstick yukarıya kaydıralım
User prompt
playerdrumstick sağa kaydıralım
User prompt
drum biraz aşağıya kaydıralım
User prompt
clap cpm 30
User prompt
clap cpm 45
User prompt
clap cpm 15 yap
User prompt
clap cpm 35
User prompt
clap cpm 40 yap
User prompt
clap 60 cpm yerine 100 cpm olsun ve drum ile senkronize olsun
User prompt
satın alma butonları her zaman en önde olsun
User prompt
audience clap sesini 60 cpm de yapsın ve farklı assetler de olsun audience1 audience2 audience3 audience4 diye
User prompt
audience clap sesi ekle ve konumunu alt tarafa gelecek şekilde random spawn olmasını sağla
User prompt
musicianı audience diye değiştir ve satın aldıktan sonra animasyonunu kaldır.
User prompt
stage kaldıralım
User prompt
arka plan oluşturalım
User prompt
drumstick ve musician buttonlarını yer değiştirelim
User prompt
stage aşağı kaydıralım
User prompt
autodrumstick satın aldıktan sonra durmasın çalmaya devam etsin.
User prompt
playerdrumstick açısını biraz saat yönünde döndürelim ve konumunu hafif sağa kaydıralım
User prompt
auto drumstick açısı eskiye dönsğn
User prompt
konumunu hafif sağa kaydıralım
User prompt
açısını biraz saat yönünde döndürelim
User prompt
playerdrumstick animasyonu tersten olsun. yukarı aşağı değil yukarıda kalsın aşağı inip tekrar yukarı çıksın.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var AutoDrumstick = Container.expand(function () { var self = Container.call(this); var stickGraphics = self.attachAsset('drumstick', { anchorX: 0.5, anchorY: 0.9 }); self.speed = 1; self.income = 1; self.animating = false; self.tickCounter = 0; self.drumReference = null; self.update = function () { self.tickCounter++; // Hit every 60 ticks (60 BPM = 1 hit per second at 60 FPS) if (self.tickCounter >= 60 && !self.animating) { self.tickCounter = 0; self.animate(); } }; self.animate = function () { if (self.animating) return; self.animating = true; tween(stickGraphics, { rotation: 0.3 }, { duration: 300, onFinish: function onFinish() { // Generate gold when hitting gold += self.income; // Play drum sound LK.getSound('drumhit').play(); // Visual feedback on drum if reference exists if (self.drumReference) { var drumGraphics = self.drumReference.children[0]; tween(drumGraphics, { scaleX: 1.1, scaleY: 1.1 }, { duration: 50, onFinish: function onFinish() { tween(drumGraphics, { scaleX: 1, scaleY: 1 }, { duration: 50 }); } }); } tween(stickGraphics, { rotation: 0 }, { duration: 200, onFinish: function onFinish() { self.animating = false; } }); } }); }; return self; }); var BuyButton = Container.expand(function () { var self = Container.call(this); var buttonBg = self.attachAsset('buyButton', { anchorX: 0.5, anchorY: 0.5 }); self.titleText = new Text2('', { size: 40, fill: '#ffffff' }); self.titleText.anchor.set(0.5, 0.5); self.titleText.y = -15; self.addChild(self.titleText); self.costText = new Text2('', { size: 30, fill: '#ffffff' }); self.costText.anchor.set(0.5, 0.5); self.costText.y = 15; self.addChild(self.costText); self.updateButton = function (title, cost, canAfford) { self.titleText.setText(title); self.costText.setText('$' + cost); buttonBg.tint = canAfford ? 0x4CAF50 : 0x808080; self.interactive = canAfford; }; self.down = function () { tween(buttonBg, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100, onFinish: function onFinish() { tween(buttonBg, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); }; return self; }); var Drum = Container.expand(function () { var self = Container.call(this); var drumGraphics = self.attachAsset('drum', { anchorX: 0.5, anchorY: 0.5 }); // Add permanent drumstick self.drumstick = self.attachAsset('playerDrumstick', { anchorX: 0.5, anchorY: 0.9, x: 100, y: -140, rotation: -0.5 }); self.canTap = true; self.lastTapTime = 0; self.drumstickAnimating = false; self.tap = function () { if (!self.canTap || self.drumstickAnimating) return; var currentTime = Date.now(); var timeSinceLastTap = currentTime - self.lastTapTime; self.lastTapTime = currentTime; // Check for perfect rhythm (60 BPM = 1000ms between beats) var perfectTiming = Math.abs(timeSinceLastTap - 1000) < 100; // Calculate animation speed based on tap speed var tapSpeed = timeSinceLastTap > 0 ? Math.min(timeSinceLastTap, 1000) : 1000; var animationSpeed = tapSpeed / 1000; // Normalize to 0-1 range var strikeDuration = Math.max(50, 150 * animationSpeed); // Faster taps = shorter animation var returnDuration = Math.max(100, 200 * animationSpeed); // Visual feedback - drum scale tween(drumGraphics, { scaleX: 1.2, scaleY: 1.2 }, { duration: 100, onFinish: function onFinish() { tween(drumGraphics, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); // Set animation state self.drumstickAnimating = true; // Animate drumstick strike with dynamic duration - reversed animation tween(self.drumstick, { rotation: -0.8 }, { duration: strikeDuration, easing: tween.easeOut, onFinish: function onFinish() { tween(self.drumstick, { rotation: -0.5 }, { duration: returnDuration, easing: tween.easeInOut, onFinish: function onFinish() { self.drumstickAnimating = false; } }); } }); // Calculate reward var reward = perfectTiming ? goldPerTap * 2 : goldPerTap; gold += reward; // Create light flash effect var lightFlash = self.attachAsset('goldCoin', { anchorX: 0.5, anchorY: 0.5, scaleX: 10, scaleY: 10, alpha: 0.8 }); lightFlash.tint = perfectTiming ? 0xFFD700 : 0xFFFFFF; tween(lightFlash, { scaleX: 15, scaleY: 15, alpha: 0 }, { duration: 300, onFinish: function onFinish() { lightFlash.destroy(); } }); // Create floating text var floatingGold = game.addChild(new FloatingText('+' + reward, perfectTiming ? 0xFFD700 : 0xFFFFFF)); floatingGold.x = self.x; floatingGold.y = self.y - 50; // Play sound LK.getSound('drumhit').play(); // Create music note effect if (perfectTiming) { var note = game.addChild(new MusicNote()); note.x = self.x + (Math.random() - 0.5) * 100; note.y = self.y - 100; } }; self.down = function () { self.tap(); }; return self; }); var FloatingText = Container.expand(function () { var self = Container.call(this); self.init = function (text, color) { self.textObj = new Text2(text, { size: 60, fill: '#' + color.toString(16).padStart(6, '0') }); self.textObj.anchor.set(0.5, 0.5); self.addChild(self.textObj); tween(self, { y: self.y - 100, alpha: 0 }, { duration: 1000, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var MusicNote = Container.expand(function () { var self = Container.call(this); var noteGraphics = self.attachAsset('musicNote', { anchorX: 0.5, anchorY: 0.5 }); tween(self, { y: self.y - 200, alpha: 0 }, { duration: 1500, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); tween(noteGraphics, { rotation: Math.PI * 2 }, { duration: 1500 }); return self; }); var Musician = Container.expand(function () { var self = Container.call(this); var musicianGraphics = self.attachAsset('musician', { anchorX: 0.5, anchorY: 0.5 }); self.instrument = null; self.multiplier = 1.2; self.setInstrument = function (type) { if (self.instrument) { self.instrument.destroy(); } self.instrument = self.attachAsset(type, { anchorX: 0.5, anchorY: 0.5, x: 30, y: 0 }); }; self.animate = function () { tween(musicianGraphics, { scaleY: 1.1 }, { duration: 500, onFinish: function onFinish() { tween(musicianGraphics, { scaleY: 1 }, { duration: 500 }); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a1a }); /**** * Game Code ****/ // Game variables var gold = 0; var goldPerTap = 1; var passiveIncome = 0; var drumsticks = []; var musicians = []; var unlockedInstruments = ['drum']; var currentVenue = 0; // Upgrade costs var drumstickCost = 10; var musicianCost = 100; var instrumentCosts = { saxophone: 500, guitar: 1000, violin: 2000 }; var venueCost = 5000; // UI Elements var goldText = new Text2('Gold: 0', { size: 80, fill: '#FFD700' }); goldText.anchor.set(0.5, 0); LK.gui.top.addChild(goldText); var incomeText = new Text2('Income: 0/s', { size: 50, fill: '#ffffff' }); incomeText.anchor.set(0.5, 0); incomeText.y = 90; LK.gui.top.addChild(incomeText); // Main drum var mainDrum = game.addChild(new Drum()); mainDrum.x = 1024; mainDrum.y = 800; // Stage/Venue display var stageDisplay = game.addChild(new Container()); var currentStage = stageDisplay.attachAsset('stage', { anchorX: 0.5, anchorY: 0.5 }); stageDisplay.x = 1024; stageDisplay.y = 1100; // Buy buttons var buyDrumstickBtn = game.addChild(new BuyButton()); buyDrumstickBtn.x = 512; buyDrumstickBtn.y = 2200; buyDrumstickBtn.updateButton('Drumstick', drumstickCost, false); var buyMusicianBtn = game.addChild(new BuyButton()); buyMusicianBtn.x = 1024; buyMusicianBtn.y = 2200; buyMusicianBtn.updateButton('Musician', musicianCost, false); var buyInstrumentBtn = game.addChild(new BuyButton()); buyInstrumentBtn.x = 1536; buyInstrumentBtn.y = 2200; buyInstrumentBtn.updateButton('Saxophone', instrumentCosts.saxophone, false); var buyVenueBtn = game.addChild(new BuyButton()); buyVenueBtn.x = 1024; buyVenueBtn.y = 2400; buyVenueBtn.updateButton('Next Venue', venueCost, false); // Button handlers buyDrumstickBtn.up = function () { if (gold >= drumstickCost) { gold -= drumstickCost; // Remove old drumstick if exists if (drumsticks.length > 0) { drumsticks[0].destroy(); drumsticks = []; } var newStick = game.addChild(new AutoDrumstick()); // Position drumstick on left side of drum newStick.x = mainDrum.x - 250; newStick.y = mainDrum.y - 120; // Rotate drumstick to point towards the drum newStick.rotation = 0; // Set drum reference for visual feedback newStick.drumReference = mainDrum; drumsticks.push(newStick); passiveIncome = newStick.income; drumstickCost = Math.floor(drumstickCost * 1.5); LK.getSound('purchase').play(); } }; buyMusicianBtn.up = function () { if (gold >= musicianCost) { gold -= musicianCost; var newMusician = game.addChild(new Musician()); newMusician.x = 300 + musicians.length * 150; newMusician.y = 1200; if (unlockedInstruments.length > 1) { var randomInstrument = unlockedInstruments[Math.floor(Math.random() * (unlockedInstruments.length - 1)) + 1]; newMusician.setInstrument(randomInstrument); } musicians.push(newMusician); goldPerTap = Math.floor(goldPerTap * newMusician.multiplier); musicianCost = Math.floor(musicianCost * 2); LK.getSound('purchase').play(); } }; buyInstrumentBtn.up = function () { var nextInstrument = null; var cost = 0; if (!unlockedInstruments.includes('saxophone')) { nextInstrument = 'saxophone'; cost = instrumentCosts.saxophone; } else if (!unlockedInstruments.includes('guitar')) { nextInstrument = 'guitar'; cost = instrumentCosts.guitar; } else if (!unlockedInstruments.includes('violin')) { nextInstrument = 'violin'; cost = instrumentCosts.violin; } if (nextInstrument && gold >= cost) { gold -= cost; unlockedInstruments.push(nextInstrument); LK.getSound('purchase').play(); // Update button for next instrument if (nextInstrument === 'saxophone') { buyInstrumentBtn.updateButton('Guitar', instrumentCosts.guitar, false); } else if (nextInstrument === 'guitar') { buyInstrumentBtn.updateButton('Violin', instrumentCosts.violin, false); } else { buyInstrumentBtn.visible = false; } } }; buyVenueBtn.up = function () { if (gold >= venueCost && currentVenue < 3) { gold -= venueCost; currentVenue++; currentStage.destroy(); currentStage = stageDisplay.attachAsset('venue', { anchorX: 0.5, anchorY: 0.5, scaleX: 1 + currentVenue * 0.3, scaleY: 1 + currentVenue * 0.3 }); venueCost *= 10; if (currentVenue >= 3) { buyVenueBtn.updateButton('Opera House!', 0, false); buyVenueBtn.visible = false; // Win condition LK.showYouWin(); } LK.getSound('purchase').play(); } }; // Passive income timer var incomeTimer = 0; // Main game loop game.update = function () { // Update UI goldText.setText('Gold: ' + Math.floor(gold)); incomeText.setText('Income: ' + passiveIncome + '/s'); // Update button states buyDrumstickBtn.updateButton('Drumstick', drumstickCost, gold >= drumstickCost); buyMusicianBtn.updateButton('Musician', musicianCost, gold >= musicianCost); if (currentVenue < 3) { buyVenueBtn.updateButton('Next Venue', venueCost, gold >= venueCost); } // Passive income incomeTimer++; if (incomeTimer >= 60) { incomeTimer = 0; gold += passiveIncome; // Animate musicians for (var j = 0; j < musicians.length; j++) { musicians[j].animate(); } } // Save progress if (LK.ticks % 300 === 0) { storage.gold = gold; storage.passiveIncome = passiveIncome; storage.drumstickCount = drumsticks.length; storage.musicianCount = musicians.length; storage.unlockedInstruments = unlockedInstruments; storage.currentVenue = currentVenue; } }; // Load saved progress if (storage.gold) { gold = storage.gold || 0; passiveIncome = storage.passiveIncome || 0; unlockedInstruments = storage.unlockedInstruments || ['drum']; currentVenue = storage.currentVenue || 0; // Recreate single drumstick if ((storage.drumstickCount || 0) > 0) { var stick = game.addChild(new AutoDrumstick()); // Position drumstick on left side of drum stick.x = mainDrum.x - 250; stick.y = mainDrum.y - 120; // Rotate drumstick to point towards the drum stick.rotation = 0; // Set drum reference for visual feedback stick.drumReference = mainDrum; drumsticks.push(stick); } // Recreate musicians for (var j = 0; j < (storage.musicianCount || 0); j++) { var musician = game.addChild(new Musician()); musician.x = 300 + j * 150; musician.y = 1200; musicians.push(musician); } } // Play background music LK.playMusic('ambientMusic', { fade: { start: 0, end: 0.3, duration: 2000 } });
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var AutoDrumstick = Container.expand(function () {
var self = Container.call(this);
var stickGraphics = self.attachAsset('drumstick', {
anchorX: 0.5,
anchorY: 0.9
});
self.speed = 1;
self.income = 1;
self.animating = false;
self.tickCounter = 0;
self.drumReference = null;
self.update = function () {
self.tickCounter++;
// Hit every 60 ticks (60 BPM = 1 hit per second at 60 FPS)
if (self.tickCounter >= 60 && !self.animating) {
self.tickCounter = 0;
self.animate();
}
};
self.animate = function () {
if (self.animating) return;
self.animating = true;
tween(stickGraphics, {
rotation: 0.3
}, {
duration: 300,
onFinish: function onFinish() {
// Generate gold when hitting
gold += self.income;
// Play drum sound
LK.getSound('drumhit').play();
// Visual feedback on drum if reference exists
if (self.drumReference) {
var drumGraphics = self.drumReference.children[0];
tween(drumGraphics, {
scaleX: 1.1,
scaleY: 1.1
}, {
duration: 50,
onFinish: function onFinish() {
tween(drumGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 50
});
}
});
}
tween(stickGraphics, {
rotation: 0
}, {
duration: 200,
onFinish: function onFinish() {
self.animating = false;
}
});
}
});
};
return self;
});
var BuyButton = Container.expand(function () {
var self = Container.call(this);
var buttonBg = self.attachAsset('buyButton', {
anchorX: 0.5,
anchorY: 0.5
});
self.titleText = new Text2('', {
size: 40,
fill: '#ffffff'
});
self.titleText.anchor.set(0.5, 0.5);
self.titleText.y = -15;
self.addChild(self.titleText);
self.costText = new Text2('', {
size: 30,
fill: '#ffffff'
});
self.costText.anchor.set(0.5, 0.5);
self.costText.y = 15;
self.addChild(self.costText);
self.updateButton = function (title, cost, canAfford) {
self.titleText.setText(title);
self.costText.setText('$' + cost);
buttonBg.tint = canAfford ? 0x4CAF50 : 0x808080;
self.interactive = canAfford;
};
self.down = function () {
tween(buttonBg, {
scaleX: 0.95,
scaleY: 0.95
}, {
duration: 100,
onFinish: function onFinish() {
tween(buttonBg, {
scaleX: 1,
scaleY: 1
}, {
duration: 100
});
}
});
};
return self;
});
var Drum = Container.expand(function () {
var self = Container.call(this);
var drumGraphics = self.attachAsset('drum', {
anchorX: 0.5,
anchorY: 0.5
});
// Add permanent drumstick
self.drumstick = self.attachAsset('playerDrumstick', {
anchorX: 0.5,
anchorY: 0.9,
x: 100,
y: -140,
rotation: -0.5
});
self.canTap = true;
self.lastTapTime = 0;
self.drumstickAnimating = false;
self.tap = function () {
if (!self.canTap || self.drumstickAnimating) return;
var currentTime = Date.now();
var timeSinceLastTap = currentTime - self.lastTapTime;
self.lastTapTime = currentTime;
// Check for perfect rhythm (60 BPM = 1000ms between beats)
var perfectTiming = Math.abs(timeSinceLastTap - 1000) < 100;
// Calculate animation speed based on tap speed
var tapSpeed = timeSinceLastTap > 0 ? Math.min(timeSinceLastTap, 1000) : 1000;
var animationSpeed = tapSpeed / 1000; // Normalize to 0-1 range
var strikeDuration = Math.max(50, 150 * animationSpeed); // Faster taps = shorter animation
var returnDuration = Math.max(100, 200 * animationSpeed);
// Visual feedback - drum scale
tween(drumGraphics, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 100,
onFinish: function onFinish() {
tween(drumGraphics, {
scaleX: 1,
scaleY: 1
}, {
duration: 100
});
}
});
// Set animation state
self.drumstickAnimating = true;
// Animate drumstick strike with dynamic duration - reversed animation
tween(self.drumstick, {
rotation: -0.8
}, {
duration: strikeDuration,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(self.drumstick, {
rotation: -0.5
}, {
duration: returnDuration,
easing: tween.easeInOut,
onFinish: function onFinish() {
self.drumstickAnimating = false;
}
});
}
});
// Calculate reward
var reward = perfectTiming ? goldPerTap * 2 : goldPerTap;
gold += reward;
// Create light flash effect
var lightFlash = self.attachAsset('goldCoin', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 10,
scaleY: 10,
alpha: 0.8
});
lightFlash.tint = perfectTiming ? 0xFFD700 : 0xFFFFFF;
tween(lightFlash, {
scaleX: 15,
scaleY: 15,
alpha: 0
}, {
duration: 300,
onFinish: function onFinish() {
lightFlash.destroy();
}
});
// Create floating text
var floatingGold = game.addChild(new FloatingText('+' + reward, perfectTiming ? 0xFFD700 : 0xFFFFFF));
floatingGold.x = self.x;
floatingGold.y = self.y - 50;
// Play sound
LK.getSound('drumhit').play();
// Create music note effect
if (perfectTiming) {
var note = game.addChild(new MusicNote());
note.x = self.x + (Math.random() - 0.5) * 100;
note.y = self.y - 100;
}
};
self.down = function () {
self.tap();
};
return self;
});
var FloatingText = Container.expand(function () {
var self = Container.call(this);
self.init = function (text, color) {
self.textObj = new Text2(text, {
size: 60,
fill: '#' + color.toString(16).padStart(6, '0')
});
self.textObj.anchor.set(0.5, 0.5);
self.addChild(self.textObj);
tween(self, {
y: self.y - 100,
alpha: 0
}, {
duration: 1000,
onFinish: function onFinish() {
self.destroy();
}
});
};
return self;
});
var MusicNote = Container.expand(function () {
var self = Container.call(this);
var noteGraphics = self.attachAsset('musicNote', {
anchorX: 0.5,
anchorY: 0.5
});
tween(self, {
y: self.y - 200,
alpha: 0
}, {
duration: 1500,
easing: tween.easeOut,
onFinish: function onFinish() {
self.destroy();
}
});
tween(noteGraphics, {
rotation: Math.PI * 2
}, {
duration: 1500
});
return self;
});
var Musician = Container.expand(function () {
var self = Container.call(this);
var musicianGraphics = self.attachAsset('musician', {
anchorX: 0.5,
anchorY: 0.5
});
self.instrument = null;
self.multiplier = 1.2;
self.setInstrument = function (type) {
if (self.instrument) {
self.instrument.destroy();
}
self.instrument = self.attachAsset(type, {
anchorX: 0.5,
anchorY: 0.5,
x: 30,
y: 0
});
};
self.animate = function () {
tween(musicianGraphics, {
scaleY: 1.1
}, {
duration: 500,
onFinish: function onFinish() {
tween(musicianGraphics, {
scaleY: 1
}, {
duration: 500
});
}
});
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x1a1a1a
});
/****
* Game Code
****/
// Game variables
var gold = 0;
var goldPerTap = 1;
var passiveIncome = 0;
var drumsticks = [];
var musicians = [];
var unlockedInstruments = ['drum'];
var currentVenue = 0;
// Upgrade costs
var drumstickCost = 10;
var musicianCost = 100;
var instrumentCosts = {
saxophone: 500,
guitar: 1000,
violin: 2000
};
var venueCost = 5000;
// UI Elements
var goldText = new Text2('Gold: 0', {
size: 80,
fill: '#FFD700'
});
goldText.anchor.set(0.5, 0);
LK.gui.top.addChild(goldText);
var incomeText = new Text2('Income: 0/s', {
size: 50,
fill: '#ffffff'
});
incomeText.anchor.set(0.5, 0);
incomeText.y = 90;
LK.gui.top.addChild(incomeText);
// Main drum
var mainDrum = game.addChild(new Drum());
mainDrum.x = 1024;
mainDrum.y = 800;
// Stage/Venue display
var stageDisplay = game.addChild(new Container());
var currentStage = stageDisplay.attachAsset('stage', {
anchorX: 0.5,
anchorY: 0.5
});
stageDisplay.x = 1024;
stageDisplay.y = 1100;
// Buy buttons
var buyDrumstickBtn = game.addChild(new BuyButton());
buyDrumstickBtn.x = 512;
buyDrumstickBtn.y = 2200;
buyDrumstickBtn.updateButton('Drumstick', drumstickCost, false);
var buyMusicianBtn = game.addChild(new BuyButton());
buyMusicianBtn.x = 1024;
buyMusicianBtn.y = 2200;
buyMusicianBtn.updateButton('Musician', musicianCost, false);
var buyInstrumentBtn = game.addChild(new BuyButton());
buyInstrumentBtn.x = 1536;
buyInstrumentBtn.y = 2200;
buyInstrumentBtn.updateButton('Saxophone', instrumentCosts.saxophone, false);
var buyVenueBtn = game.addChild(new BuyButton());
buyVenueBtn.x = 1024;
buyVenueBtn.y = 2400;
buyVenueBtn.updateButton('Next Venue', venueCost, false);
// Button handlers
buyDrumstickBtn.up = function () {
if (gold >= drumstickCost) {
gold -= drumstickCost;
// Remove old drumstick if exists
if (drumsticks.length > 0) {
drumsticks[0].destroy();
drumsticks = [];
}
var newStick = game.addChild(new AutoDrumstick());
// Position drumstick on left side of drum
newStick.x = mainDrum.x - 250;
newStick.y = mainDrum.y - 120;
// Rotate drumstick to point towards the drum
newStick.rotation = 0;
// Set drum reference for visual feedback
newStick.drumReference = mainDrum;
drumsticks.push(newStick);
passiveIncome = newStick.income;
drumstickCost = Math.floor(drumstickCost * 1.5);
LK.getSound('purchase').play();
}
};
buyMusicianBtn.up = function () {
if (gold >= musicianCost) {
gold -= musicianCost;
var newMusician = game.addChild(new Musician());
newMusician.x = 300 + musicians.length * 150;
newMusician.y = 1200;
if (unlockedInstruments.length > 1) {
var randomInstrument = unlockedInstruments[Math.floor(Math.random() * (unlockedInstruments.length - 1)) + 1];
newMusician.setInstrument(randomInstrument);
}
musicians.push(newMusician);
goldPerTap = Math.floor(goldPerTap * newMusician.multiplier);
musicianCost = Math.floor(musicianCost * 2);
LK.getSound('purchase').play();
}
};
buyInstrumentBtn.up = function () {
var nextInstrument = null;
var cost = 0;
if (!unlockedInstruments.includes('saxophone')) {
nextInstrument = 'saxophone';
cost = instrumentCosts.saxophone;
} else if (!unlockedInstruments.includes('guitar')) {
nextInstrument = 'guitar';
cost = instrumentCosts.guitar;
} else if (!unlockedInstruments.includes('violin')) {
nextInstrument = 'violin';
cost = instrumentCosts.violin;
}
if (nextInstrument && gold >= cost) {
gold -= cost;
unlockedInstruments.push(nextInstrument);
LK.getSound('purchase').play();
// Update button for next instrument
if (nextInstrument === 'saxophone') {
buyInstrumentBtn.updateButton('Guitar', instrumentCosts.guitar, false);
} else if (nextInstrument === 'guitar') {
buyInstrumentBtn.updateButton('Violin', instrumentCosts.violin, false);
} else {
buyInstrumentBtn.visible = false;
}
}
};
buyVenueBtn.up = function () {
if (gold >= venueCost && currentVenue < 3) {
gold -= venueCost;
currentVenue++;
currentStage.destroy();
currentStage = stageDisplay.attachAsset('venue', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1 + currentVenue * 0.3,
scaleY: 1 + currentVenue * 0.3
});
venueCost *= 10;
if (currentVenue >= 3) {
buyVenueBtn.updateButton('Opera House!', 0, false);
buyVenueBtn.visible = false;
// Win condition
LK.showYouWin();
}
LK.getSound('purchase').play();
}
};
// Passive income timer
var incomeTimer = 0;
// Main game loop
game.update = function () {
// Update UI
goldText.setText('Gold: ' + Math.floor(gold));
incomeText.setText('Income: ' + passiveIncome + '/s');
// Update button states
buyDrumstickBtn.updateButton('Drumstick', drumstickCost, gold >= drumstickCost);
buyMusicianBtn.updateButton('Musician', musicianCost, gold >= musicianCost);
if (currentVenue < 3) {
buyVenueBtn.updateButton('Next Venue', venueCost, gold >= venueCost);
}
// Passive income
incomeTimer++;
if (incomeTimer >= 60) {
incomeTimer = 0;
gold += passiveIncome;
// Animate musicians
for (var j = 0; j < musicians.length; j++) {
musicians[j].animate();
}
}
// Save progress
if (LK.ticks % 300 === 0) {
storage.gold = gold;
storage.passiveIncome = passiveIncome;
storage.drumstickCount = drumsticks.length;
storage.musicianCount = musicians.length;
storage.unlockedInstruments = unlockedInstruments;
storage.currentVenue = currentVenue;
}
};
// Load saved progress
if (storage.gold) {
gold = storage.gold || 0;
passiveIncome = storage.passiveIncome || 0;
unlockedInstruments = storage.unlockedInstruments || ['drum'];
currentVenue = storage.currentVenue || 0;
// Recreate single drumstick
if ((storage.drumstickCount || 0) > 0) {
var stick = game.addChild(new AutoDrumstick());
// Position drumstick on left side of drum
stick.x = mainDrum.x - 250;
stick.y = mainDrum.y - 120;
// Rotate drumstick to point towards the drum
stick.rotation = 0;
// Set drum reference for visual feedback
stick.drumReference = mainDrum;
drumsticks.push(stick);
}
// Recreate musicians
for (var j = 0; j < (storage.musicianCount || 0); j++) {
var musician = game.addChild(new Musician());
musician.x = 300 + j * 150;
musician.y = 1200;
musicians.push(musician);
}
}
// Play background music
LK.playMusic('ambientMusic', {
fade: {
start: 0,
end: 0.3,
duration: 2000
}
});
Horizontal drumstick for drum 2d pixelart. In-Game asset. 2d. High contrast. No shadows
Drum 2d pixelart. In-Game asset. 2d. no drums
detailed brunette woman from behind pixel art 2d. In-Game asset. 2d. High contrast. No shadows
man pixel art with different clothes
brown yellow haired man pixel art
yellow plus brown haired man pixel art with different colors of clothing
guitar pixel art 2d horizontal. In-Game asset. 2d. High contrast. No shadows
lock pixel art. In-Game asset. 2d. High contrast. No shadows
cymbal instrument pixel art 2d. In-Game asset. 2d. High contrast. No shadows
straight stick pixel art horizontal 2d. In-Game asset. 2d. High contrast. No shadows
maracas instrument pixelart vertical 2d. In-Game asset. 2d. High contrast. No shadows
piano pixelart 2d. In-Game asset. 2d. High contrast. No shadows
pianist man with hat from behind standing in chair without piano pixel art 2d
flute pixel art 2d vertical. In-Game asset. 2d. High contrast. No shadows
disco ball pixel art 2d. In-Game asset. 2d. High contrast. No shadows
Pixel art style
Confetti stick, 2d pixel art vertical. no papers only stick. In-Game asset. 2d. High contrast. No shadows
disco ball pixel art 2d. In-Game asset. 2d. High contrast. No shadows
Make different variations this pixel art change clothes, change hairstyle
make different variations of this pixel art change hairstyle, clothing
make different hairstyle and clothing, you can use cap etc.
make different hairstyle and clothing
make different hairstyle and clothing
make different hairstyle and clothing, you can make punk
make different clothing, you can make it blonde
make different hairstyle and clothing, you can make man wearing hoodie
One Confetti paper pixelart 2d. In-Game asset. 2d. High contrast. No shadows
Remove band clicker write, make drum in the middle
Make it red
Make it green
Make it blue
make it white
make it purple
#F3D296 colour small arrow pixel art. In-Game asset. 2d. High contrast. No shadows
Change writing to the ''MENU''
Make empty pixel art game card. #f3d296 color. In-Game asset. 2d. High quality. No shadows
Remove ball,
Remove stick, left ball alone
Change writing to the ''BPM OPTIONS'' pixel art
Make audio's lines dark black, audio color dark gray. Make x's lines black and inside color red.
Remove audio, left x
Make it brown
Can you make it lighter
make it #7d522e
Money gun pixel art. Without money, horizontal. In-Game asset. 2d. High contrast. No shadows
Make it red box
Make it resd