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
@@ -51,20 +51,22 @@
self.angle = (self.angle || 0) + self.orbitSpeed;
self.angle %= Math.PI * 2;
self.x = self.radius * Math.cos(self.angle);
self.y = self.radius * Math.sin(self.angle);
- if (self.rotatingRight) {
- if (self.rotation < 0.15) {
- self.rotation += 0.05;
+ if (ENEMY_WOBBLE) {
+ if (self.rotatingRight) {
+ if (self.rotation < 0.15) {
+ self.rotation += 0.05;
+ } else {
+ self.rotatingRight = false;
+ }
} else {
- self.rotatingRight = false;
+ if (self.rotation > -0.15) {
+ self.rotation -= 0.05;
+ } else {
+ self.rotatingRight = true;
+ }
}
- } else {
- if (self.rotation > -0.15) {
- self.rotation -= 0.05;
- } else {
- self.rotatingRight = true;
- }
}
};
});
// Orbit class
@@ -287,8 +289,28 @@
/****
* Game Code
****/
+/****
+TODO:
+* What if holding mouse down didn't just stall movement, but move player the other way?
+* Update the instructions to explain the new hold to stall mechanic.
+* I often accidently press play again on game over, so maybe make an extra screen before gameover is shown.
+* Collectibles and a shop (but a shop for what?) Lives?
+* Implement the seeker type enemy.
+* Slower movement at start, then it increases as game progresses.
+* Figure out why stuff shows up in the center on start?
+* Center items better on orbits, or get better orbit graphics (by manual upload perhaps?)
+* Sound & Music.
+* Make sure orbits don't have too many obstacles.
+* Maybe skip player and obstacle updating while scaling?
+* Current min and max speeds of obstacles should be closer to each other.
+* Rotate orbits with obstacles statically distributed on them instead of calculating obstacle positions (for performance).
+* Would also be cool to be able to jump in AND out of orbits, but hard to implement. Or maybe just tap on the orbit to go to?
+****/
+// Initialize player
+var ENEMY_WOBBLE = false;
+var PARTICLES_ON = true;
var maxEnemiesPerOrbit = 2;
var fullscreenBackground = LK.getAsset('fullscreenBackground', {
anchorX: 0.507,
anchorY: 0.46,
@@ -438,20 +460,26 @@
var playerLayer = new Container();
//player = game.addChild(new Player());
player = playerLayer.addChild(new Player());
game.addChild(playerLayer);
-var particleContainer = new Container();
-//game.addChild(particleContainer);
-playerLayer.addChild(particleContainer);
-// Initialize particles array
-var particles = [];
-// Create particles
-for (var i = 0; i < 20; i++) {
- var particle = new Particle(i);
- particle.x = player.x;
- particle.y = player.y + player.height / 2;
- particleContainer.addChild(particle);
- particles.push(particle);
+if (PARTICLES_ON) {
+ // Ensure particles array is defined
+ if (!particles) {
+ var particles = [];
+ }
+ var particleContainer = new Container();
+ //game.addChild(particleContainer);
+ playerLayer.addChild(particleContainer);
+ // Initialize particles array
+ var particles = [];
+ // Create particles
+ for (var i = 0; i < 20; i++) {
+ var particle = new Particle(i);
+ particle.x = player.x;
+ particle.y = player.y + player.height / 2;
+ particleContainer.addChild(particle);
+ particles.push(particle);
+ }
}
//player.x = 2048 / 2;
//player.y = 2732 / 2 - 200; // Start the player 200px above the center
/*
@@ -474,8 +502,11 @@
}
if (!scaling) {
player.jump(currentOrbitIndex);
LK.gui.top.removeChild(instructionText);
+ if (orbitsCreated % 10 == 0) {
+ maxEnemiesPerOrbit++;
+ }
}
if (stalling) {
stalling = false;
}
@@ -579,5 +610,10 @@
obstacles.splice(i, 1);
//console.log('obstacles.length is now: ' + obstacles.length);
}
}
+ if (PARTICLES_ON) {
+ for (var i = particles.length - 1; i > 0; i++) {
+ particles[i].update();
+ }
+ }
});
\ No newline at end of file
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.