552
0
9mo
Remix started
Copy Basketball FORGE
User prompt
remove the game over if the ball has been thrown and it does not score
User prompt
Add a 30 second timer in addition to the points. The game is over when the 30 seconds expires
User prompt
If the ball bounces outside the boundaries of the screen, reset the ball position
===================================================================
--- original.js
+++ change.js
@@ -176,8 +176,15 @@
var floorY = 2732 - 100;
ball.y = floorY - ball.height;
LK.on('tick', function () {
ball.move();
+ if (ball.x < 0 || ball.x > 2048 || ball.y < 0 || ball.y > 2732) {
+ ball.x = 2048 / 2;
+ ball.y = 2732 - ball.height;
+ ball.speed.x = 0;
+ ball.speed.y = 0;
+ ball.hasThrown = false;
+ }
ballShadow.x = ball.x;
var scale = 1 - 2 * (ball.y - 2732 + ball.height) / 2732;
ballShadow.scale.set(scale);
ballShadow.alpha = (1 - scale + 1) / 2;
Basketball, cartoon style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Wide Single Orange metal bar lying down Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast. —ar 2:1
https://kagi.com/proxy/basketball_backboard.png?c=iNrrnnUOe99nVfDGJsYBLujiaX2Hu-zxBFRkvLEyXdRnJ8cU3RjcAYbR-o12E923qVNGy1CEGrQG87ogCD3yUarJdZYt5R03mmEMb7Jrh-8%3D blank backboard Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Indoor stadium seen from court Single Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast. --no goal