A Nordic-themed match-3 game with runes and mythological elements, built with vanilla JavaScript, jQuery, and Bootstrap 5 for The Secret World
Rune Match is a mini-game designed to integrate with a Nordic-themed gardening game. Players match 3 or more identical Norse runes by swapping adjacent pieces to earn resources (coins and seeds) that can be used in the main garden game.
- Match-3 gameplay with Norse runes
- Nordic-themed special power-ups:
- Thor's Hammer: Clears an entire row
- Odin's Ravens: Clears all runes of one type
- Yggdrasil: Clears a 3x3 area
- Heimdall: Converts nearby runes to the same type
- Rainbow Rune: Can match with any rune
- Combo system with increasing rewards
- Combo Fever mode that doubles points
- Daily challenges with special rewards
- Leaderboards (daily, weekly, all-time)
- Inventory system for special items
- User profiles and statistics
- Responsive design for mobile and desktop play
- Frontend: HTML5, CSS3, JavaScript, jQuery, Bootstrap 5
- Backend: PHP 8.x
- Database: MySQL 8.x
- Server: Apache 2.4.x
- Clone the repository
- Set up a web server with PHP and MySQL
- Import the database schema from
database/migrations
- Configure the database connection in
config/config.php
- Set appropriate permissions for directories
# Example configuration for directories
chmod 755 .
chmod 644 .htaccess
chmod -R 755 assets
chmod -R 755 includes
chmod 755 *.php
Run the SQL script in database/migrations
to set up the database schema. Then, update the database connection details in config/config.php
:
// Update these values with your database credentials
define('DB_HOST', 'localhost');
define('DB_USER', 'your_username');
define('DB_PASS', 'your_password');
define('DB_NAME', 'rune_match');
rune-match/
├── assets/ # Frontend assets
│ ├── audio/ # Game sounds
│ ├── css/ # CSS files
│ ├── images/ # Game images
│ │ ├── runes/ # Rune images
│ │ ├── backgrounds/
│ │ └── items/ # Special items
│ └── js/ # JavaScript files
│ ├── game/ # Game logic
│ └── lib/ # Libraries
├── config/ # Configuration
├── database/ # Database scripts
├── includes/ # PHP includes
│ ├── api/ # API endpoints
│ └── classes/ # PHP classes
├── errors/ # Error pages
├── .htaccess # Apache config
├── index.php # Entry point
├── game.php # Game page
├── profile.php # User profile
├── leaderboard.php # Leaderboard
└── README.md # Documentation
The game is built with a modular structure:
- GameBoard: Manages the game grid and cell interactions
- MatchManager: Detects and processes matches
- ScoreManager: Tracks points and calculates resources
- GameTimer: Handles the game timer
- AnimationController: Manages visual effects
- SoundManager: Handles audio
- GameSession: Main controller that coordinates all components
- Database: Stores user data, game sessions, challenges, and items
- API Endpoints: Handles requests for game actions
- PHP Classes: Encapsulate game logic and database interactions
You can customize game parameters in config/config.php
:
// Game configuration
define('GRID_SIZE', 8); // Change grid size
define('GAME_DURATION', 120); // Game duration in seconds
define('SCORE_PER_MATCH', 10); // Base score per match
define('COINS_PER_SCORE', 0.1); // Conversion rate from score to coins
define('SEEDS_PER_SCORE', 0.05); // Conversion rate from score to seeds
To add new rune types:
- Add the rune image to
assets/images/runes/
- Update the
RUNE_TYPES
configuration inconfig/config.php
Rune Match is designed to integrate with The Secret World Universe. Resources earned (coins and seeds) and special items can be used in the The Secret World. To integrate:
- Game design and development: ChrisDBuilder
- Norse rune designs based on historical Elder Futhark runes
- Nordic-themed special pieces inspired by Norse mythology
This project is licensed under the MIT License - see the LICENSE file for details.