Giter VIP home page Giter VIP logo

pacman's Introduction

Pac-Man

A historical tribute and accurate remake of the original Pac-Man arcade game

Inspired by The Pac-Man Dossier

Under Construction

  • Sound
  • Cutscenes
  • 2 Player switch-off

Contact me at [email protected]

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.

Play

You can play the game on all canvas-enabled browsers. Touch controls are enabled for mobile browsers. The game is resolution-independent and smoothly scales to fit the size of any screen. Performance may increase by shrinking the window or zooming in with your browser.

Main Controls

  • swipe: steer pacman on mobile browsers
  • arrows: steer pacman
  • end: pause the game
  • escape: open in-game menu

Confirmed Desktop Browers

  • Safari
  • Firefox
  • Chrome

Confirmed Mobile Devices

Games

Each of the following games are playable from the main menu.

Montage

  • Pac-Man: 1980 original arcade by Namco.
  • Ms. Pac-Man: 1981 Pac-Man modification by GCC/Midway.
  • Crazy Otto: GCC's unreleased, in-house version of Ms. Pac-Man before it was sold to Midway. (See video)
  • Cookie-Man: a brand new version of Ms. Pac-Man with a sophisticated procedural map generator.

Turbo Mode

Each game has an alternate mode called Turbo (a.k.a. speedy mode). This is a popular hardware modification of the game found in many of the original arcade cabinets. In this mode, Pac-Man travels about twice as fast (same speed as the disembodied eyes of the ghosts) and is not slowed down when eating pellets.

High Scores

High scores for each game (normal and turbo separately) are stored on your local machine by your browser.

Learn Mode

Learn Mode allows you to visualize the behaviors of the ghosts. (The colored square represents the ghost bait.)

Learn

Practice Mode

This mode allows you to practice the game with special features. You can go into slow-motion or rewind time with the special onscreen buttons or the hotkeys listed below. (The time-manipulation controls and design were borrowed from the game Braid). You can also turn on invincibility or ghost visualizers from the menu.

Practice

Practice Controls

  • shift: hold down to rewind (a la Braid)
  • 1: hold down to slow down the game to 0.5x
  • 2: hold down to slow down the game to 0.25x
  • o: toggle pacman turbo mode
  • p: toggle pacman attract mode (autoplay)
  • i: toggle pacman invincibility
  • n: go to next level
  • q,w,e,r,t: toggle target graphic for blinky, pinky, inky, clyde, and pacman, respectively.
  • a,s,d,f,g: toggle path graphic for blinky, pinky, inky, clyde, and pacman, respectively.

Procedurally-Generated Maps

In the Cookie-Man game mode, the mazes change as often as they do in Ms. Pac-Man, but are procedurally generated. Each level has a pre-defined color palette, granting an element of consistency to the random structure of the mazes.

Procedural

Algorithm Description

The mazes are built carefully to closely match design patterns deduced from the original maps found in Pac-Man and Ms. Pac-Man.

Accuracy

It is a goal of this project to stay reasonably accurate to the original arcade game. The current accuracy is due to the work of reverse-engineers Jamey Pittman and Bart Grantham.

Currently, the coordinate space, movement physics, ghost behavior, actor speeds, timers, and update rate match that of the original arcade game.

Inaccuracies

The timings of certain non-critical events such as score display pauses and map-blinking animations are currently approximated.

Unfortunately, you cannot use patterns from the original Pac-Man because of complications with random number generators.

Also, the collision detection is tighter than the original (checked twice as often) to prevent pass-through "bugs".

I also chose to leave out the overflow bug which shifts a ghost target when Pac-Man is facing up, detailed here.

Report/Fix Bugs

Feel free to report any inaccuracies that may detract or simply annoy. Any reverse-engineers willing to contribute their expertise to this project would be a big help as well!

Navigating the Repository

  • all javascript source files are located in the "src/" directory
  • "build.sh" file concatenates all the source files into "pacman.js" in the top directory
  • "debug.htm" displays the game by using the "src/*.js" files
  • "index.htm" displays the game by using the "pacman.js" file only
  • the "fruit" directory contains notes and diagrams on Ms. Pac-Man fruit paths
  • the "mapgen" directory contains notes, diagrams, and experiments on procedural Pac-Man maze generation
  • the "sprites" directory contains references sprite sheets and an atlas viewer "atlas.htm" for viewing the scalable game sprites.
  • the "font" directory contains font resources used in the game.

Credits

Reverse-Engineers

Thanks to Jamey Pittman for compiling The Pac-Man Dossier from his own research and those of other reverse-engineers, notably 'Dav' and 'JamieVegas' from this Atari Age forum thread. Further thanks to Jamey Pittman for replying to my arcade implementation-specific questions with some very elaborate details to meet the accuracy requirements of this project.

Thanks to Bart Grantham for sharing his expert knowledge on Ms. Pac-Man's internals, providing me with an annotated disassembly and notes on how fruit paths work in meticulous detail.

Original Games

Thanks to the original Pac-Man team at Namco for creating such an enduring game. And thanks to the MAME team for their arcade emulator and very helpful debugger.

Thanks to the Ms. Pac-Man team at GCC for improving Pac-Man with a variety of aesthetic maps that I based the map generator on.

Thanks to Jonathan Blow for creating the rewind mechanic in Braid which inspired the same mechanic in my project. Further thanks for presenting the implementation details in this talk which helped in my own implementation.

Art

Thanks to Tang Yongfa and their cookie monster Pac-Man design at threadless website which I used as the character in the random maze mode.

Links to Public Feedback

pacman's People

Contributors

masonicgit avatar tachyon-ii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pacman's Issues

build.sh fails on linux with sed error

When running the build.sh on linux, I got an error:

sed: -e expression #1, char 1: unknown command: `.'

I could fix it, with altering the second to last sed command by removing the space after the -i-switch like this:

from> sed -i '.bak' "s/last updated:[^<]*/last updated: $(date) -->/" index.htm

to  > > sed -i".bak" "s/last updated:[^<]*/last updated: $(date) -->/" index.htm

what is the use of spritesheet.png?

I noticed that the graphics are drawn using code in the game, my questions are
What is the use of the spritesheet.png file?
And how may I edit the graphics in the game, change player character and ghost charecters?

Thank you so much, very clean and well done work!

Links to "dossier" broken - is this alternate source the same document ?

The README contains a number of references to the "Pacman dossier" but the links are now broken.

I found this https://www.gamasutra.com/view/feature/132330/the_pacman_dossier.php?page=1 which could be the same document.

If it is I would be happy to change the links in the README and do a PR but, obviously, it would be best if someone who's familiar with the document could confirm it's the same thing. Can anyone confirm that ... or suggest a better source ?

Touch swipe doesn't do anything

  • Open pacman on Morph (based on Qt WebEngine) mobile web browser
  • tap on a version of the game
  • tap on play
  • On start of the game swipe to control pacman

Expected: control pacman
Current behaviour: pacman goes to the left and stops

imatge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.