项目作者: RamseyAli

项目描述 :
A web-based game centered around deceiving other players.
高级语言: JavaScript
项目地址: git://github.com/RamseyAli/Priests-Vs-Thieves.git
创建时间: 2017-12-25T09:30:41Z
项目社区:https://github.com/RamseyAli/Priests-Vs-Thieves

开源协议:

下载


Priests Vs Thieves

This is a personal project of mine… A continuation of my lab from Purdue’s CS252 Systems Programming course.

The original lab repository:

  1. https://github.com/aberendsen18/cs252-lab06

Project Name:

  1. -Priests vs Thiefs

Project:

  1. -Game with online lobby system, players enter the lobby in groups of 4 or more
  2. -The game starts with each person (user) starting with 100 points
  3. -Each round, the players are given the choice to either "help" or "steal"
  4. -If all players "help" then the collective whole is awarded 10 points
  5. -If a single player picks "steal" then they get 30 points
  6. -If more than 2 players pick "steal" in the same round then they each get deducted 20 points
  7. -After 10 rounds each players final point value revealed is revealed to all users in the lobby
  8. -The user with the most points win
  9. -In the case of a tie, everyone loses (this is still to be determined)

Tools Used:

  1. -NodeJS (incl. modules such as express, jade)
  2. -MongoDB
  3. -HTML5 w/ Bootstrap
  4. -CSS
  5. -Pingendo 4.0

Project Idea Credit:

  1. The project idea is owed to the "Prisoner Dilemma" and the various games built prior that work off the concept.

Install Instructions:

  1. Skeleton is based on tutorial described in Useful Link #2
  2. INITIAL SETUP
  3. 1) Download Node.js (make sure npm is installed as well)
  4. 2) Download MongoDB Community Edition
  5. 3) in root directory run: npm install express
  6. 4) in root directory run: npm install express-generator
  7. 5) in nodetest2 directory run: npm install
  8. 6) in bin folder within MongoDB directory run: ./mongod --dbpath [ insert path to nodetest2\data here ]
  9. 7) in seperate window, in bin folder within MongoDB directory run: ./mongo
  10. 8) in the seperate window, in MongoDB command-line run: use nodetest2
  11. 9) in the seperate window, in MongoDB command-line run: db.userlist.insert({'username' : 'test1','email' : 'test1@test.com','fullname' : 'Bob Smith','age' : 27,'location' : 'San Francisco','gender' : 'Male'})
  12. HOW TO START DATABASE
  13. 1) in bin folder within MongoDB directory run: mongod --dbpath [ insert path to nodetest2\data here ]
  14. HOW TO START SERVER
  15. 1) in nodtest2 directory run: npm start
  16. HOW TO ACCESS SERVER
  17. 1) go to localhost:3000

To-do List:

  1. Note: List below is not in any specific order
  2. 1) Migrate CSS files from Google Drive to a self-hosted Rasberry Pi
  3. 2) Add email authentication
  4. 3) Add password hashing
  5. 4) Create CSS for lobby
  6. 5) Create CSS for profile page
  7. 6) Create CSS for game
  8. 7) Create CSS for leaderboard
  9. 8) Fix game logic
  10. 9) Add ability for player avatars
  11. 10) Add chat functionality

Useful Links:

  1. 1) https://github.com/aerrity/socket-click-example - Real-time communication between users on webpage (see last example on page)
  2. 2) https://closebrace.com/tutorials/2017-03-02/creating-a-simple-restful-web-app-with-nodejs-express-and-mongodb