This project is a recreation of Pac-Man developed with JavaScript and Express.js, designed to run on a local server. It uses livereload to facilitate real-time development.
-
main.js: Main server file that sets up and runs an Express.js instance to serve the game content. Includes:
- Configuration of
connect-livereload
middleware for automatic reloading. - Routes to serve HTML files and other game resources from the
public
directory.
- Configuration of
-
public/entities.js: File that defines game logic related to enemy movements and route structure.
- Direction: An object defining constants for character movement directions.
-
public/pacman.js: Main game file containing the gameLoop and other key functions.
- JavaScript: For game logic.
- Node.js and Express: To set up the local server.
- livereload and connect-livereload: For automatic page reloading during development.
- Clone this repository.
- Install the necessary dependencies:
npm install
- Start the server:
node main.js
- Open your browser at
http://localhost:3000
to view the game.
This is a project in development, so any contribution is welcome. If you find bugs or have improvement ideas, please open an issue or submit a pull request.
This project is distributed under the MIT license.