Attack of the Fireballs! - Toby-Munyard/Programming-Project GitHub Wiki

``Welcome to the Programming-Project wiki!

How do you win?
There is no winning, I have decided that the game will simply be a endless game where your objective is just to survive for as long as possible in order to obtain a higher score, I guess getting a new high score could be considered winning.

How do you lose? The player loses when their health goes below one.

How do you play the game/ controls? The game is controlled with the four arrow keys for movement and the space bar for a bullet attack.

What sprites are involved? I have a ship sprite as the player, a heart as the pickup (+1 health) icon, a fireball with eyes as the enemy and a bullet with eyes for the bullet projectile, all sprites are 2d and in a pixel style.

How does each sprite behave? The ship behaves however the player does, the pickups spawn randomly inside the canvas at varying sizes, the enemies spawn at the top of the canvas moving downwards at a random speed and spawn at random sizes in order to shake up the gameplay.

What variables/ constants will you need? var PlayerXpos var PlayerYpos const PLAYER_SIZE var PlayerXspeed var PlayerYspeed var ship = new Image(); ship.src = 'images/Ship.png' These are for the player to function, these variables are used for the enemies and pickups minus the speed ones to ensure I know that they are similar and function in the same way.

var backgroundheight var backgroundwidth var background = new Image(); var Endgame = new Image(); background.src = 'images/Background.jpg'; Endgame.src = 'images/Endgame.jpg' These are for the background to give it a set size and texture.

var leftKeyPressed = false; var rightKeyPressed = false; var upKeyPressed = false; var downKeyPressed = false;

const LEFT_KEY = 37; const UP_KEY = 38; const RIGHT_KEY = 39 const DOWN_KEY = 40; const SPACE_KEY = 32;

function colorRect(x, y, w, h, c) { canvasContext.fillStyle = c; canvasContext.fillRect(x, y, w, h); } // end func canvas background

These are for the player to move no matter where they are on the canvas. I need Xpos, Ypos, width and height for every sprite in order to have collisions between the different sprites so the game can function as intended. I need constants for my movement keys and space bar so that all my movement and attacks function properly without any bugs and glitches.

Describe 2 relevant implications

Functionality = ensuring that the program functions consistently in all cases without bugs or ambiguity.

Aesthetics = ensuring that the program has an attractive art style that is easy on the eyes and will not bore the user.

Explaining 2 relevant implications

Functionality = This is to ensure the users can all consistently get the most out of the experience when using a game or program.

Aesthetics = This is so all users can have a more enjoyable experience when using my game.

Addressing 2 relevant implications

Functionality = I provided and written instructions alongside the gameCanvas so users know the keys and the goal of the game. I also tested every stage of the game to ensure all bugs were fixed by the time the game was completed.

Aesthetics = The style of sprites stick out against the background while maintaining the same sort of art style (pixelated). This is to make the objective obvious and help the player to complete their goal.