User prompt
Remove the 250ms delay on hoop movement
User prompt
Move the code that moves the hoop into the ball.hasScored if statement
User prompt
Do not use an else if in the ball reset code
User prompt
Remove all console.log calls
User prompt
Rewrite the bounceOffPoint method such that it factors in the ball current speed when calculating new speed of ball after bouncing
User prompt
Multiply speed by .9 for each bounce
User prompt
In elasticity calculation divide by 3 rather than 2
User prompt
Decrease ball bounciness by half
User prompt
Subtract 100px from right element y position
User prompt
Subtract 100px fro left element y position
User prompt
Decrease hoop movement delay to 250ms
User prompt
Decrease hoop movement delay to 500ms
User prompt
Delay the movement of the hoop by 1sec
User prompt
Increase top margin on hoop random position to 1000px
User prompt
On the hoop y position. Add a 500px margin at the top and a 1000px margin at the bottom
User prompt
Add a 500px border to the left and right of possible random hoop positions
User prompt
Don't subtract hoop width and hight in the moveTo call. The hoop is centered positioned so that's not necessary.
User prompt
Divide the x speed impact in fireball by two
User prompt
For each successful score hit, move the basket to a new random position
User prompt
Decrease throw speed by 10%
User prompt
Decrease gravity by 20%
User prompt
Set max bounciness to 50 rather than 10
User prompt
Increase throw speed by 10%
User prompt
Increase throw speed by 60%
User prompt
Increase gravity
===================================================================
--- original.js
+++ change.js
@@ -35,18 +35,16 @@
self.moveTo = function (newX, newY) {
var dx = (newX - self.x) / 60;
var dy = (newY - self.y) / 60;
var steps = 0;
- XS.setTimeout(function () {
- var interval = XS.setInterval(function () {
- self.x += dx;
- self.y += dy;
- steps++;
- if (steps >= 60) {
- XS.clearInterval(interval);
- }
- });
- }, 250);
+ var interval = XS.setInterval(function () {
+ self.x += dx;
+ self.y += dy;
+ steps++;
+ if (steps >= 60) {
+ XS.clearInterval(interval);
+ }
+ });
};
var backboardGraphics = XS.getAsset('backboard', 'Basketball Backboard', .5, .5);
backboardGraphics.y -= 250;
var hoopRimGraphics = XS.getAsset('hoopRim', 'Basketball Hoop Rim', .5, .5);
Basketball, cartoon style Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
4:3 Simple rectangle white outline. Black background
Skull explosion
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