MiltonsAngel / FocusRiteBingo

A web based bingo game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FocusRiteBingo

A web based bingo game built using REACT

Central Game Server:

Technology: Node.js and Express.js.
Functionality: Acts as the nerve center, managing player connections, game states, and number generation.
Benefits: Efficient, event-driven environment suitable for real-time applications, enhanced by Express.js for routing and middleware.

Player Clients:

Technology: React
Functionality: Provides a responsive and interactive user interface for players to join games, view Bingo cards, and interact in real time.
Benefits: Enables the creation of dynamic SPAs with efficient rendering and state management.

Database:

Technology: MongoDB.
Functionality: Stores game data, player profiles, ongoing games, and historical data.
Benefits: Excels in handling flexible, JSON-like document data, offering scalability and high performance.

Bingo Card Generator:

Location: Server-side.
Functionality: Generates unique Bingo cards for each player.
Benefits: Leverages JavaScript's array and randomization capabilities for efficient and scalable card generation.

Random Number Generator:

Location: Server-side.
Functionality: Responsible for calling out Bingo numbers in a random and unbiased manner.
Benefits: Ensures true randomness and game integrity using various libraries and algorithms.

Real-Time Updates:

Technology: WebSockets (Socket.IO).
Functionality: Enables low-latency communication between the server and clients for real-time game state updates.
Benefits: Ideal for transmitting changes like called numbers and card updates, ensuring synchronous gameplay.

Bingo Declaration System:

Location: Integrated with the server.
Functionality: Manages players declaring 'Bingo!' and verifies their claims.
Benefits: Ensures real-time interaction and prompt, accurate winner announcement.

Prerequisites

Install MongoDB Download the MongoDB Community Server:

Go to the MongoDB Download Center https://www.mongodb.com/try/download/community. Select the "Windows" tab. Choose the latest version. Click "Download".

Application setup

Clone REPO to your local machine

Setup Server Open application server project in visual studio.
Open a terminal and navigate to server folder.
Type npm install - This will restore all pakages
Type nodemon app.js - This will start the server and connect to your local instance of MongoDB installed previously

Setup Client Open application client project in visual studio.
Open a terminal and navigate to client folder.
Type npm install - This will restore all pakages
Type npm run start - This will start the client in your browser

Game Play

Once the client loads you will be presented with the bingo game board. A bingo card will automatically be generate.
  • 1. Click New game - A new game will be created in mongoDB.
  • 2. The Join Game button will then become active. Click join game and register your name and email.
  • 3. Once at least one player has joined the start game button will become active. After clicking the start button the Join Game button will become inactive. (multiple players can join until the start game button is clicked).
  • 4. Once the game has started the chat box will become active allowing you to send messages to the room.
  • 5. After clicking start game the initial number will be displayed. The call next number button will then become active. Continue to click the button to generate new numbers up to a maximum of 75.
  • 6. If a called number is on your bingo card select that number by clicking on it
  • 7. Once you have filled your card the Declare Bingo button will become active. Click Declare Bingo to inform the room that you have won.

NOTE: All actions, eg, New Game, Start Game, Join Game, Call Number, Declare Bingo and Messages will be broadcast to the room by socket IO. A message will be displayed for each action above your bingo card.

About

A web based bingo game

License:GNU General Public License v3.0


Languages

Language:JavaScript 89.8%Language:CSS 8.0%Language:HTML 2.3%