Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pac-Man Contribution Replay v0.1

A from-scratch prototype inspired by the map/rendering strategy of abozanona/pacman-contribution-graph.

This version focuses on one feature:

Fetch a GitHub contribution graph, play Pac-Man manually on the generated 53×7 map, and export the gameplay as an animated SVG.

What v0.1 includes

  • GitHub GraphQL contribution fetcher.
  • GitHub-style 53×7 contribution grid.
  • GitHub light/dark palettes.
  • Month labels.
  • Pac-Man and ghost vector sprites.
  • Decorative Pac-Man maze walls.
  • Keyboard-controlled manual gameplay.
  • Replay recording.
  • Animated SVG export.
  • Replay JSON export.
  • FOURTH_QUARTILE contribution cells activate power mode.

Run

This is a dependency-free static web app.

cd pacman-replay-contribution-v0.1
python -m http.server 5173

Open:

http://localhost:5173

You can also use any other static server.

GitHub token

For accurate contribution graph data, enter a GitHub token in the UI.

The browser calls:

https://api.github.com/graphql

with this query:

query ($login: String!) {
  user(login: $login) {
    contributionsCollection {
      contributionCalendar {
        weeks {
          contributionDays {
            date
            contributionCount
            color
            contributionLevel
          }
        }
      }
    }
  }
}

The token is only used in your local browser session.

If you do not provide a token, use the demo graph button.

Controls

  • Arrow keys / WASD: move Pac-Man.
  • Eat every colored contribution cell to finish.
  • Darkest contribution cells (FOURTH_QUARTILE) activate power mode.
  • In power mode, ghosts become edible.

Exported files

  • pacman-contribution-replay.svg
  • pacman-replay.json

v0.2 direction

  • Push generated SVG to a selected branch.
  • Support GitHub Actions publishing.
  • Support separate light/dark SVG outputs.
  • More exact wall template parity with upstream.

About

A small website that let you manipulate the PACman to play in your contribution Graph

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages