User prompt
destroy milesbackground and miles on game over
Code edit (3 edits merged)
Please save this source code
User prompt
jump duration should be reduced by 5% every 10 seconds
User prompt
reduce split time by 5% every 10 seconds
User prompt
add a contnrol check to make sure nothing happens if uses swipes down again while player is split.
User prompt
while player is split, disable touch screen until it is merged again
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1517
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1545
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1545
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1545
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1549
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1549
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1549
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1587
User prompt
Please fix the bug: 'TypeError: Cannot set properties of null (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1517
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1517
User prompt
replance obstacleline, to use 3 small obsacles next to each other
User prompt
For obstacle line, use 3 small obstacles one on each lane, instead of using lineobstacle
Code edit (2 edits merged)
Please save this source code
User prompt
make sure obstacleline attaches obstacles one next to each other
User prompt
bigobstacles should spawn offscreen more
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
every 10 seconds reduce 5% the interval of the obstacle spawned
User prompt
Please fix the bug: 'TypeError: Cannot set properties of null (setting 'update')' in or related to this line: 'leftPlayer.update = function () {' Line Number: 1525
===================================================================
--- original.js
+++ change.js
@@ -723,9 +723,9 @@
type: 'TextObstacle',
interval: 100,
text: 'Swipe UP to JUMP!'
}, {
- type: 'ObstacleLine',
+ type: 'LineObstacle',
interval: 100
}, {
type: 'SmallObstaclesSidesCoinMiddle',
interval: 100
@@ -775,9 +775,9 @@
}, {
type: 'SmallObstacleRightCenterCoinLeft',
interval: 100
}, {
- type: 'ObstacleLine',
+ type: 'LineObstacle',
interval: 100
}, {
type: 'SmallObstacleCenterCoinLeftPowerUpRight',
interval: 100
@@ -958,9 +958,9 @@
}, {
type: 'SmallObstaclesSidesCoinMiddle',
interval: 100
}, {
- type: 'ObstacleLine',
+ type: 'LineObstacle',
interval: 100
}, {
type: 'SmallObstacleRightCenterCoinLeft',
interval: 100
@@ -981,9 +981,9 @@
}, {
type: 'SmallObstacleRightCenterCoinLeft',
interval: 100
}, {
- type: 'ObstacleLine',
+ type: 'LineObstacle',
interval: 100
}, {
type: 'SmallObstacleCenterCoinLeftPowerUpRight',
interval: 100
@@ -1021,9 +1021,9 @@
// Function to spawn BigObstacle with specific rules
function spawnBigObstacle() {
var bigObstacle = new BigObstacle();
bigObstacle.x = 2048 / 2; // Center the BigObstacle
- bigObstacle.y = -bigObstacle.height / 4;
+ bigObstacle.y = -bigObstacle.height * 2;
if (!obstacles) {
obstacles = [];
}
obstacles.push(bigObstacle);
@@ -1561,9 +1561,9 @@
// Function to spawn SmallObstacle
function spawnSmallObstacle() {
var smallObstacle = new SmallObstacle();
smallObstacle.x = 2048 / 2; // Center the SmallObstacle
- smallObstacle.y = -smallObstacle.height * 2;
+ smallObstacle.y = -smallObstacle.height * 3;
smallObstacle.speed = gameSpeed; // Ensure constant speed
if (!obstacles) {
obstacles = [];
}
@@ -1577,9 +1577,9 @@
var coinRight = new Coin();
smallObstacleLeft.x = lanes[0]; // Left lane
smallObstacleMiddle.x = lanes[1]; // Middle lane
coinRight.x = lanes[2]; // Right lane
- smallObstacleLeft.y = smallObstacleMiddle.y = coinRight.y = -smallObstacleLeft.height * 2;
+ smallObstacleLeft.y = smallObstacleMiddle.y = coinRight.y = -smallObstacleLeft.height * 3;
if (!obstacles) {
obstacles = [];
}
if (!coins) {
@@ -1614,9 +1614,9 @@
var coinLeft = new Coin();
smallObstacleRight.x = lanes[2]; // Right lane
smallObstacleCenter.x = lanes[1]; // Center lane
coinLeft.x = lanes[0]; // Left lane
- smallObstacleRight.y = smallObstacleCenter.y = coinLeft.y = -smallObstacleRight.height * 2;
+ smallObstacleRight.y = smallObstacleCenter.y = coinLeft.y = -smallObstacleRight.height * 3;
if (!obstacles) {
obstacles = [];
}
if (!coins) {
@@ -1645,12 +1645,11 @@
};
}
// Function to spawn a line of obstacles
function spawnObstacleLine() {
- var obstacleWidth = LK.getAsset('obstacle', {}).width;
for (var i = 0; i < lanes.length; i++) {
var obstacle = new Obstacle();
- obstacle.x = i * obstacleWidth;
+ obstacle.x = lanes[i];
obstacle.y = -obstacle.height * 2;
if (!obstacles) {
obstacles = [];
}
@@ -1660,27 +1659,27 @@
}
function spawnSmallObstacleCenterCoinLeftPowerUpRight() {
var smallObstacleCenter = new SmallObstacle();
smallObstacleCenter.x = lanes[1]; // Center lane
- smallObstacleCenter.y = -smallObstacleCenter.height * 2;
+ smallObstacleCenter.y = -smallObstacleCenter.height * 3;
+ coinLeft.y = -coinLeft.height * 3;
+ powerUpRight.y = -powerUpRight.height * 3;
smallObstacleCenter.speed = gameSpeed; // Ensure constant speed
if (!obstacles) {
obstacles = [];
}
obstacles.push(smallObstacleCenter);
game.addChild(smallObstacleCenter);
var coinLeft = new Coin();
coinLeft.x = lanes[0]; // Left lane
- coinLeft.y = -coinLeft.height * 2;
coinLeft.speed = gameSpeed; // Ensure constant speed
if (!coins) {
coins = [];
}
coins.push(coinLeft);
game.addChild(coinLeft);
var powerUpRight = new PowerUp();
powerUpRight.x = lanes[2]; // Right lane
- powerUpRight.y = -powerUpRight.height * 2;
powerUpRight.speed = gameSpeed; // Ensure constant speed
if (!powerups) {
powerups = [];
}
@@ -1690,24 +1689,24 @@
// Function to spawn SmallObstacles on the sides and a Coin in the middle
function spawnSmallObstaclesSidesCoinMiddle() {
var smallObstacleLeft = new SmallObstacle();
smallObstacleLeft.x = lanes[0]; // Left lane
- smallObstacleLeft.y = -smallObstacleLeft.height * 2;
+ smallObstacleLeft.y = -smallObstacleLeft.height * 3;
+ smallObstacleRight.y = -smallObstacleRight.height * 3;
+ coinMiddle.y = -coinMiddle.height * 3;
smallObstacleLeft.speed = gameSpeed; // Ensure constant speed
if (!obstacles) {
obstacles = [];
}
obstacles.push(smallObstacleLeft);
game.addChild(smallObstacleLeft);
var smallObstacleRight = new SmallObstacle();
smallObstacleRight.x = lanes[2]; // Right lane
- smallObstacleRight.y = -smallObstacleRight.height * 2;
smallObstacleRight.speed = gameSpeed; // Ensure constant speed
obstacles.push(smallObstacleRight);
game.addChild(smallObstacleRight);
var coinMiddle = new Coin();
coinMiddle.x = lanes[1]; // Middle lane
- coinMiddle.y = -coinMiddle.height * 2;
coinMiddle.speed = gameSpeed; // Ensure constant speed
if (!coins) {
coins = [];
}
@@ -1717,27 +1716,27 @@
// Function to spawn SmallObstacle in the center and Coins on the sides
function spawnSmallObstacleCenterCoinSides() {
var smallObstacleCenter = new SmallObstacleCenterCoinSides();
smallObstacleCenter.x = lanes[1]; // Center lane
- smallObstacleCenter.y = -smallObstacleCenter.height * 2;
+ smallObstacleCenter.y = -smallObstacleCenter.height * 3;
+ coinLeft.y = -coinLeft.height * 3;
+ coinRight.y = -coinRight.height * 3;
smallObstacleCenter.speed = gameSpeed; // Ensure constant speed
if (!obstacles) {
obstacles = [];
}
obstacles.push(smallObstacleCenter);
game.addChild(smallObstacleCenter);
var coinLeft = new Coin();
coinLeft.x = lanes[0]; // Left lane
- coinLeft.y = -coinLeft.height * 2;
coinLeft.speed = gameSpeed; // Ensure constant speed
if (!coins) {
coins = [];
}
coins.push(coinLeft);
game.addChild(coinLeft);
var coinRight = new Coin();
coinRight.x = lanes[2]; // Right lane
- coinRight.y = -coinRight.height * 2;
coinRight.speed = gameSpeed; // Ensure constant speed
coins.push(coinRight);
game.addChild(coinRight);
}
cartoon white circle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon light blue circle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon white square. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
black rectangle