https://github.com/infectedduck/dice-game
Real-time dice game web app with Flask and Flask-SocketIO. Create rooms, play against bots of varying difficulty, and view results with a modern HTML, CSS, and JavaScript interface.
https://github.com/infectedduck/dice-game
Last synced: about 2 months ago
JSON representation
Real-time dice game web app with Flask and Flask-SocketIO. Create rooms, play against bots of varying difficulty, and view results with a modern HTML, CSS, and JavaScript interface.
- Host: GitHub
- URL: https://github.com/infectedduck/dice-game
- Owner: InfectedDuck
- License: mit
- Created: 2024-07-26T11:20:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T01:34:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-16T00:37:27.344Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Real-Time Dice Game Web Application
## Overview
This project is a real-time dice game web application built using Python's Flask and Flask-SocketIO libraries. It allows users to create and join game rooms, play a dice-based game against a bot with varying difficulty levels, and track game results. The user interface is designed with HTML, CSS, and JavaScript for a modern and intuitive experience.
## Features
- **Create and Join Rooms:**
- Users can create unique game rooms with a generated UUID.
- Join existing rooms with a unique room ID.
- The server manages the game state for each room to ensure a seamless multiplayer experience.
- **Start Game:**
- Customize game settings, including bot difficulty, initial money, and the number of rounds.
- Start the game once players are ready in the room.
- **Dice Rolling Mechanics:**
- Players roll dice against a bot, with the bot’s difficulty impacting its dice results.
- Bot difficulty levels range from easy to ultimate, each with different strategies for dice outcomes.
- **Real-Time Updates:**
- Utilizes Flask-SocketIO for real-time communication.
- Provides live updates for actions such as starting the game, rolling dice, and displaying results.
- **Game Results:**
- Displays the outcome of each round, including the results of each player's rolls, the bot’s rolls, and the impact on the money based on game settings.
## Key Components
- **Backend (Flask & Flask-SocketIO):**
- Manages game rooms, player actions, and game state.
- Handles real-time communication and game logic.
- **Frontend (HTML, CSS, and JavaScript):**
- Provides a user-friendly interface for interacting with the game.
- Includes features for creating rooms, joining rooms, and viewing game results.
- **Dice Game Logic (`dice_game.py`):**
- Defines the dice game mechanics.
- Includes different bot strategies and dice roll outcomes.
## Usage
- **Create a Room:**
- Click the "Create Room" button to generate a new game room and receive a unique room ID.
- **Join a Room:**
- Enter the room ID to join an existing game room.
- **Start the Game:**
- Once players are in the room, set the game parameters (bot difficulty, money, rounds) and start the game.
- **Roll Dice:**
- Players and the bot roll dice, with results displayed in real-time.
- **View Results:**
- After the game ends, view the results to see who won and how the money changed.
## Caution
The project is not ended, and the application is NOT working properly
## License
This project is licensed under the MIT License.
You are free to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of this software, subject to the terms of the MIT License.
For full details, see the [LICENSE](LICENSE) file.