Wylie Hansen
CS 408 - Week 9
October 14, 2024
This is a bouncing ball game made to practice object oriented programming in javascript.
This program can be run on a local server through VSCode's preview function. Note that the preview function is only available with the Live Preview extension installed.
With the extension installed, open a preview of index.html with the "Show Preview" button, which should be in the upper right corner of the editor workspace. You can then copy the url into your browser of choice.
On load-in, the game should be paused with a menu explaining the controls. Click the "Go!" button to start the game. Use WASD to control the white circle, and eat the colored balls by colliding with them. You can press "Escape" to pause the game and bring back the menu.
A counter in the top-left corner displays how many balls you still need to eat. When all the balls are gone, a game-over menu should pop up with a button to restart the game.
- HTML, javascript, and CSS syntax: https://developer.mozilla.org/en-US/
- Tip for centering a fixed position element: https://www.geeksforgeeks.org/how-to-center-an-element-using-positionfixed-in-css/
- Advice for working with a keydown event in js: https://stackoverflow.com/questions/5203407/how-to-detect-if-multiple-keys-are-pressed-at-once-using-javascript
- Original sample code: https://github.com/shanep/cs408-lab-9