Welcome to the Word Quest project! This document covers the functionality, technical details, project goals, and full instructions on how to get started, including setting up error logs and other configurations.
- Project Overview
- Features
- Technologies Used
- Setup Instructions
- Gameplay Instructions
- Contributing
- License
Word Quest is a word-guessing game inspired by Wordle. Players attempt to guess a secret word within a limited number of attempts. The project aims to provide a fun and interactive experience while showcasing PHP and MySQL skills.
- User authentication (login, signup, logout)
- Random word selection based on chosen word length
- Multiple attempts to guess the word
- Feedback on guesses (correct letter and position, correct letter wrong position)
- Scoring system
- Game history
- Dark and light theme toggle
- Frontend: HTML, CSS, JavaScript
- Backend: PHP, MySQL
- Libraries: Font Awesome, Google Fonts
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Composer
- Web server (e.g., Apache)
-
Clone the repository:
git clone https://github.com/yourusername/wordquest.git cd wordquest
-
Install dependencies:
composer install
-
Database Configuration: Create a MySQL database and import the SQL schema provided in
schema.sql
. -
Environment Configuration: Create the
.env
with your database credentials:DB_HOST=localhost DB_PORT=3306 DB_DATABASE={(for example) => }wordquest DB_USERNAME= DB_PASSWORD= DB_CHARSET=
- Start your web server and ensure it's pointing to the
public
directory. - Open your web browser and navigate to
http://localhost
.
To set up error logs for PHP, follow these steps:
-
Open your
php.ini
file. If you're using XAMPP, it's typically located atC:\xampp\php\php.ini
. -
Find and update the following lines:
display_errors = Off log_errors = On error_log = "C:\xampp\php\logs\php_error_log"
-
Restart your web server to apply the changes.
- Login or Signup: Create a new account or log in with your existing credentials.
- Game Settings: Choose the word length and the number of attempts.
- Start Game: Start guessing the word. Feedback will be provided after each guess:
- Correct position and letter
- Correct letter, wrong position
- Wrong letter
- Scoring: Scores are calculated based on the length of the word and the number of attempts taken.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License.