Create Minigame

When building a minigame you can add:

Adding a SlotMachine

Properties

PropertyRequiredTypeDescriptionDefault
typestringSet to SlotMachine
titlestringThe title of the slot machine
descriptionstringThe description of the slot machine
startBalanceintegerThe starting balance of the user10
winningProbabilitystringSet to Low, Medium or HighMedium

Example object

{
    "title": "Spin the slot machine",
    "description": "Try your luck!",
    "type": "SlotMachine",
    "startBalance": 1000,
    "winningProbability": "High"
}

Adding a WheelSpinner

Properties

PropertyRequiredTypeDescriptionDefault
typestringSet to WheelSpinner
titlestringThe title of the wheel spinner
descriptionstringThe description of the wheel spinner
itemsobject[]An array of the items on the wheel, see WheelSpinnerItem properties below

WheelSpinnerItem properties

PropertyRequiredTypeDescriptionDefault
titlestringThe title of the item
typestringSet to either Win, Loss, or FreeSpin
percentintegerThe percentage of the item on the wheel; 0-100
awardstringThe award the user gets
backgroundColorstringThe background color of the itemrgba(255, 255, 255, 1)
textColorstringThe text color of the itemrgba(0, 0, 0, 1)
mediastringThe URL of the media file

Example object

{
    "title": "Spin the wheel",
    "description": "Try your luck!",
    "type": "WheelSpinner",
    "items": [
        {
            "title": "Win 100$",
            "type": "Win",
            "percent": 50,
            "award": "100$"
        },
        {
            "title": "Lose 50$",
            "type": "Loss",
            "percent": 30,
            "award": "-50$"
        },
        {
            "title": "Free spin",
            "type": "FreeSpin",
            "percent": 20,
            "award": "Free spin"
        }
    ]
}

Adding a Sudoku

Properties

PropertyRequiredTypeDescriptionDefault
typestringSet to Sudoku
titlestringThe title of the sudoku block
descriptionstringThe description of the sudoku block
mediastringThe URL of the media file
difficultyintegerThe difficulty level of the sudoku; 0-10050
areRulesVisiblebooleanWhether the rules are visible to the usertrue
isConflictHighlightingAllowedbooleanWhether conflict highlighting is allowedfalse
isGuessCheckingAllowedbooleanWhether guess checking is allowedfalse
refreshIntervalstringThe interval in which the sudoku automatically refreshes; set to a value of: None, Daily, Weekly, or MonthlyNone

Example object

{
    "title": "Sudoku Challenge",
    "description": "Solve the puzzle!",
    "type": "Sudoku",
    "difficulty": 70,
    "areRulesVisible": true,
    "isConflictHighlightingAllowed": true,
    "isGuessCheckingAllowed": true,
    "refreshInterval": "Weekly"
}

Full example

{
    "type": "Minigame",
    "build": {
        "title": "Minigame example (Builder API)",
        "blocks": [
            {
                "title": "Spin the slot machine",
                "description": "Try your luck!",
                "type": "SlotMachine",
                "startBalance": 1000,
                "winningProbability": "High"
            },
            {
                "title": "Spin the wheel",
                "description": "Try your luck!",
                "type": "WheelSpinner",
                "items": [
                    {
                        "title": "Win 100$",
                        "type": "Win",
                        "percent": 50,
                        "award": "100$"
                    },
                    {
                        "title": "Lose 50$",
                        "type": "Loss",
                        "percent": 30,
                        "award": "-50$"
                    },
                    {
                        "title": "Free spin",
                        "type": "FreeSpin",
                        "percent": 20,
                        "award": "Free spin"
                    }
                ]
            },
            {
                "title": "Sudoku Challenge",
                "description": "Solve the puzzle!",
                "type": "Sudoku",
                "difficulty": 70,
                "areRulesVisible": true,
                "isConflictHighlightingAllowed": true,
                "isGuessCheckingAllowed": true,
                "refreshInterval": "Weekly"
            }
        ]
    }
}

Next steps

Now that you know the basics of building a minigame, you might want to learn how to: