A self-study-exercise I solved during the MITx Fullstack Programming Course
Multiple PacMen in the form of simply being an image - can be generated and automatically move around the screen. When they hit a wall they bounce off it sort of "realistically". They stay at the same velocity though, hence there is no gravity simulation implemented! The initial velocity is randomized.
Some things I learned from the exercise:
- JavaScript can be used for simple "graphical" programming.
- A factory is simply put: Generating a whole lot of things! In this case: Making countless PacMen.
- Rudimentary ideas to "physics programming" to make the PacMen bounce off walls.
- How to programatically add HTML elements to a webpage.
- How to programatically style HTML elements.
- A "shadow DOM" is a common pattern in JavaScript programming.
- Clone the repo.
- Open index.html in your browser
- Push the buttons!
Well, I guess there is no actual roadmap for this project but here a collection of ideas that might be fun to implement:
- Use alternating pictures as the image for a PacMan to simulate its mouth movement.
- Add random things, instead of PacMen.
Released under an MIT license, see the LICENSE file within the repo for details.