Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'update')' in or related to this line: 'particles[i].update();' Line Number: 626
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: collectible is not a constructor' in or related to this line: 'var collectible = new collectible();' Line Number: 130
Code edit (1 edits merged)
Please save this source code
Code edit (13 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: scoreText is not defined' in or related to this line: 'scoreText.x -= 20;' Line Number: 384
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
make a fullscreen background asset and attach it before anything else
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (17 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: particles is not defined' in or related to this line: 'particles.push(particle);' Line Number: 386
Code edit (1 edits merged)
Please save this source code
User prompt
with each jump, set the background color of the game to a new color from the rainbowcolors,
Code edit (1 edits merged)
Please save this source code
User prompt
Migrate to the latest version of LK
Remix started
Copy Orbit Jump
===================================================================
--- original.js
+++ change.js
@@ -88,10 +88,9 @@
//this.width = 1900 - i * 500;
self.width = self.height = 1900 - i * 500;
//self.height = self.width;
if (i !== 0) {
- // TODO: there should be much fewer barriers spawned, especially when many of them are static.
- //self.numBarriers = 1 + Math.floor(Math.random() * (i + currentOrbitIndex));
+ // Spawn normal enemies
self.numBarriers = Math.ceil(Math.random() * maxEnemiesPerOrbit);
if (self.numBarriers > maxEnemiesPerOrbit) {
self.numBarriers = maxEnemiesPerOrbit;
}
@@ -99,16 +98,14 @@
if (orbitsCreated % 17 == 0) {
self.numBarriers = 0;
self.addPowerup();
}
- //self.barrierSpeed = Math.random() * currentOrbitIndex + 1 / 20;
- // TODO: Insert logic here to determine speed of enemies in this orbit.
// We might want some static orbits. And max speed should be limited by total progression.
if (Math.random() <= 0.2) {
self.barrierSpeed = 0;
} else {
- // the global var enemySpeed is then incremented every 10 obits or so.
- self.barrierSpeed = enemySpeed * Math.random() * self.direction;
+ // The global var maxEnemySpeed is incremented every 10 obits or so.
+ self.barrierSpeed = maxEnemySpeed * Math.random() * self.direction;
}
//self.barrierSpeed = 0.01 + Math.random() * 0.015 * self.direction;
for (var j = 0; j < this.numBarriers; j++) {
self.addBarrier(self.barrierSpeed, j);
@@ -253,10 +250,11 @@
};
self._update_migrated = function () {
var centerX = 2048 / 2;
var centerY = 2732 / 2;
- self.angleSpeed = 0.01;
- self.angle = (self.angle || 0) + self.angleSpeed;
+ //self.angleSpeed = 0.01;
+ //self.angle = (self.angle || 0) + self.angleSpeed;
+ self.angle = (self.angle || 0) + playerSpeed;
self.x = centerX + self.radius * Math.cos(self.angle);
self.y = centerY + self.radius * Math.sin(self.angle);
};
});
@@ -402,10 +400,10 @@
};
// Initialize assets used in this game.
// Game variables
var player;
-var playerSpeed = 1;
-var enemySpeed = 0.01;
+var playerSpeed = 0.005; //0.01;
+var maxEnemySpeed = 0.01;
var collectiblesCollected = 0;
var orbits = [];
var obstacles = [];
var currentOrbitIndex = 0;
@@ -468,12 +466,12 @@
playerLayer.addChild(particleContainer);
// Initialize particles array
//var particles = [];
// Create particles
- for (var i = 0; i < 20; i++) {
+ for (var i = 0; i < 30; i++) {
var particle = new Particle(i);
particle.x = player.x;
- particle.y = player.y + player.height / 2;
+ particle.y = player.y; // + player.height * 3;
particleContainer.addChild(particle);
particles.push(particle);
}
}
@@ -484,8 +482,13 @@
console.log('Orbits.length is now: ' + orbits.length);
console.log('CurrentOrbitIndex is now: ' + currentOrbitIndex);
console.log('width of currentorbit is now: ' + orbits[currentOrbitIndex].width);
*/
+function increaseDifficulty() {
+ maxEnemiesPerOrbit++;
+ maxEnemySpeed += 0.002;
+ playerSpeed += 0.002;
+}
var stalling = false;
// Game logic
game.on('down', function (x, y, obj) {
if (!stalling) {
@@ -500,9 +503,11 @@
if (!scaling) {
player.jump(currentOrbitIndex);
LK.gui.top.removeChild(instructionText);
if (orbitsCreated % 10 == 0) {
- maxEnemiesPerOrbit++;
+ //maxEnemiesPerOrbit++;
+ //maxEnemySpeed += 0.002;
+ increaseDifficulty();
}
}
if (stalling) {
stalling = false;
Make the circle completely black on all pixels.
A white star. Flat vector art.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
The line-color should be white, and the circle a bit thinner.
a wonderful but not very dense starfield. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A glowing blue comic energy orb. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
I'd like a top down image of a super fine and thin white empty cicular band on a transparent background. It should be flatly white and with no other details, and of course perfectly round with blank space in the center. The band's width should be less than one percent of the width of the circle itself, as if a 1 cm band were laid out in a circle with a diameter of 100 cm. Single Game Texture. In-Game asset. 2d. Blank background.