Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
log variables before the line if (!jumpAction && jumpStep >= PLAYER_JUMP_STEP_MIN || jumpStep >= PLAYER_JUMP_STEP_MAX)
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
add an asset for the background
Code edit (14 edits merged)
Please save this source code
User prompt
in Sun class, animate the alpha of each circle alternatively
User prompt
Please fix the bug: 'Uncaught ReferenceError: rotation0 is not defined' in or related to this line: 'parent.attachAsset(asset, {' Line Number: 119
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
add a starfield in the background
Code edit (1 edits merged)
Please save this source code
Remix started
Copy The Road Runner
===================================================================
--- original.js
+++ change.js
@@ -24,9 +24,9 @@
return self;
});
var Sun = ConfigContainer.expand(function (config) {
var self = ConfigContainer.call(this, config);
- for (var i = 0; i < 10; i++) {
+ for (var i = 0; i < 5; i++) {
self.attachAsset('circle', {
width: 500 + 200 * i,
height: 500 + 200 * i,
color: 0xFFFF00,
@@ -46,12 +46,12 @@
function update() {
if (LK.ticks % 30 == 0) {
for (var i = 0; i < self.children.length - 1; i++) {
var circle = self.children[i];
- if (i % 2 === 0) {
- circle.alpha = 0.01 + 0.09 * Math.abs(Math.sin(LK.ticks / 30));
+ if (i % 2 !== 0) {
+ circle.alpha = 0.01 + 0.09 * Math.abs(Math.sin(LK.ticks / 90));
} else {
- circle.alpha = 0.01 + 0.09 * Math.abs(Math.cos(LK.ticks / 30));
+ circle.alpha = 0.01 + 0.09 * Math.abs(Math.cos(LK.ticks / 90));
}
}
}
}
@@ -671,9 +671,9 @@
var ROAD_FREE_RUN_COUNT = 5;
var ROAD_STEP_COUNT = 5;
var ROAD_STEP_DEFAULT = 2;
var ROAD_STEP_HEIGHT_BASE = 400;
-var ROAD_STEP_HEIGHT_INCREMENT = 80;
+var ROAD_STEP_HEIGHT_INCREMENT = 0;
var ROAD_STEP_CHANCE_BASE = 0.1;
var ROAD_STEP_CHANCE_INCREMENT = 0.05;
var ROAD_GEN_PLANT_ASSETS = 3;
var ROAD_GEN_PLANT_MAX = 3;
@@ -713,8 +713,14 @@
var gameOver = false;
var distanceRemaining = SCORE_TOTAL_DISTANCE;
;
// Instances
+var background = game.addChild(LK.getAsset('background', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: GAME_WIDTH / 2,
+ y: GAME_HEIGHT / 2
+}));
var starfield = game.addChild(new Starfield({
starCount: 200,
starColor: 0xFFFFFF,
starSize: 2
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.