Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joj0/mitx-pacmen

MITx MERN Course - PacMen Exercise
https://github.com/joj0/mitx-pacmen

Last synced: about 2 months ago
JSON representation

MITx MERN Course - PacMen Exercise

Awesome Lists containing this project

README

        

# The PacMen Exercise

## Description

A self-study-exercise I solved during the [MITx Fullstack Programming Course](https://xpro.mit.edu/courses/course-v1:xPRO+PCCx/)

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.

## How to Run

- [Clone the repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
- Open index.html in your browser
- Push the buttons!

## Roadmap

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.
- [x] Add random things, instead of PacMen.

## License

Released under an MIT license, see the [LICENSE](LICENSE) file within the repo for details.