Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: isFalling is not defined' in or related to this line: 'obstacleSpawnTicker += isFalling ? 0 : 1;' Line Number: 474
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: fallSpeed is not defined' in or related to this line: 'self.rightArm.rotation += (Math.PI / 2 - self.rightArm.rotation) * fallSpeed;' Line Number: 245
Code edit (1 edits merged)
Please save this source code
User prompt
add obstaclesLine2
User prompt
add a second line of obstacles
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: track4 is not defined' in or related to this line: 'track4.update();' Line Number: 458
User prompt
make the new tracks move like the previous one
User prompt
add other tracks above current tracks
Code edit (17 edits merged)
Please save this source code
User prompt
add a debugMarker to the game
Code edit (1 edits merged)
Please save this source code
User prompt
separate gamePlaying code in functions
Code edit (1 edits merged)
Please save this source code
Code edit (22 edits merged)
Please save this source code
User prompt
divide globalspeed by when falling
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Don’t Count a point when falling
Code edit (1 edits merged)
Please save this source code
User prompt
Update score text
Code edit (15 edits merged)
Please save this source code
User prompt
Add a text2 at top center for the score
===================================================================
--- original.js
+++ change.js
@@ -315,9 +315,8 @@
var athlete;
var obstacles = [];
var obstaclesLine2 = [];
var groundLevel = 2732 - 200; // Ground level set 200px from the bottom
-var isFalling = false; // Indicates if the athlete is currently falling
var obstacleSpawnTicker = 0;
var obstacleSpawnRate = 180; // Spawn an obstacle every 2 seconds
var obstacleJustPassed = false;
var track;
@@ -460,9 +459,9 @@
}
}
function spawnObstacles() {
// Spawn obstacles
- obstacleSpawnTicker += isFalling ? 0 : 1;
+ obstacleSpawnTicker += athlete.isFalling ? 0 : 1;
if (obstacleSpawnTicker >= obstacleSpawnRate) {
obstacleSpawnTicker = 0;
// Line 1
var newObstacle = new Obstacle(obstacles.length);
Elongated elipse with black top half and white bottom half.
full close and front view of empty stands. retro gaming style
delete
delete
Basquettes à ressort futuriste. vue de profile. Retro gaming style
a blue iron man style armor flying. Retro gaming style
a blue iron man style armor flying horizontally. Retro gaming style
round button with a big "up" arrow icon and a small line under it. UI
A big black horizontal arrow pointing left with centred text 'YOU' in capital letters, painted on an orange floor.. horizontal and pointing left
remove
gold athletics medal with ribbon. retro gaming style
a black oval with a crying smiley face.