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
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Point is not a constructor' in or related to this line: 'var globalPlayerPosition = player.toGlobal(new Point(0, 0));' Line Number: 307
User prompt
please factor into the lookatplayer and shootatplayer functions, that they should work in the global scope, because player and the turretobstacle can be children of different containers.
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: speed is not defined' in or related to this line: 'turret.initialPosition(speed, angle, radius);' Line Number: 444
Code edit (1 edits merged)
Please save this source code
Code edit (20 edits merged)
Please save this source code
User prompt
please implement obstacleturrets shootatplayer method, so it sends turretshot in players direction
User prompt
please implement obstacleTurret's lookAtPlayer function, so it does what it says
Code edit (1 edits merged)
Please save this source code
Code edit (15 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in or related to this line: 'player.radius = orbits[currentOrbitIndex].width / 2 - 65;' Line Number: 783
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'width')' in or related to this line: 'player.radius = orbits[currentOrbitIndex].width / 2 - 65;' Line Number: 767
Code edit (1 edits merged)
Please save this source code
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.
===================================================================
--- original.js
+++ change.js
@@ -10,17 +10,13 @@
* Try to think up a few more enemy types. Might need to slow difficulty progression down a bit to introduce them.
* Dragon could have some special behaviour, so it's not just a fancy graphic, but a new gameplay element. Maybe it could
only spawn in orbits with a lot of energy, that it eats as it passes by them, and if it eats them all before player bypasses
it, it explodes in an area-attack? Spanning many orbits?
-* Make particle tail jump when player jumps. (or invisible for a few ticks, to hide the afterglow in the skipped orbit).
* What if holding mouse down didn't just stall movement, but move player the other way?
-* Maybe rotate enemies a little bit every frame, back and forth, so that they seem more alive and less alike. (Looks a bit silly).
* Update the instructions to explain the new hold to stall mechanic.
* Maybe give player 3 lives.
-* Implement the seeker type enemy.
* Figure out why stuff shows up in the center on start?
* Sound & Music.
-* Maybe skip player and obstacle updating while scaling?
* 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);
@@ -104,9 +100,9 @@
var FloatingText = Container.expand(function (text, x, y) {
var self = Container.call(this);
var textLabel = new Text2(text, {
size: 100,
- fill: "#ffffff",
+ fill: "#8888ff",
align: 'center',
stroke: "#000000",
strokeThickness: 5
});
@@ -266,8 +262,38 @@
self.obstacleGraphics.alpha = 1;
}
};
});
+var ObstacleTurret = Container.expand(function () {
+ var self = Container.call(this);
+ self.obstacleGraphics = self.attachAsset('obstacleTurrets', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.orbitSpeed = 0; // This is set by the Orbit that instantiates this obstacle, so obstacles in same orbit have same speed.
+ self.rotatingRight = Math.random() < 0.5 ? true : false;
+ /*if (self.parent) {
+ self.radius = self.parent.width / 2 * (1900 / self.parent.width) - self.width / 2;
+ }*/
+ self.radius = 0;
+ self.initialPosition = function (speed, angle, radius) {
+ self.angle = angle;
+ self.orbitSpeed = speed;
+ self.radius = radius;
+ self.x = self.radius * Math.cos(self.angle);
+ self.y = self.radius * Math.sin(self.angle);
+ };
+ self.lookAtPlayer = function () {
+ var playerAngle = Math.atan2(player.y - self.y, player.x - self.x);
+ self.rotation = playerAngle;
+ };
+ self._move_migrated = function () {
+ 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);
+ };
+});
// Orbit class
var Orbit = Container.expand(function () {
var self = Container.call(this);
var orbitGraphics = self.attachAsset('orbit1', {
@@ -397,27 +423,24 @@
particleGraphics.blendMode = 3;
self.alpha = 0.75;
self.rotation = Math.random() * Math.PI * 2;
self.update = function () {
- // TODO: Figure out how to update when we actually ARE scaling/jumping.
- if (!scaling) {
- //self.y += self.speed;
- self.alpha -= 0.001;
- self.scale.x -= 0.02;
- self.scale.y -= 0.02;
- //if (self.alpha <= 0 || LK.ticks % (self.id + 1 * 1) == 0) {
- //if (LK.ticks % (self.id + 1 * 1) == 0) {
- if (LK.ticks % (self.id + 1) == 0 || self.scale.x < 0) {
- self.alpha = 0.75;
- self.scale.x = 1;
- self.scale.y = 1;
- self.y = player.y; // + Math.random() * player.height / 4; // + player.height / 2 + (Math.random() * 50 - 25);
- self.x = player.x; // + Math.random() * player.width / 4; // + (Math.random() * 50 - 25);
- }
- } else {
- self.x += 20 * Math.cos(player.angle);
- self.y += 20 * Math.sin(player.angle);
+ if (scaling) {
+ self.x = player.x;
+ self.y = player.y;
+ self.x += self.id * 3 * Math.cos(player.angle);
+ self.y += self.id * 3 * Math.sin(player.angle);
}
+ self.alpha -= 0.001;
+ self.scale.x -= 0.02;
+ self.scale.y -= 0.02;
+ if (LK.ticks % (self.id + 1) == 0 || self.scale.x < 0) {
+ self.alpha = 0.75;
+ self.scale.x = 1;
+ self.scale.y = 1;
+ self.y = player.y; // + Math.random() * player.height / 4; // + player.height / 2 + (Math.random() * 50 - 25);
+ self.x = player.x; // + Math.random() * player.width / 4; // + (Math.random() * 50 - 25);
+ }
};
});
// Initialize player
// Player class
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.