User prompt
Make ball slightly bigger
User prompt
Make shit bar taller and shit bar basketball bigger
User prompt
Make shit bar bigger
User prompt
Make net pulsate when ball goes in ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Remove all net animation
User prompt
Make net flicker when ball goes in ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make net bigger
User prompt
Make net fully visible
User prompt
Move shot bar left 400
User prompt
Move backboard left 400
User prompt
Show ball going through hoop animate so net moves and ball goes behind hoop rim and net ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
When ball is stopped in green area basketball is shot straight into hoop ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make shot bar with a green dot the size of the basketball use basketball asset as gauge and make it move back and forth click to stop basketball in the green spot for perfect shot and basketball goes straight in for swish ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
If ball lands on rim make it roll in to hoop for a basket ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Decrease swipe power
User prompt
Make basketball able to hit basketball and bounce off
User prompt
Make ball able to bounce on hoop
User prompt
Render basketball behind net and rim
User prompt
Adjust basketball controll to use swipe
User prompt
Make net asset size
User prompt
Make net true size
User prompt
Make basketball true size
User prompt
Make basketball true size
User prompt
Move rim up 150 on backboard
User prompt
Move rim up 100 on backboard
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Basketball = Container.expand(function () { var self = Container.call(this); var ballGraphics = self.attachAsset('basketball', { anchorX: 0.5, anchorY: 0.5 }); self.velocityX = 0; self.velocityY = 0; self.gravity = 0.5; self.bounceDecay = 0.7; self.hasScored = false; self.isActive = true; self.update = function () { if (!self.isActive) return; self.velocityY += self.gravity; self.x += self.velocityX; self.y += self.velocityY; // Check ground collision if (self.y > 2632) { self.y = 2632; self.velocityY = -self.velocityY * self.bounceDecay; self.velocityX *= 0.9; LK.getSound('bounce').play(); if (Math.abs(self.velocityY) < 1) { self.isActive = false; } } // Remove if off screen if (self.x < -100 || self.x > 2148 || self.y > 2800) { self.isActive = false; } }; return self; }); var Hoop = Container.expand(function () { var self = Container.call(this); var backboard = self.attachAsset('backboard', { anchorX: 0.5, anchorY: 1 }); backboard.y = -20; var hoop = self.attachAsset('hoop', { anchorX: 0.5, anchorY: 0.5 }); hoop.y = -300; var net = self.attachAsset('net', { anchorX: 0.5, anchorY: 0 }); net.y = 20; net.alpha = 0.3; self.hoopBounds = { left: -90, right: 90, top: -20, bottom: 20 }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x87CEEB }); /**** * Game Code ****/ var basketballs = []; var hoop = null; var ground = null; var scoreTxt = null; var streakTxt = null; var currentStreak = 0; var shootPower = 0; var isCharging = false; var powerBar = null; var lastShotTime = 0; var musicNotes = ['note1', 'note2', 'note3', 'note4', 'note5']; var currentNoteIndex = 0; // Create ground ground = game.addChild(LK.getAsset('ground', { anchorX: 0, anchorY: 0 })); ground.y = 2632; // Create hoop hoop = game.addChild(new Hoop()); hoop.x = 1024; hoop.y = 1300; // Create power bar background var powerBarBg = game.addChild(LK.getAsset('ground', { anchorX: 0, anchorY: 0, scaleX: 0.15, scaleY: 0.3 })); powerBarBg.x = 100; powerBarBg.y = 2400; powerBarBg.alpha = 0.3; // Create power bar powerBar = game.addChild(LK.getAsset('ground', { anchorX: 0, anchorY: 1, scaleX: 0.15, scaleY: 0 })); powerBar.x = 100; powerBar.y = 2480; powerBar.tint = 0xFF0000; // Create score display scoreTxt = new Text2('Score: 0', { size: 80, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Create streak display streakTxt = new Text2('Streak: 0', { size: 60, fill: 0xFFD700 }); streakTxt.anchor.set(0.5, 0); streakTxt.y = 100; LK.gui.top.addChild(streakTxt); function createBasketball(startX, startY, targetX, targetY, power) { var ball = new Basketball(); ball.x = startX; ball.y = startY; var deltaX = targetX - startX; var deltaY = targetY - startY; var distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); var speed = power * 0.8; ball.velocityX = deltaX / distance * speed; ball.velocityY = deltaY / distance * speed - 5; // Add arc basketballs.push(ball); game.addChild(ball); return ball; } function checkBasketScore(ball) { if (ball.hasScored) return; var hoopX = hoop.x; var hoopY = hoop.y; var relativeX = ball.x - hoopX; var relativeY = ball.y - hoopY; if (relativeX >= hoop.hoopBounds.left && relativeX <= hoop.hoopBounds.right && relativeY >= hoop.hoopBounds.top && relativeY <= hoop.hoopBounds.bottom && ball.velocityY > 0) { ball.hasScored = true; currentStreak++; var points = 10 * currentStreak; LK.setScore(LK.getScore() + points); // Play swish sound LK.getSound('swish').play(); // Play musical note LK.getSound(musicNotes[currentNoteIndex]).play(); currentNoteIndex = (currentNoteIndex + 1) % musicNotes.length; // Visual feedback LK.effects.flashObject(hoop, 0x00FF00, 300); // Update displays scoreTxt.setText('Score: ' + LK.getScore()); streakTxt.setText('Streak: ' + currentStreak); // Animate streak text tween(streakTxt, { scaleX: 1.2, scaleY: 1.2 }, { duration: 200, onFinish: function onFinish() { tween(streakTxt, { scaleX: 1, scaleY: 1 }, { duration: 200 }); } }); } } game.down = function (x, y, obj) { if (LK.ticks - lastShotTime < 60) return; // Prevent rapid firing isCharging = true; shootPower = 0; }; game.up = function (x, y, obj) { if (!isCharging) return; isCharging = false; lastShotTime = LK.ticks; if (shootPower > 0.1) { // Calculate shooting position (bottom center of screen) var startX = 1024; var startY = 2500; // Target is the touch position var targetX = x; var targetY = y; createBasketball(startX, startY, targetX, targetY, shootPower); } // Reset power bar shootPower = 0; powerBar.scaleY = 0; }; game.update = function () { // Handle power charging if (isCharging) { shootPower += 0.03; if (shootPower > 1) shootPower = 1; powerBar.scaleY = shootPower * 0.3; // Change color based on power if (shootPower < 0.3) { powerBar.tint = 0x00FF00; // Green } else if (shootPower < 0.7) { powerBar.tint = 0xFFFF00; // Yellow } else { powerBar.tint = 0xFF0000; // Red } } // Update basketballs for (var i = basketballs.length - 1; i >= 0; i--) { var ball = basketballs[i]; if (!ball.isActive) { ball.destroy(); basketballs.splice(i, 1); continue; } // Check for scoring checkBasketScore(ball); } // Reset streak if no balls scored recently if (basketballs.length === 0 && LK.ticks - lastShotTime > 180) { if (currentStreak > 0) { currentStreak = 0; streakTxt.setText('Streak: 0'); currentNoteIndex = 0; // Reset musical progression } } // Check win condition if (LK.getScore() >= 500) { LK.showYouWin(); } }; // Start background music LK.playMusic('backgroundMusic');
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Basketball = Container.expand(function () {
var self = Container.call(this);
var ballGraphics = self.attachAsset('basketball', {
anchorX: 0.5,
anchorY: 0.5
});
self.velocityX = 0;
self.velocityY = 0;
self.gravity = 0.5;
self.bounceDecay = 0.7;
self.hasScored = false;
self.isActive = true;
self.update = function () {
if (!self.isActive) return;
self.velocityY += self.gravity;
self.x += self.velocityX;
self.y += self.velocityY;
// Check ground collision
if (self.y > 2632) {
self.y = 2632;
self.velocityY = -self.velocityY * self.bounceDecay;
self.velocityX *= 0.9;
LK.getSound('bounce').play();
if (Math.abs(self.velocityY) < 1) {
self.isActive = false;
}
}
// Remove if off screen
if (self.x < -100 || self.x > 2148 || self.y > 2800) {
self.isActive = false;
}
};
return self;
});
var Hoop = Container.expand(function () {
var self = Container.call(this);
var backboard = self.attachAsset('backboard', {
anchorX: 0.5,
anchorY: 1
});
backboard.y = -20;
var hoop = self.attachAsset('hoop', {
anchorX: 0.5,
anchorY: 0.5
});
hoop.y = -300;
var net = self.attachAsset('net', {
anchorX: 0.5,
anchorY: 0
});
net.y = 20;
net.alpha = 0.3;
self.hoopBounds = {
left: -90,
right: 90,
top: -20,
bottom: 20
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x87CEEB
});
/****
* Game Code
****/
var basketballs = [];
var hoop = null;
var ground = null;
var scoreTxt = null;
var streakTxt = null;
var currentStreak = 0;
var shootPower = 0;
var isCharging = false;
var powerBar = null;
var lastShotTime = 0;
var musicNotes = ['note1', 'note2', 'note3', 'note4', 'note5'];
var currentNoteIndex = 0;
// Create ground
ground = game.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 0
}));
ground.y = 2632;
// Create hoop
hoop = game.addChild(new Hoop());
hoop.x = 1024;
hoop.y = 1300;
// Create power bar background
var powerBarBg = game.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 0,
scaleX: 0.15,
scaleY: 0.3
}));
powerBarBg.x = 100;
powerBarBg.y = 2400;
powerBarBg.alpha = 0.3;
// Create power bar
powerBar = game.addChild(LK.getAsset('ground', {
anchorX: 0,
anchorY: 1,
scaleX: 0.15,
scaleY: 0
}));
powerBar.x = 100;
powerBar.y = 2480;
powerBar.tint = 0xFF0000;
// Create score display
scoreTxt = new Text2('Score: 0', {
size: 80,
fill: 0xFFFFFF
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Create streak display
streakTxt = new Text2('Streak: 0', {
size: 60,
fill: 0xFFD700
});
streakTxt.anchor.set(0.5, 0);
streakTxt.y = 100;
LK.gui.top.addChild(streakTxt);
function createBasketball(startX, startY, targetX, targetY, power) {
var ball = new Basketball();
ball.x = startX;
ball.y = startY;
var deltaX = targetX - startX;
var deltaY = targetY - startY;
var distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
var speed = power * 0.8;
ball.velocityX = deltaX / distance * speed;
ball.velocityY = deltaY / distance * speed - 5; // Add arc
basketballs.push(ball);
game.addChild(ball);
return ball;
}
function checkBasketScore(ball) {
if (ball.hasScored) return;
var hoopX = hoop.x;
var hoopY = hoop.y;
var relativeX = ball.x - hoopX;
var relativeY = ball.y - hoopY;
if (relativeX >= hoop.hoopBounds.left && relativeX <= hoop.hoopBounds.right && relativeY >= hoop.hoopBounds.top && relativeY <= hoop.hoopBounds.bottom && ball.velocityY > 0) {
ball.hasScored = true;
currentStreak++;
var points = 10 * currentStreak;
LK.setScore(LK.getScore() + points);
// Play swish sound
LK.getSound('swish').play();
// Play musical note
LK.getSound(musicNotes[currentNoteIndex]).play();
currentNoteIndex = (currentNoteIndex + 1) % musicNotes.length;
// Visual feedback
LK.effects.flashObject(hoop, 0x00FF00, 300);
// Update displays
scoreTxt.setText('Score: ' + LK.getScore());
streakTxt.setText('Streak: ' + currentStreak);
// Animate streak text
tween(streakTxt, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 200,
onFinish: function onFinish() {
tween(streakTxt, {
scaleX: 1,
scaleY: 1
}, {
duration: 200
});
}
});
}
}
game.down = function (x, y, obj) {
if (LK.ticks - lastShotTime < 60) return; // Prevent rapid firing
isCharging = true;
shootPower = 0;
};
game.up = function (x, y, obj) {
if (!isCharging) return;
isCharging = false;
lastShotTime = LK.ticks;
if (shootPower > 0.1) {
// Calculate shooting position (bottom center of screen)
var startX = 1024;
var startY = 2500;
// Target is the touch position
var targetX = x;
var targetY = y;
createBasketball(startX, startY, targetX, targetY, shootPower);
}
// Reset power bar
shootPower = 0;
powerBar.scaleY = 0;
};
game.update = function () {
// Handle power charging
if (isCharging) {
shootPower += 0.03;
if (shootPower > 1) shootPower = 1;
powerBar.scaleY = shootPower * 0.3;
// Change color based on power
if (shootPower < 0.3) {
powerBar.tint = 0x00FF00; // Green
} else if (shootPower < 0.7) {
powerBar.tint = 0xFFFF00; // Yellow
} else {
powerBar.tint = 0xFF0000; // Red
}
}
// Update basketballs
for (var i = basketballs.length - 1; i >= 0; i--) {
var ball = basketballs[i];
if (!ball.isActive) {
ball.destroy();
basketballs.splice(i, 1);
continue;
}
// Check for scoring
checkBasketScore(ball);
}
// Reset streak if no balls scored recently
if (basketballs.length === 0 && LK.ticks - lastShotTime > 180) {
if (currentStreak > 0) {
currentStreak = 0;
streakTxt.setText('Streak: 0');
currentNoteIndex = 0; // Reset musical progression
}
}
// Check win condition
if (LK.getScore() >= 500) {
LK.showYouWin();
}
};
// Start background music
LK.playMusic('backgroundMusic');
Make picture high definition
Remove everything but net
Remove basketball rings and backboards from picture
Shiny black rectangle frame. In-Game asset. 2d. High contrast. No shadows
Neon green basketball. In-Game asset. 2d. High contrast. No shadows
Change to black warriors uniform
Change to black warriors uniform
Padlock button that says *locked* Purchase for: $100. In-Game asset. 2d. High contrast. No shadows
Remove words "with basketball"
Number 1
Number 2
Number 3
Number 4
Number 5
Number 6
Number 7
Number 8
Make it say $HOP in big letters across the ball
Change it to say Rhythm
Make a shop backdrop with display shelves and framed areas to place items
Remove ball and put his hands down like he just caught a pass
Remove ball and fix hands
Record. In-Game asset. 2d. High contrast. No shadows
Make the net look like it's on fire