Code edit (2 edits merged)
Please save this source code
User prompt
fix this
Code edit (3 edits merged)
Please save this source code
User prompt
remove acceleration from the coin, it should have a constant speed
User prompt
ensure the coin's speed is set in a single place in the code
Code edit (2 edits merged)
Please save this source code
User prompt
the coin speed should be defined as a static value instead of a division from another value
Code edit (10 edits merged)
Please save this source code
User prompt
decrease the speed of the coin
User prompt
a coin is spawned similar to the obstacles, but instead of being spawned by tapping it's spawned when the score incremnts by 10. so at 10 spawn a coin, then another at 20 points then another 30 and so on. the coin spawns similarly to the obstacles in the sense they spawn one time from one side and the next from the other side. but coins start spawning from the left, so the first spawn from left, the second from right and then you repeat again from left. collecting a coin increases the score by 5 points
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
spawn the ink from the center of the player instead of lower from it
Code edit (1 edits merged)
Please save this source code
User prompt
ass a 200 pixels pad to both the top and bottom side of the screen, so enemies can only spawn 200 pixels higher than the bottom and 200 pixels lower than the top side of the screen
Code edit (1 edits merged)
Please save this source code
User prompt
instead of spawning just one enemy on every tap, spawn 2. one from the right and one from the left
User prompt
turn the player's hitbox into a circle instead of a square
Code edit (3 edits merged)
Please save this source code
User prompt
whenever the score incremnents, bump it's size by 20% before returning to it's original size
Code edit (2 edits merged)
Please save this source code
User prompt
fix the acceleration to also consider enemies spawning from the left, as right now the acceelration is setup as a negative value, making the enemies spawning from left reverse direction, which is a bug
User prompt
fix the acceleration to also consider enemies spawning from the left, as right now the acceelration is setup as a negative value, making the enemies spawning from left reverse direction, which is a bug
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -121,10 +121,10 @@
var GameVariables = function GameVariables() {
this.jumpSpeed = -15;
this.gravity = 0.2;
this.acceleration = 0.001;
- this.enemySpeed = -10;
- this.enemyAcceleration = -0.25; // Add enemyAcceleration to the GameVariables class
+ this.enemySpeed = -15;
+ this.enemyAcceleration = -0.1; // Add enemyAcceleration to the GameVariables class
this.velocityY = 0;
this.isJumping = false;
};
var gameVariables = new GameVariables();
@@ -177,8 +177,14 @@
game.addChild(newObstacle);
// Increment score
LK.setScore(LK.getScore() + 1);
scoreTxt.setText(LK.getScore());
+ // Increase the size of the score text by 20%
+ scoreTxt.scale.set(1.2);
+ // Return the size of the score text to its original size after 100ms
+ LK.setTimeout(function () {
+ scoreTxt.scale.set(1);
+ }, 100);
});
LK.on('tick', function () {
player.update();
// Check if any part of the player touches the top or bottom side of the screen
cute tiny octopus. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cute angry spearfish. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
inside the depths of the blue ocean background. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
silver octo coin. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
exploded silver fragments. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.