Database Setup (MySQL/XAMPP)
This project has been upgraded to use MySQL for shared global leaderboards and user accounts.
Requirements
- XAMPP (or any WAMP/MAMP stack)
- PHP 7.4 or higher
- MySQL / MariaDB
Setup Instructions
- Start XAMPP: Open XAMPP Control Panel and start Apache and MySQL.
- Move Project: Ensure the project folder is inside
C:\xampp\htdocs\. - Configure Database:
- Go to
http://localhost/phpmyadmin - Create a new database named
space_odyssey.
- Go to
- Access Game:
- Open your browser to
http://localhost/Kelompok09-SPOILER/Main.html.
- Open your browser to
Structure
/database/db_connect.php: MySQL connection script (configured for default XAMPP)./api/: Contains the PHP endpoints for the game.
Troubleshooting
If you see "Database connection failed", ensure:
- MySQL is running in XAMPP.
- The database name in
db_connect.phpmatches your phpMyAdmin database name.