MARIO-STYLE COLLECT POINT GAME - PHP + MYSQL

IMPORTANT:
This is an original Mario-style platform collection game. It does not include Nintendo/Super Mario artwork, characters, music, or trademarks. Use your own legal game name and assets for public campaigns.

INSTALLATION
1. Upload the full folder to your VPS, for example:
   /var/www/html/mario_collect_game

2. Create database:
   - Open phpMyAdmin or MySQL command line.
   - Import sql/database.sql

3. Edit database login:
   config/db.php
   DB_HOST, DB_NAME, DB_USER, DB_PASS

4. Change admin password:
   config/admin.php
   Default password: admin123

5. Open game:
   https://yourdomain.com/mario_collect_game/index.php

6. Open admin:
   https://yourdomain.com/mario_collect_game/admin/login.php

ADMIN CAN MANAGE
- Game title
- Duration seconds
- Minimum score
- Daily play limit per phone
- Prizes
- Prize quantity
- Winning probability weight
- Minimum score for each prize
- Redemptions / mark voucher claimed

DATABASE TABLES
- game_settings
- prizes
- players
- game_sessions
- redemptions

HOW PRIZE PROBABILITY WORKS
Each active prize has probability_weight.
Example:
Prize A weight 50, Prize B weight 25, Prize C weight 25.
Total weight = 100.
Prize A chance about 50%.
Prize B chance about 25%.
Prize C chance about 25%.

GAME RULES
- Player enters name and phone.
- System creates a session token.
- Player has limited time, default 30 seconds.
- Coin = +10 points.
- Hit obstacle = -8 points.
- End result is saved to database.
- Prize is selected based on score, stock quantity, active status, and probability weight.
- Voucher code is generated.

SECURITY NOTES BEFORE LIVE
- Change admin password.
- Use HTTPS.
- Set proper MySQL user permissions.
- Add CAPTCHA if you run paid campaigns.
- Replace game name/assets with your own legal branding.
