Pacmen Exercise

Posted on March 12, 2023 (Last modified on November 16, 2023) • 1 min read • 77 words

A pacmen factory where pacmen bounce off the walls

Pacmen Exercise

Pacmen Exercise

For this exercise I used vanilla JS to create a pacmen factory function. This function creates all the needed code to place a new pacmen on the screen and position the images. Using a little random math, their position and velocity were slightly randomized. Once the user hits the “Start Game” button, the pacmen move across the screen, bouncing off the walls of the browser at different speeds and angles.

View Repository View Live Project
Follow me

I'm interested in books, bikes, black cats, architecture and all things Chicago!