User prompt
Please fix the bug: 'storage is not defined' in or related to this line: 'storage.bestScore = storage.bestScore || 0;' Line Number: 953 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: LK.getMusic is not a function' in or related to this line: 'var bgMusic = LK.getMusic('BackgroundMusic');' Line Number: 1018
Code edit (4 edits merged)
Please save this source code
User prompt
when the game starts, start the backgroundmusic
Code edit (1 edits merged)
Please save this source code
Code edit (10 edits merged)
Please save this source code
User prompt
on first tap, start backgroundmusic
Code edit (12 edits merged)
Please save this source code
User prompt
in ObstacleExploding._move_migrated please update rotation, so that it's always facing centerx,centery
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: game.add is not a function' in or related to this line: 'game.add(self.parent);' Line Number: 301
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: trailgraphics is not defined' in or related to this line: 'trailgraphics.tint = 0xff0000;' Line Number: 138
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: particles.destroy is not a function' in or related to this line: 'particles.destroy();' Line Number: 1101
Code edit (3 edits merged)
Please save this source code
User prompt
explosiontrails should explode in a circular pattern
Code edit (2 edits merged)
Please save this source code
User prompt
Instead of just flashing the screen on player death, make the fireball it is explode in a bunch of fading trails like fireworks
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -2,15 +2,12 @@
* Classes
****/
/****
TODO:
-* Prøv at lave en exploding enemy.
-* Make turretshots lethal. (Or rework them - not good for gameplay now).
-* Try to think up a few more enemy types. Might need to slow difficulty progression down a bit to introduce them.
-* What if holding mouse down didn't just stall movement, but move player the other way?
-* Maybe give player 3 lives.
+* Instead of white flash on powerup, use particle explosion effect on all enemies.
+* Maybe give player 3 lives? That refill by collecting energy?
+* Maybe turret enemy can be used, if it's changed somehow?
* Sound & Music.
-* 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?
****/
var Collectible = Container.expand(function (i) {
var self = Container.call(this);
var particleGraphics = self.attachAsset('energyPill', {
@@ -253,9 +250,9 @@
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);
- self.rotation = Math.atan2(centerX - self.x, centerY - self.y);
+ self.rotation = Math.atan2(0 - self.y, 0 - self.x);
if (self.parent == orbits[currentOrbitIndex]) {
//self.exploding = true;
self.parent.addFragment(self.angle, self.orbitSpeed);
self.parent.addFragment(self.angle, self.orbitSpeed * -1);
@@ -447,14 +444,15 @@
self.addPowerup();
return;
}
if (orbitsCreated > 50) {
- // Turret enemy possible.
+ // Exploding enemy possible.
if (Math.random() < 0.1) {
var amount = Math.ceil(Math.random() * 3);
self.addCollectible(amount);
for (var i = 0; i < amount; i++) {
- self.addObstacleTurret();
+ //self.addObstacleTurret();
+ self.addObstacleExploding(self.barrierSpeed, i);
}
return;
}
}
@@ -491,10 +489,10 @@
// Default case, spawn X normal enemies
self.addCollectible(1);
self.numBarriers = Math.ceil(Math.random() * maxEnemiesPerOrbit);
for (var i = 0; i < this.numBarriers; i++) {
- //self.addBarrier(self.barrierSpeed, i);
- self.addObstacleExploding(self.barrierSpeed, i);
+ self.addBarrier(self.barrierSpeed, i);
+ //self.addObstacleExploding(self.barrierSpeed, i);
}
};
/*
var orbitGraphicsMask = self.attachAsset('blackSphere', {
@@ -700,8 +698,11 @@
self.radius = 0;
self.spread = Math.random() * 6 + 1;
self.centerX = 2048 / 2;
self.centerY = 2720 / 2;
+ //self.x = Math.random() * 2048;
+ //self.y = Math.random() * 2732;
+ self.radius = Math.random() * centerY;
self.moveAround = function () {
// Obstacle move logic
//var angleSpeed = -0.01 * self.parent.direction; //self.orbitSpeed;
//self.radius = self.parent.width / 2 - self.width / 2;
@@ -901,9 +902,9 @@
}
}
createOrbits();
// Add instruction text at the bottom of the screen
-var instructionText = new Text2('Tap and release to jump to the next orbit.\nCollect blue energy and Don\'t hit the red obstacles.', {
+var instructionText = new Text2('Tap and release to jump to the next orbit.\nCollect blue energy and don\'t hit the red obstacles.', {
size: 50,
fill: "#bbbbbb",
align: 'center',
strokeThickness: 10
@@ -962,8 +963,9 @@
game.on('down', function (x, y, obj) {
if (!GAME_ENDED) {
if (!stalling) {
stalling = true;
+ LK.playMusic('BackgroundMusic'); // Start background music on first tap
}
}
});
game.on('up', function (x, y, obj) {
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.