Skip to content

champsleague/RPS-Web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPS-web

Rock Paper Scissor online web game.
Gachon university networking term project.

Page for testing : http://chromato99.com

Description

This is a service that provides a rock-paper-scissors(RPS) web game.

It was developed with the goal of implementing experimental features for the realization of online web games. The game was implemented simply and focused on features such as account creation, management, game room creation, game invitation, and chatting.

  • Main Features

Account management (login, signup, logout, etc.)
Security (Passwords are encrypted with Node.js crypto library)
Making game room (Managements with roomList array)
Show other player's record
Ingame chatting
Error handling ex) player disconnected
Inviting player

  • Example Screenshots

Project Structure

server.js : Main execution of this service

/public : A folder for static files, including image files, CSS, etc.
    /css : CSS files
    /img : Image files
    /js : JavaScript files

/src : Source code of RPS-web modules.
    db.template.js : Configuration file of DB connection (Should be rename to db-config.js)
    gameHandler.js : A collection of functions used for game socket handling.
    lobbyHandler.js : A collection of functions used for lobby socket handling.

/views : Frontend ejs template directory.
    RPSgame.ejs : Main RPS game playing page.
    lobby.ejs : Main lobby page.
    login.ejs : Main login page.
    newroom.ejs : Page for making new room
    signup.ejs : Main signup page.

Run on localhost

  1. Set MySQL server and table structure as below. (If you want to use different table structure, you need to edit source code)

  1. Rename db.template.js to db-config.js and set with your db configuration.
var dbConfig ={
    host:'example.com',
    user:'example',
    password:'password',
    database:'RPS'
});
  1. Run Server with Node.js
cd <project directory>
npm install
node server.js

Tech Stack

[FE] HTML / CSS / Javascript
[BE] Node.js, Express, Passport.js, Socket.io, PM2
[Database] MySQL
Icon images from Flaticon and Adobe Stock : https://www.flaticon.com , https://stock.adobe.com/kr/

About

Gachon University Computer Network Term Project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 57.2%
  • EJS 30.2%
  • CSS 12.6%