Web application to display the Pac Macro game.
There is a version for the Ghost team (which does not normally show the Pacman unless they are in powerup mode) and the Pacman team (which will always show the Pacman).
To set up the mapview locally, clone the repository:
git clone https://github.com/pacmacro/pacmacro.github.io
Enter the project directory:
cd pacmacro.github.io/
In the Google Cloud Console, create a new project. Here, you should: 0. Link a billing account (you will not be charged, unless you select a paid service)
- Navigate to the API Library and enable Maps JavaScript API
- Generate a new credential - a standard API key.
In the file index.html
, in the line referring to the Google Maps API script, replace the placeholder for the API key with the generated key:
BEFORE: https://maps.googleapis.com/maps/api/js?key=KEY&callback=initMap
AFTER: https://maps.googleapis.com/maps/api/js?key=AIzaSyDDjsOkXI46CX2pEuB00Fmiih9G6dsIU&callback=initMap
Open index.html
in a browser window and the map should load.
An Electron application is also available as an option - download the correct executable for your operating system.
To start the Electron application locally from the project files, install Electron as a development dependency in the project:
npm install --save-dev electron
Then start the application:
npm start
To build the executables, run:
./build/release.py
The distributables will be created in build/
as zip files.
This project includes a script to deploy the website to your SFU Webspace.
Set up SSH access to your SFU Webspace through SSH.
Save the SFU SSH access in your SSH config as "sfu".
Run the script:
./scripts/deploy_sfu-webspace.sh DEPLOYMENT_PATH
which will deploy the website under the path http://sfu.ca/~STUDENT_ID/pac-macro/DEPLOYMENT_PATH
.
After deployment is complete, authentication can be set up using an .htaccess
file. This will restrict access to a given deployment to only those with the valid username and password - for example, only giving Pacman-level view access to the Pacman team.
In the auth/
directory (which is ignored by Git), create the file .htaccess
with the following contents:
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/STUDENT_ID/pub_html/pac-macro/DEPLOYMENT_PATH/.htpasswd
Require valid-user
Replace STUDENT_ID
and DEPLOYMENT_PATH
with your inputs.
Also in the auth/
directory, create a file named .htpasswd
. Generate a username and password using a tool such as Htpasswd Generator and place the result into the file.
Run the script ./scripts/deploy_sfu-webspace-auth DEPLOYMENT_PATH
to deploy the authentication details.
Pac Macro is a game played by the SFU Computing Science Student Society (CSSS) each year at their Frosh events in September. In the game, players run around a 5x5 block rectangle with the objective being similar to the age-old Pacman game - the Ghosts must catch the Pacman.
Teams are broken up into 4 Ghosts and 1 Pacman, each of which has a Runner for each round. The Runners have the Pac Macro app open on their phone to constantly broadcast their location (but cannot see the map), and are navigated by listening to directions on a phone call to their team members. The remaining team members stay in two Control Rooms at SFU Vancouver Harbour Centre, watching a map on the Pac Macro app to see the current locations of the Runners and provide directions to their own Runner. Pacman's Control Room team members can see both the Pacman and Ghost Runners; however, the Ghost Control Room team members can only see the Ghost Runners and not the Pacman Runner - unless a Powerdot is eaten. The Pacman team has their individual Control Room so that current locations and plans are confidential.
There are numerous Pacdots and Powerdots (the visibly larger Pacdots) scattered around the map which the Pacman must eat. Both provide points to the Pacman, but Powerdots provide more.
When a Powerdot is eaten, Powerdot mode is activated. This temporary 30-second mode shows the Pacman Runner's location on the Ghost Control Room screens and allows the Pacman to catch Ghosts, which will mean they are out of the game for that round. Outside of Powerdot mode, however, a Ghost catching the Pacman means that the Pacman loses.
The round ends when one of the following occur:
- The Ghosts catch Pacman (outside of Powerdot mode),
- Pacman catches all the Ghosts using Powerdot mode, or
- Pacman eats all the Pacdots and Powerdots.
At the end of the round, the number of points received by the Pacman team are written on a board. The teams change so that a new team is playing the Pacman role, and a new team member from each team is the new Runner.
At the end of the game, the team with the most points wins.