Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
play slide sound when sliding
Code edit (7 edits merged)
Please save this source code
User prompt
in callGameOver wait 1sec befaore falling gameover
Code edit (1 edits merged)
Please save this source code
User prompt
adapt the speed of the jump and the speed of the fall to the player speed.
User prompt
make that at high speed player don't jump too far because of its speed
Code edit (2 edits merged)
Please save this source code
User prompt
adapt jump and gravity to speed so that at high speed player doesn't jump too far becaus of speed
User prompt
make jump and gravity increase proportionnaly to speed
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
Analyse the code then adapt it to make player appear behind the road assets but WITHOUT changing any of the road or player movment logic
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: road is undefined' in or related to this line: 'var player = game.addChild(new Player({' Line Number: 1155
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: road is undefined' in or related to this line: 'var player = game.addChild(new Player({' Line Number: 1152
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'parent.attachAsset(asset, {' Line Number: 214
User prompt
Please fix the bug: 'TypeError: parent is undefined' in or related to this line: 'parent.attachAsset(asset, {' Line Number: 214
User prompt
make clouds appear in front of player (z-index) but without altering their logic or movement
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: clone is not defined' in or related to this line: 'if (clone) {' Line Number: 254
===================================================================
--- original.js
+++ change.js
@@ -639,11 +639,8 @@
self.slideStart = slideStart;
self.slideEnd = slideEnd;
;
function update() {
- if (!road) {
- return;
- }
var nextNode = road.getNode(1);
var currentNode = nextNode.previous;
// Update horizontal movement
var outputSpeed = PLAYER_SPEED_BASE * speedFactor;
@@ -1104,19 +1101,19 @@
var sun = game.addChild(new Sun({
x: GAME_WIDTH / 2,
y: 50
}));
-var player = game.addChild(new Player({
- //x: road.x,
- //y: road.y,
- scale: 0.5
-}));
-var road = game.addChild(new Road({
+var roadContainer = game.addChild(new Container());
+var road = roadContainer.addChild(new Road({
x: GAME_WIDTH / 2,
y: GAME_HEIGHT - GAME_WIDTH / 2
}));
-player.x = road.x;
-player.y = road.y;
+var playerContainer = game.addChild(new Container());
+var player = playerContainer.addChild(new Player({
+ x: road.x,
+ y: road.y,
+ scale: 0.5
+}));
var distanceText = game.addChild(new BorderedText(distanceRemaining + 'm', {
x: road.x,
y: road.y - TEXT_DEFAULT_SIZE,
anchorX: 0.5,
white
circle sliced into many pieces, flat image. 2d, white background, shadowless.
pixel art of a tall, tree. game asset, 2d, white background, shadowless.
pixel art cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark space.
flying lava bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a bonus crystal ball with the recycle symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
top view A green round start button empty in the center like a ring.