Hi folks,
I was following along with the tutorial: 2D Breakout Game using Pure JS . I found some problems with the narrative in the tutorials, some of the key principles like AABB collision detection was very vague. (so I had to go off and do some research on that) I found that the program in the tutorial wasn’t responsive at all.
So I had fixed that and then re-wrote it to ES6 syntax. Using Class to define the objects like Ball, Paddle, Bricks etc and assigning them their individual methods on their prototype chains.
This I found was very effective and created a brilliant game with the ability to develop it further with levels and increasing the difficulty, where as the code before was very tricky to read.
Please take a look and let me know what you think, I have annotated it using JSDoc which makes it more verbose but its fully explained.
Link to the JS Fiddle
Many Thanks
=)