Template Games¶
The SDK includes several template games that demonstrate different slot mechanics and serve as starting points for new game development. Each template implements a specific win calculation method and showcases common game features.
Available Templates¶
Core Win Types¶
| Template | Win Type | Key Features |
|---|---|---|
| Cluster | Cluster-pay | Adjacent matching symbols, tumbles, grid multipliers |
| Lines | Line-pay | Traditional paylines, simple structure |
| Ways | Ways-pay | Left-to-right adjacent reels |
| Scatter | Scatter-pay | Pay anywhere on board |
Advanced Features¶
| Template | Win Type | Special Features |
|---|---|---|
| Expanding Wilds | Line-pay | Expanding wilds, super spin mode, prize collection |
Template Structure¶
Each template follows the refactored architecture with a simplified file structure:
games/template_<type>/
├── run.py # Execution script
├── run_config.toml # Runtime settings (symlink to dev.toml)
├── dev.toml # Development config (100 sims)
├── prod.toml # Production config (1M sims)
├── game_config.py # Game rules and configuration
├── game_state.py # All game logic (100-400 lines)
├── game_optimization.py # Optimization parameters
├── game_events.py # Custom events (optional)
└── reels/ # Reel strip CSV files
├── base.csv
├── free.csv
└── wincap.csv
Quick Start with Templates¶
-
Copy a template that matches your desired win type:
-
Update configuration in
game_config.py: -
Modify reel strips in
reels/directory (CSV files) -
Implement game logic in
game_state.py: - Add special symbol handlers
- Implement game-specific mechanics
-
Complete
run_spin()andrun_free_spin()methods -
Run the game:
Template Documentation¶
Click on any template below to view detailed documentation including: - Game mechanics overview - Special features and behaviors - Custom functions and handlers - Configuration examples - Implementation details