Code edit (21 edits merged)
Please save this source code
User prompt
when player hits river, tint the player all in red
User prompt
when player hits river, tint it all in red
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- original.js
+++ change.js
@@ -228,9 +228,9 @@
rotation: -Math.PI * 0.25 + Math.random() * Math.PI * 0.5,
flying: 1,
levitOffset: 525
});
- } else if (road && road.riverSegmentCount < ROAD_MAX_RIVER_SEGMENTS && !self.isRiver && !self.isWall && !self.previous.isWall && Math.random() < ROAD_GEN_FRAGILE_NATURE_CHANCE) {
+ } else if (road && road.riverSegmentCount < ROAD_MAX_RIVER_SEGMENTS && !self.isRiver && !self.isWall && !self.previous.isWall && (!self.previous.previous || !self.previous.previous.isWall) && (!self.previous.previous.previous || !self.previous.previous.previous.isWall) && Math.random() < ROAD_GEN_FRAGILE_NATURE_CHANCE) {
self.isRiver = true;
self.segmentRiver.visible = true;
road.riverSegmentCount++;
self.previous.isRiver = true;
@@ -241,9 +241,9 @@
});
attachObjectRadial(self.previous.background, new BoilingLava(), {
anchorR: 0.1 + 0.8 * Math.random()
});
- } else if (road && road.wallSegmentCount < ROAD_MAX_WALL_SEGMENTS && !self.isWall && !self.isRiver && !self.previous.isRiver && Math.random() < ROAD_GEN_WALL_CHANCE) {
+ } else if (road && road.wallSegmentCount < ROAD_MAX_WALL_SEGMENTS && !self.isWall && !self.isRiver && !self.previous.isRiver && (!self.previous.previous || !self.previous.previous.isRiver) && (!self.previous.previous.previous || !self.previous.previous.previous.isRiver) && Math.random() < ROAD_GEN_WALL_CHANCE) {
self.isWall = true;
road.wallSegmentCount++;
var wallIndex = Math.floor(Math.random() * ROAD_GEN_WALL_ASSETS);
var scale = 1; //0.9 + 0.2 * Math.random();
@@ -1040,9 +1040,9 @@
var ROAD_STEP_CHANCE_INCREMENT = 0; //0.05;
var ROAD_GEN_PLANT_ASSETS = 3;
var ROAD_GEN_PLANT_MAX = 3;
var ROAD_GEN_TREE_ASSETS = 4;
-var ROAD_GEN_TREE_CHANCE = 0.1;
+var ROAD_GEN_TREE_CHANCE = 0; //0.1;
var ROAD_GEN_CLOUD_ASSETS = 4;
var ROAD_GEN_CLOUD_CHANCE = 0.2;
var ROAD_GEN_DETRITUS_ASSETS = 2;
var ROAD_GEN_DETRITUS_CHANCE = 0.05;
@@ -1063,10 +1063,10 @@
var PLAYER_ANIMATION_SPEED_BASE = 0.02;
var PLAYER_SCALE_BASE = 1; //0.5;
var PLAYER_SPEED_BASE = MATH_2_PI / (GAME_TICKS * 10); // 10s to complete a revolution
var PLAYER_SPEED_FACTOR_BASE = 1.0;
-var PLAYER_SPEED_FACTOR_MAX = 1.5;
-var PLAYER_SPEED_FACTOR_INCREMENT = 0.001;
+var PLAYER_SPEED_FACTOR_MAX = 3.0; //1.5;
+var PLAYER_SPEED_FACTOR_INCREMENT = 0.002; //0.001;
var PLAYER_SPEED_DECREMENT = 0.01;
;
// Scoring Constants
var SCORE_TOTAL_DISTANCE = 500;
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.