Try Demo: https://codetracklift.github.io/pacman
Skills Utilized:
- Languages: HTML, CSS, JavaScript
- DOM Manipulation
- Key Press and Event Listeners
- Custom CSS Effects
This was developed during Bootcamp Week 3 and started as a 'PacMan Movement Exercise.' We were supplied with starter code and PacMan images.
Assignment Objectives:
- Make a PacMan on the screen
- Move PacMan along the x-axis
- PacMan should use alternating images to simulate 'chomping' movement
- PacMan should change direction of movement upon hitting a screen edge
- PacMan image set should change based on direction of horizontal movement
Custom Features:
- PacMan is now user-controlled and can also move along the y-axis
- Added a 'Magic Ball' to give PacMan something to do
- User can score points with each 'Magic Ball' collision
- 'Magic Ball' behavior may change depending on 'contact time'
- Mouse, keyboard, and mobile touch controls
- Reload button
- Mini-game is fully responsive using custom CSS and JavaScript
Notes:
- Blog Article on the 'Magic Ball' challenge.
- Blog Article on the PacMan Mini-Game.
This mini-game accepts mouse, keyboard, and mobile inputs.
Arrow Button
- Changes PacMan's direction of movement.
Reload Button
-
Reloads the window and resets the score.
-
Changing device orientation will force a reload.
- User controls
- 'Magic Ball' integration
- Fully responsive and mobile compatible
- Scoreboard
- Persistent scoreboard
Copyright (c) 2022 Pete Chu codeByPete
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.