- All players begin by navigating to gridpainter3.herokuapp.com.
- When all four players have chosen a player name and pressed Play Game, the game will begin.
- At the game page, each player is assigned a color.
- The players try to recreate the smaller image on the empty grid.
- Beware of saboteurs! Any player can paint over your previously painted tiles.
- When everyone has pressed Finish Game, your final score will be calculated.
- Press Play Again to, you guessed it, play the game again!
Our server consists of a few end points in routes/index and routes/users, using express. The rest of the communication is run via socket.io, using emits to and from the server. We run the server deployed on heroku.
We've made a utils folder on the server which houses functions used by socket.io to process and send back data to the client.
We use MongoDB Atlas to store the current played grid, along with the pictures used as answer keys. The communication with the database is run via the server, called from fetches in the client.
Our front-end javascript is built with modules, run from the login page and game page.
To run the project on your own computer, follow these instructions:
- Download the project from github
- Install the neccessary modules with
npm i
- Open code with Visual Studio and install and allow Prettier extension
- If nodemon is not installed, install it globally with
npm i -g nodemon
- Replace the content of the
serverURL
variable in public/javascripts/modules/grid.js withhttp://localhost:3000
- Search for
https://gridpainter3.herokuapp.com
in the project and replace withhttp://localhost:3000
- Run
nodemon start
in the terminal - Navigate to
http://localhost:3000
in four instances of Google Chrome or Mozilla Firefox