User prompt
replace parseInt by a custom function
User prompt
now give score based on what balls are on screen, ball1 give 1 score ball2 give 2 score ball 3 gives 4 score
User prompt
replace ballTypesToString for a custom function
User prompt
Fix Bug: 'ReferenceError: ballTypesToString is not defined' in or related to this line: 'console.log('Ball count: ' + ballCount + ', Ball types: ' + ballTypesToString(ballTypeCounts));' Line Number: 155
User prompt
remove json.stringify and replace it for something that does work
User prompt
keep track of how many balls there are of each kind, display it in a debug message
User prompt
now make every ball have a separate score, ball1 has 1 score etc
User prompt
make a score, add score for each ball that is currently on screen
User prompt
it should be absolutely impossible to clip trough the walls and floors and other balls
User prompt
make the grafity more
User prompt
make the grafity more
User prompt
make each ball wheigh the same no matter the size
User prompt
make the balls move less to rpevent clipping
User prompt
ìf a ball is under another ball reduce their grafity to prevent them pushing into each other
User prompt
if a ball is colliding with another one reduce its grafity to 0
User prompt
the gravity should be less
User prompt
double the size off each ball
User prompt
every ball should have a random 10pixel offset
User prompt
dont slow down the balls on collission
User prompt
'the slow movement of the balls when colliding is due to the small separation force applied during collision response and the significant damping of their velocities to make them stick together and move less after colliding.' fix this
User prompt
the balls should have less resistance when touching each other so that they move faster
User prompt
the balls should 'stick to each other' but should push each other a bit
User prompt
the balls cant go through the side of the screen
User prompt
change the background color to a darker version of the last spawned ball
User prompt
use lk.setscore and store the points off the ball somewhere else
===================================================================
--- original.js
+++ change.js
@@ -138,9 +138,9 @@
var ballTypeCounts = balls.reduce(function (acc, ball) {
acc[ball.type] = (acc[ball.type] || 0) + 1;
return acc;
}, {});
- console.log('Ball count: ' + ballCount + ', Ball types: ' + JSON.stringify(ballTypeCounts));
+ console.log('Ball count: ' + ballCount + ', Ball types: ' + ballTypesToString(ballTypeCounts));
LK.setTimeout(function () {
canThrowBall = true;
}, 1000);
}