User prompt
move the score display to be in the top right of the screen
User prompt
increase the number of enemies over time; on screen maximum + 1 per minute
User prompt
increase damage from enemy bullets to 10
User prompt
multiply the score by 1000
User prompt
change the score to only increase when the player destroys an enemy
User prompt
add collision between the hero and enemy bullets
User prompt
change the health of the character to be a value of 100 at the start of the game
User prompt
add a health bar for the character at the top left of the screen
User prompt
change hero shot delay to 0.2 seconds
User prompt
change hero shot delay to 0.1 seconds
User prompt
add 0.2 second delay between hero shots
User prompt
destroy enemy on contact with hero bullet
User prompt
keep hero attached to cursor even when there is no movement input
User prompt
Fix Bug: 'ReferenceError: keyboard is not defined' in this line: 'if (keyboard[LEFT]) hero.x -= hero.speed;' Line Number: 53
User prompt
Fix Bug: 'TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', function (e) {' Line Number: 53
User prompt
create keyboard controls for the player to control movement using arrow keys
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'button')' in this line: 'if (obj.event.data.button === 0) {' Line Number: 78
User prompt
define shoot button for player as left-click
User prompt
stop hero from moving off top and bottom of screen
User prompt
reverse direction of hero bullets
User prompt
Fix Bug: 'Uncaught TypeError: window.addEventListener is not a function' in this line: 'window.addEventListener('keydown', function (event) {' Line Number: 96
User prompt
change shoot key to spacebar
User prompt
reverse hero shooting direction
User prompt
prevent the player from moving off the bottom of the screen
User prompt
stop player from moving off screen
===================================================================
--- original.js
+++ change.js
@@ -94,9 +94,9 @@
}
}
});
hero.canShoot = true;
- hero.shootCooldown = 200;
+ hero.shootCooldown = 6;
hero.lastShotTime = 0;
hero.on('down', function (obj) {
if (hero.canShoot) {
var bullet = new HeroBullet();
Create a plain red health bar Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Create a plain empty health bar Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Create a top down view of a single Earth-like planet Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A background image of some stars in space Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A background image of asteroids in space Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A realistic looking explosion, viewed from above. Bright coloured fire Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a double missile pointing vertically, with fire coming out of the rear Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A health pickup icon Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cool looking spaceship viewed from above Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round energy based projectile. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.