User prompt
when the character goes to the right handle collisions of only the player2 when the character goes to the left handle collisions of only the player
User prompt
when the character goes to the right handle collisions only player when the character goes to the left handle collisions only player2
User prompt
collisions don't work properly. Fix it.
User prompt
to double the speed of the apples
User prompt
increase the speed of the players
User prompt
limit the birthplace of apples to the middle of the screen in height.
User prompt
to increase the life span of all apples
User prompt
when players collide with red apples, show an explosion in their place for half a second
User prompt
make the apples be born in the first third of the frame in height.
User prompt
make the apples grow taller.
User prompt
sometimes apples disappear without interaction with players all redo everything
User prompt
to increase the longevity of all apples without decreasing their fall rate
User prompt
to increase the longevity of all apples
User prompt
sometimes green apples spontaneously disappear far away from players fix the bug
User prompt
sometimes apples spontaneously disappear far away from players fix the bug
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
sometimes apples spontaneously disappear, fix the error.
User prompt
reduce player collision
User prompt
apples sometimes interact with players at a great distance, clarify player collisions
===================================================================
--- original.js
+++ change.js
@@ -139,24 +139,22 @@
if (Math.abs(player.x - player.targetX) > player.width / 2) {
if (player.x < player.targetX) {
player.moveRight();
player2.moveRight();
- player.visible = true;
- player2.visible = false;
+ player.visible = false;
+ player2.visible = true;
} else if (player.x > player.targetX) {
player.moveLeft();
player2.moveLeft();
- player.visible = false;
- player2.visible = true;
+ player.visible = true;
+ player2.visible = false;
}
}
// Move apples
for (var i = apples.length - 1; i >= 0; i--) {
apples[i].move();
- // Check if apple is caught by the player or player2 depending on direction
- var caughtByPlayer = player.visible && apples[i].isCaught(player);
- var caughtByPlayer2 = player2.visible && apples[i].isCaught(player2);
- if (caughtByPlayer || caughtByPlayer2) {
+ // Check if apple is caught by the player or player2 depending on their visibility
+ if (player.visible && apples[i].isCaught(player) || player2.visible && apples[i].isCaught(player2)) {
// Increase score
LK.setScore(LK.getScore() + 1);
// Remove caught apple
apples[i].destroy();
grass
the fields of Britain, cartoon style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
eureka moment, cartoon style, light, no people. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heart. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stars flying on an ellipse, cartoon style, side view , no people. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white "=" on a green apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white "F" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
the "G" sign on the red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white " (M" on a red apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white sign with a small "m" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white " /" on a green apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a white "R" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green
a white " 2" on a red apple.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.