Code edit (2 edits merged)
Please save this source code
User prompt
in jumpAnim, make the change from current legs rotation to athlete.rightLeg.rotation = -1.5; athlete.leftLeg.rotation = 1; progressive
Code edit (17 edits merged)
Please save this source code
User prompt
in jumpAnim, make the change to athlete.rightLeg.rotation = -1.5; athlete.leftLeg.rotation = 1; progressive
Code edit (1 edits merged)
Please save this source code
User prompt
in jumpAnim, do only one oscillation
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'isOnGround')' in or related to this line: 'if (self.isOnGround) {' Line Number: 298
Code edit (23 edits merged)
Please save this source code
User prompt
in gamePlaying, call jumpAnim instead of runAnim when user taps the sceen
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
make the switch between x position of left and right arms progressive
User prompt
add a switch between x position of left and right arms at the same rythm as the oscillation
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
Add a little randomness to the ocsillation but after a full sinusoid
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (10 edits merged)
Please save this source code
User prompt
Speed up the oscillation
Code edit (1 edits merged)
Please save this source code
Code edit (21 edits merged)
Please save this source code
User prompt
add also a movement to the legs
===================================================================
--- original.js
+++ change.js
@@ -169,12 +169,12 @@
/****
* Game Code
****/
+// Enumeration for game states
/****************************************************************************************** */
/************************************** GLOBAL VARIABLES ********************************** */
/****************************************************************************************** */
-// Enumeration for game states
var GAME_STATE = {
INIT: 'INIT',
MENU: 'MENU',
HELP: 'HELP',
@@ -328,11 +328,11 @@
athlete.rightLeg.x = 5 * (1 - armSwitchProgress) - 5 * armSwitchProgress;
athlete.leftLeg.x = -10 * (1 - armSwitchProgress) + 10 * armSwitchProgress;
athlete.rightArm.rotation = runningArmAngle;
athlete.leftArm.rotation = -runningArmAngle;
- var legSwitchProgress = (Math.sin(LK.ticks / 5) + 1) / 2; // Normalize between 0 and 1 for smooth transition
- athlete.rightLeg.rotation = -1.5 * legSwitchProgress; //-runningLegAngle;
- athlete.leftLeg.rotation = 1 * legSwitchProgress;
+ var legRotationSpeed = 0.05; // Speed of rotation change
+ athlete.rightLeg.rotation += (-1.5 - athlete.rightLeg.rotation) * legRotationSpeed;
+ athlete.leftLeg.rotation += (1 - athlete.leftLeg.rotation) * legRotationSpeed;
athlete.trunk.width = 30 - 10 * (runningArmAngle * Math.PI * 0.5); //armSwitchProgress; // + 10 * Math.abs(runningArmAngle);
//athlete.rightArm.height = 180 * (0.5 + Math.abs(runningArmAngle));
//athlete.leftArm.height = 150 * (0.7 + Math.abs(runningArmAngle));
//athlete.rightLeg.height = 200 * (0.5 + Math.abs(runningArmAngle + Math.PI * 0.125));
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.