Code edit (3 edits merged)
Please save this source code
User prompt
add a isFalling property to the athlete and update it
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: track is not defined' in or related to this line: 'track.update();' Line Number: 403
User prompt
call track update in gamePlaying
User prompt
use the track class in gameInitialize
User prompt
add a track class
User prompt
Please fix the bug: 'TypeError: undefined is not an object (evaluating 'track.x = trackPosition')' in or related to this line: 'track.x = trackPosition;' Line Number: 380
User prompt
Please fix the bug: 'ReferenceError: track is not defined' in or related to this line: 'track.x = trackPosition;' Line Number: 379
User prompt
make the tracks indefinetly scroll horizontally at the same speed as obstacles
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Stop calling the run anim when falling
Code edit (1 edits merged)
Please save this source code
User prompt
Make a glow effect on the central rod
User prompt
Call the fall anim before gameover
Code edit (2 edits merged)
Please save this source code
User prompt
create a fall anim in athlete class
Code edit (12 edits merged)
Please save this source code
User prompt
add and show the background asset
User prompt
add an asset for the background
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: runAnim is not defined' in or related to this line: 'runAnim();' Line Number: 129
===================================================================
--- original.js
+++ change.js
@@ -22,9 +22,9 @@
anchorX: 0.5,
anchorY: 0.5,
scaleX: 1,
scaleY: 1,
- rotation: 0.125,
+ rotation: 0.125 * 0,
tint: 0x000000 //self.tint // TEMP DEBUG
});
self.head = self.trunk.attachAsset('head', {
anchorX: 0.5,
@@ -142,9 +142,9 @@
self.rightArm.x = 10 * (1 - armSwitchProgress) - 5 * armSwitchProgress;
self.leftArm.x = -15 * (1 - armSwitchProgress) + 20 * armSwitchProgress;
self.rightLeg.x = 5 * (1 - armSwitchProgress) - 5 * armSwitchProgress;
self.leftLeg.x = -10 * (1 - armSwitchProgress) + 10 * armSwitchProgress;
- self.rightArm.rotation = runningArmAngle;
+ self.rightArm.rotation = runningArmAngle - Math.PI * 0.5;
self.leftArm.rotation = -runningArmAngle;
self.rightLeg.rotation = -runningLegAngle;
self.leftLeg.rotation = runningLegAngle;
self.trunk.width = 30 - 10 * (runningArmAngle * Math.PI * 0.5); //armSwitchProgress; // + 10 * Math.abs(runningArmAngle);
@@ -156,31 +156,31 @@
};
self.jumpAnim = function () {
var ocsilDelay = 50;
var armsAmplitude = 1;
- var legsAmplitude = 1;
// Simulate running by continuously balancing the arms and legs
var runningArmAngle = Math.sin(LK.ticks / ocsilDelay) * armsAmplitude; // Oscillate arm angle to simulate running faster
- var runningLegAngle = Math.sin(LK.ticks / ocsilDelay) * legsAmplitude; // Oscillate leg angle to simulate running faster
var armSwitchProgress = (Math.sin(LK.ticks / 5) + 0) / 2; // Normalize between 0 and 1
self.rightArm.x = 10 * (1 - armSwitchProgress) - 5 * armSwitchProgress;
self.leftArm.x = -15 * (1 - armSwitchProgress) + 20 * armSwitchProgress;
self.rightLeg.x = 5 * (1 - armSwitchProgress) - 5 * armSwitchProgress;
self.leftLeg.x = -10 * (1 - armSwitchProgress) + 10 * armSwitchProgress;
- self.rightArm.rotation = runningArmAngle;
- self.leftArm.rotation = -runningArmAngle;
self.trunk.width = 30 - 10 * (runningArmAngle * Math.PI * 0.5); //armSwitchProgress; // + 10 * Math.abs(runningArmAngle);
- var legRotationSpeed = 0.05; // Speed of rotation change
+ var rotationSpeed = 0.05; // Speed of rotation change
if (self.speedY > 0) {
+ self.rightArm.rotation += (0 - self.rightArm.rotation) * rotationSpeed;
+ self.leftArm.rotation += (0 - self.leftArm.rotation) * rotationSpeed;
// Return legs to initial rotation when descending
- self.rightLeg.rotation += (0 - self.rightLeg.rotation) * legRotationSpeed;
- self.leftLeg.rotation += (0 - self.leftLeg.rotation) * legRotationSpeed;
- self.leftLeg.height += 35 * legRotationSpeed;
+ self.rightLeg.rotation += (0 - self.rightLeg.rotation) * rotationSpeed;
+ self.leftLeg.rotation += (0 - self.leftLeg.rotation) * rotationSpeed;
+ self.leftLeg.height += 35 * rotationSpeed;
} else {
+ //self.rightArm.rotation += -Math.PI * 0.1 * rotationSpeed;
+ //self.leftArm.rotation += (1 - self.leftArm.rotation) * rotationSpeed;
// Continue with jump animation adjustments
- self.rightLeg.rotation += (-2 - self.rightLeg.rotation) * legRotationSpeed;
- self.leftLeg.rotation += (1.8 - self.leftLeg.rotation) * legRotationSpeed;
- self.leftLeg.height -= 35 * legRotationSpeed;
+ self.rightLeg.rotation += (-2 - self.rightLeg.rotation) * rotationSpeed;
+ self.leftLeg.rotation += (1.8 - self.leftLeg.rotation) * rotationSpeed;
+ self.leftLeg.height -= 35 * rotationSpeed;
}
};
self.setPosture = function (newPosture) {
log("Set posture: " + newPosture.name);
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.