##Brick Break Game
Instructions:
- I have mostly tested this game on the browser Google Chrome and would recommend you do too
- The aim of the game is to deflect the ball off the paddle and to break all the bricks at the top of the canvas
The Work
-
I used my Graphics Programming lecturer's, Ian Mcloughlins github's examples to help better understand the concept of javascript and html5 animations.
-
I also used https://developer.mozilla.org/en-US/docs/Games/Workflows/2D_Breakout_game_pure_JavaScript/Build_the_brick_field page to help with the drawing of the bricks on the canvas, and with the collision detection when the ball hits the bricks.I found this page extremely useful and easy to understand which help me a lot.
-
I'm also going to give credit to my friends in class who helped with certain parts of the program.
-
I also used other various websites such as:
- http://www.w3schools.com/js/js_function_invocation.asp
- http://www.html5rocks.com/en/tutorials/canvas/notearsgame/
- http://answers.unity3d.com/questions/338888/score-count-increase-on-hit.html
- http://www.sitepoint.com/basic-animation-with-canvas-and-javascript/
- https://www.khanacademy.org/computer-programming/paddle-ball/830543654
- http://billmill.org/static/canvastutorial/paddle.html
Bugs
-
I was going to add in lives, so that you would have X amount of lives before the game ended but i decided not to as when you lose a life the ball spawns from a point i've set on the canvas but it randomly shoots it in different directions each time.So if the paddle was on the right side of the screen and the spawned ball shoots the ball left, you won't have enought time to move the paddle to the left side to get the ball, which results in a life being wasted. I could not figure out how to fix the direction in which the ball was being shot out so i decided to leave it out completely.
-
The second bug which i also could not figure out how to solve is when the ball hits the side of the paddle, it glitches (vibrates) while moving through the paddle and then bounces up at the bricks as if it hit it normally.
Synopsis
-
Honestly when i first started doing this module i didn't like it as i always got lost in the class and couldn't get the programs to work, and that got me worried about doing the project as i kept thinking i wouldn't be able to do it.
-
Throughout the project i was finding it frustrating at times but my friends and I worked together and as we went along we started to get the hang of things and that's when i started to enjoy doing the work, when i developed an understanding of the language.