“With great power comes great responsibility… to make cool themes” - Admin Spider-Man, probably
Welcome to the admin side of Match’n Gacha! This guide covers everything you need to know about managing themes, collectible assets, and system configuration. Perfect for when you want to add that kawaii cat theme or introduce limited-edition collectibles.
Themes are stored as JSON manifests in /public/data/themes/
. Each theme defines colors, visual styles, and asset mappings.
/public/data/themes/
โโโ default.json # Base theme (always required)
โโโ neon.json # Optional: Cyberpunk theme
โโโ kawaii.json # Optional: Cute anime theme
โโโ seasonal/ # Optional: Event themes
โโโ halloween.json
โโโ christmas.json
โโโ summer.json
{
"name": "Theme Display Name",
"version": "1.0.0",
"description": "Brief theme description",
"colors": {
"primary": "#4a148c",
"secondary": "#7b1fa2",
"accent": "#ffc107",
"background": "#1a0033",
"surface": "rgba(255, 255, 255, 0.1)",
"text": "#ffffff",
"textSecondary": "rgba(255, 255, 255, 0.7)"
},
"blocks": {
"red": { "color": "#e53935", "glow": "#ff5722" },
"blue": { "color": "#1e88e5", "glow": "#2196f3" },
"green": { "color": "#43a047", "glow": "#4caf50" },
"yellow": { "color": "#fdd835", "glow": "#ffeb3b" },
"purple": { "color": "#8e24aa", "glow": "#9c27b0" },
"orange": { "color": "#fb8c00", "glow": "#ff9800" }
},
"collectibles": {
"common": { "color": "#9e9e9e", "border": "#757575" },
"uncommon": { "color": "#4caf50", "border": "#388e3c" },
"rare": { "color": "#2196f3", "border": "#1976d2" },
"epic": { "color": "#9c27b0", "border": "#7b1fa2" },
"legendary": { "color": "#ffc107", "border": "#f57f17" },
"mythic": { "color": "#e91e63", "border": "#c2185b" }
},
"effects": {
"particles": {
"match": "#ffffff",
"combo": "#ffc107",
"powerup": "#e91e63"
},
"animations": {
"speed": 1.0,
"easing": "Back.easeOut"
}
},
"audio": {
"volume": 0.7,
"variants": ["default", "8bit", "orchestral"]
}
}
/public/data/themes/
cyberpunk-neon.json
)The ThemeManager
system supports real-time theme switching:
// Load theme programmatically
await window.themeManager.loadTheme('neon');
// Get available themes
const themes = await window.themeManager.getAvailableThemes();
// Apply theme to running game
window.themeManager.applyTheme(gameScene);
/public/assets/
โโโ sprites/
โ โโโ blocks/ # Block graphics
โ โ โโโ red.png
โ โ โโโ blue.png
โ โ โโโ [color].png
โ โโโ collectibles/ # Collectible card art
โ โ โโโ common/
โ โ โโโ rare/
โ โ โโโ mythic/
โ โโโ ui/ # Interface elements
โ โ โโโ buttons/
โ โ โโโ icons/
โ โ โโโ backgrounds/
โ โโโ effects/ # Particle and effect sprites
โ โโโ sparkles/
โ โโโ explosions/
โโโ audio/
โ โโโ sfx/ # Sound effects
โ โ โโโ match.ogg
โ โ โโโ combo.ogg
โ โ โโโ powerup.ogg
โ โโโ music/ # Background music
โ โ โโโ menu.ogg
โ โ โโโ gameplay.ogg
โ โโโ voice/ # Character voices (optional)
โโโ themes/ # Theme-specific assets
โโโ default/
โโโ neon/
โโโ kawaii/
The AssetManager
automatically handles missing assets:
/assets/themes/neon/blocks/red.png
)/assets/sprites/blocks/red.png
)For Block Graphics:
# Add to default set
/public/assets/sprites/blocks/[color].png # 64x64 px, PNG format
# Add theme variant
/public/assets/themes/[theme]/blocks/[color].png
For Collectibles:
# Rarity-based organization
/public/assets/sprites/collectibles/[rarity]/[name].png # 100x140 px
# Examples:
/public/assets/sprites/collectibles/mythic/dragon-card.png
/public/assets/sprites/collectibles/legendary/phoenix-gem.png
For UI Elements:
/public/assets/sprites/ui/buttons/[name].png # Variable size
/public/assets/sprites/ui/icons/[name].png # 32x32 px
Collectibles are defined in /public/data/collectibles/
with JSON manifests:
{
"id": "dragon_card_001",
"name": "Ancient Dragon Card",
"type": "card",
"rarity": "mythic",
"description": "A legendary card depicting the first dragon",
"value": 10000,
"tradeable": true,
"category": "fantasy",
"series": "ancient_legends",
"attributes": {
"power": 95,
"luck": 85,
"special": "combo_bonus"
},
"drop_conditions": {
"min_level": 10,
"combo_threshold": 5,
"chance": 0.001
},
"visual": {
"sprite": "dragon_card_001.png",
"animation": "mythic_glow",
"particles": true
}
}
Default drop rates (configurable in CollectibleSystem.js
):
const rarityWeights = {
common: 60, // 60% drop rate
uncommon: 25, // 25% drop rate
rare: 10, // 10% drop rate
epic: 3, // 3% drop rate
legendary: 1.5, // 1.5% drop rate
mythic: 0.5 // 0.5% drop rate (ultra rare!)
};
/public/assets/sprites/collectibles/[rarity]/
/public/data/collectibles/
For special events (holidays, anniversaries):
{
"event": "halloween_2025",
"duration": {
"start": "2025-10-01T00:00:00Z",
"end": "2025-11-01T00:00:00Z"
},
"collectibles": [
"pumpkin_king_card",
"ghost_gem",
"witch_artifact"
],
"bonus_rates": {
"legendary": 2.0, // 2x legendary drop rate
"mythic": 1.5 // 1.5x mythic drop rate
}
}
# Navigate to project directory
cd /home/thrax/unified-services/match-n-gacha
# Edit theme files
vim public/data/themes/your-theme.json
# Test theme loading in browser console
window.themeManager.loadTheme('your-theme')
# Rebuild and deploy
docker compose build match-n-gacha && docker compose up -d match-n-gacha
Images:
# Optimize PNG files
optipng -o7 public/assets/sprites/**/*.png
# Convert to WebP for better compression
cwebp -q 80 input.png -o output.webp
Audio:
# Convert to OGG
ffmpeg -i input.wav -c:a libvorbis -q:a 4 output.ogg
# Normalize audio levels
ffmpeg -i input.ogg -filter:a "dynaudnorm" output_normalized.ogg
Theme and asset files should be versioned:
{
"name": "Neon Theme",
"version": "1.2.0",
"changelog": [
"1.2.0: Added Halloween collectibles",
"1.1.0: Improved block animations",
"1.0.0: Initial release"
]
}
/public/js/config/constants.js
)const GAME_CONFIG = {
GRID_SIZE: { cols: 8, rows: 10 },
BLOCK_SIZE: 60,
BLOCK_TYPES: ['red', 'blue', 'green', 'yellow', 'purple', 'orange'],
MATCH_THRESHOLD: 3,
MAX_THEMES: 10,
COLLECTIBLE_DROP_BASE_CHANCE: 0.1
};
/public/js/config/features.js
)const FEATURES = {
MARKETPLACE_ENABLED: true,
DAILY_CHALLENGES: true,
SOCIAL_FEATURES: false,
BETA_THEMES: false,
DEBUG_MODE: false
};
// Track theme switches
window.themeManager.on('themeChanged', (oldTheme, newTheme) => {
analytics.track('theme_changed', {
from: oldTheme,
to: newTheme,
timestamp: Date.now()
});
});
// Monitor asset load times
window.assetManager.on('assetLoaded', (asset, loadTime) => {
console.log(`${asset.name} loaded in ${loadTime}ms`);
});
Theme Not Loading:
jsonlint
Assets Missing:
Performance Issues:
Browser console commands for testing:
// Reload all themes
await window.themeManager.reloadThemes();
// Force collectible drop
window.collectibleSystem.awardCollectible('mythic');
// Clear all cached assets
window.assetManager.clearCache();
// Show performance stats
window.game.debug.showStats = true;
/public/data/themes/[name].json
/public/data/collectibles/[name].json
/public/assets/sprites/[category]/[name].png
/public/assets/audio/[category]/[name].ogg
window.themeManager
window.assetManager
window.collectibleSystem
# Rebuild game
docker compose build match-n-gacha && docker compose up -d match-n-gacha
# View logs
docker logs match-n-gacha
# Access container
docker exec -it match-n-gacha sh
๐ง Admin powers activated! Remember: with great theme comes great responsibility to make it look awesome.
๐ Last updated: August 2025 | For Match’n Gacha v1.0.0