Code edit (22 edits merged)
Please save this source code
User prompt
in the dragon move function, please adjust the segment's radius up and down to convey a wavelike, snakelike slithering movement of the whole dragons body.
Code edit (1 edits merged)
Please save this source code
Code edit (10 edits merged)
Please save this source code
User prompt
implement the obstacleseeker function determineDirection
Code edit (10 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: 706
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
before gameover, show a screen for five seconds, with the text: "Orbits jumped: XX\nEnergy Collected: YY\nFinal Score: (XX+YY) = ZZ"
Code edit (15 edits merged)
Please save this source code
User prompt
when a collectible is collected, show a little textlabel with the text "+1" floating up from the point instead of flashing the screen blue.
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: 650
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of null (reading 'width')' in or related to this line: 'self.radius = self.parent.width / 2 * (1900 / self.parent.width) - self.width / 2; // * (100 / self.width);' Line Number: 59
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- 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.