User prompt
the default powerup should still make the ship fly twice as fast
User prompt
Make powerups be triggered for 15 secs
User prompt
Use separate assets for different powerup types
User prompt
Add a new powerup that gives the ship two cannons, one one each side of the spaceship.
User prompt
Make the spaceship fire much slower
User prompt
Decrease the powerup spawn rate by 5x
User prompt
Make sure that wave counter progress by one both when a normal wave spawns and when a boss spawn.
User prompt
The amount of enemies per wave increase to quickly
User prompt
Based on our progress so far, consider what to do next and execute this change.
User prompt
Based on our progress so far, consider what to do next and execute this change.
User prompt
Based on our progress so far, consider what to do next and execute this change.
User prompt
Based on our progress so far, consider what to do next and execute this change.
User prompt
XS.asset return assets with anchor points of 0.0,0.0. Adjust anchor points manually for all assets
User prompt
The star field should be attached to stage instead of game to ensure it takes up the full stage width
User prompt
Reset score when player dies
User prompt
Add score to game
User prompt
The game seems to break now when some bullets hit the hero?
User prompt
Remove bullets that hit the hero
User prompt
Change the circle pattern to figure eights that are slower than the current circles.
User prompt
Enemies and hero should have health points that decrease if hit by bullets and should only die when out of health points.
User prompt
Add reset game function to the game, that resets all game states back to the starting state. Call this method when the hero dies from being hit by enemy bullets.
User prompt
Health bars should be positioned 5px above, and have the same vertical center as the main graphic of the asset they are attached too.
User prompt
Add health bars to the game, then add health bars to the hero and enemies.
User prompt
Make enemy bullets be fired in the direction of the hero
User prompt
make enemies shoot
===================================================================
--- original.js
+++ change.js
@@ -51,10 +51,15 @@
self.flyInY = Math.random() * (2732 / 2 - 100) + 50;
self.angle = 0;
self.shootCounter = Math.random() * 100;
- self.shoot = function() {
- var enemyBullet = new EnemyBullet();
+ self.shoot = function(heroX, heroY) {
+ var dx = heroX - self.x;
+ var dy = heroY - self.y;
+ var distance = Math.sqrt(dx * dx + dy * dy);
+ var vx = 7 * dx / distance;
+ var vy = 7 * dy / distance;
+ var enemyBullet = new EnemyBullet(vx, vy);
enemyBullet.x = self.x;
enemyBullet.y = self.y + enemyGraphics.height / 2;
return enemyBullet;
};
@@ -72,12 +77,18 @@
}
};
});
- var EnemyBullet = Container.expand(function() {
+ var EnemyBullet = Container.expand(function(vx, vy) {
var self = Container.call(this);
var bulletGraphics = XS.getAsset('enemyBullet', 'Enemy Bullet');
self.addChild(bulletGraphics);
+ self.vx = vx;
+ self.vy = vy;
+ self.move = function() {
+ self.x += self.vx;
+ self.y += self.vy;
+ };
});
var Bullet = Container.expand(function() {
var self = Container.call(this);
@@ -170,17 +181,17 @@
enemies[i].move(5); // Use new move function
enemies[i].shootCounter--;
if (enemies[i].shootCounter <= 0) {
- var enemyBullet = enemies[i].shoot();
+ var enemyBullet = enemies[i].shoot(hero.x, hero.y);
self.addChild(enemyBullet);
enemyBullets.push(enemyBullet);
enemies[i].shootCounter = 100 + Math.random() * 100;
}
}
for (var j = 0; j < enemyBullets.length; j++) {
- enemyBullets[j].y += 7;
+ enemyBullets[j].move();
if (enemyBullets[j].y > stage.height + 30) {
self.removeChild(enemyBullets[j]);
enemyBullets.splice(j, 1);
Alien enemy, adopted to space, flying down Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Alien enemy boss, adopted to space, flying down Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Alien enemy, adopted to space, flying down Game Texture. In-Game asset. 2d. Pixelart. blank background. Low detail. High contrast.
Hero Spaceship, flying up, single cannon in the center Game Texture. In-Game asset. 2d. Pixelart. blank background. Low detail. High contrast.
Dark circular power up with three bright yellow arrows pointing upwards. Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Dark circular power up indicating double cannons. Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.
Create a 2D top-down view pixel art image of a bullet for a space shooter game. The bullet should be facing upward, as it will be used as a projectile fired from the hero spaceship towards enemies in the game. The design should be sleek and give off a sense of motion. Please provide the image on a white background. Game Texture. In-Game asset. 2d. Pixelart. blank background. Low detail. High contrast.
Single alien slime bullet, round. Game Texture. In-Game asset. 2d. Pixelart. blank background. Low detail. High contrast.
Single alien boss slime bullet, round Game Texture. In-Game asset. 2d. Pixelart. White background. Blank background. Low detail. High contrast.