Skip to content

Gridpainter game - a group assignment in the course "Dynamic web development" at Medieinstitutet.

Notifications You must be signed in to change notification settings

gabriellekamph/gridpainter

 
 

Repository files navigation

TEAM 3 GRIDPAINTER

Gameplay

  1. All players begin by navigating to gridpainter3.herokuapp.com.
  2. When all four players have chosen a player name and pressed Play Game, the game will begin.
  3. At the game page, each player is assigned a color.
  4. The players try to recreate the smaller image on the empty grid.
  5. Beware of saboteurs! Any player can paint over your previously painted tiles.
  6. When everyone has pressed Finish Game, your final score will be calculated.
  7. Press Play Again to, you guessed it, play the game again!

Project structure

Server

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.

Server scripts

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.

Database

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.

Front-end JS

Our front-end javascript is built with modules, run from the login page and game page.


Running the project locally

To run the project on your own computer, follow these instructions:

  1. Download the project from github
  2. Install the neccessary modules with npm i
  3. Open code with Visual Studio and install and allow Prettier extension
  4. If nodemon is not installed, install it globally with npm i -g nodemon
  5. Replace the content of the serverURL variable in public/javascripts/modules/grid.js with http://localhost:3000
  6. Search for https://gridpainter3.herokuapp.com in the project and replace with http://localhost:3000
  7. Run nodemon start in the terminal
  8. Navigate to http://localhost:3000 in four instances of Google Chrome or Mozilla Firefox

About

Gridpainter game - a group assignment in the course "Dynamic web development" at Medieinstitutet.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.1%
  • CSS 1.8%
  • Other 1.1%