Skip to main content
The SDK ships with five fully implemented sample games in games/. Each game covers a distinct win type and set of mechanics, and all share the same file structure so you can use any of them as a template.

Included games

Lines game

3-row, 5-reel, 20 paylines. Wild multipliers add together in freegame. Separate freegame reelset.

Ways game

5-reel, 3-row, 243 ways. Wild multipliers compound multiplicatively in freegame.

Cluster game

7×7 tumbling board. Grid position multipliers activate and double on each win.

Scatter game

6-reel, 5-row pay-anywhere tumbling. Persistent global multiplier, board multiplier symbols.

Running a sample game

From the project root, use the make shortcut:
Or invoke the run script directly after activating your virtual environment:
Replace 0_0_lines with any game ID from the table above.

Game file structure

Every game directory contains the same set of files:

Using the template to create a new game

games/template/ is a minimal skeleton with all required files stubbed out. Copy it to start a new game:
1

Copy the template

2

Set your game ID

Open games/my_game/game_config.py and set self.game_id, self.win_type, self.num_reels, self.num_rows, and self.paytable.
3

Add reelstrips

Create a reels/ directory inside your game folder and add your reelstrip CSV files.
4

Implement game logic

Fill in run_spin() and run_freespin() in gamestate.py. Use the sample games as reference implementations.
5

Configure bet modes

Set up BetMode and Distribution objects in game_config.py to define simulation criteria.
6

Run your game

Start by running a small number of uncompressed simulations to verify your event output before scaling up. Set compression = False and "base": 100 in run.py for quick debugging.

Output files

All generated files are written into games/<game_id>/library/:
The library/publish_files/ directory contains the books, lookup tables, and index file required for publication to the Stake Engine RGS. These must be present regardless of whether this SDK is used to generate the math results.