Skip to content

Access Configuration

Use the access property to control which game surfaces users can access — and why they are blocked when they can't.

Basic example

js
MindtrainingPlatform.init('mindtraining', {
  access: {
    games: {
      crossword: {
        default: {
          playToday: true,
          playArchive: false,
          viewStatistics: false,
          saveState: true,
          blockedReason: 'subscription_required',
        },
      },
      sudoku: {
        default: {
          playToday: true,
          playArchive: true,
          viewStatistics: true,
          saveState: true,
        },
      },
    },
  },
})

Access policy properties

Each game entry has a default policy, and an optional variants map for per-variant overrides.

PropertyTypeDefaultDescription
playTodaybooleantrueAllow playing today's game
playArchivebooleantrueAllow browsing the archive
viewStatisticsbooleantrueAllow viewing the game's statistics page
saveStatebooleantrueAllow saving and resuming game progress
blockedReasonstringReason shown when access is denied (see below)
blockedReasonsobjectPer-surface blocked reasons (overrides blockedReason)
meterLimitobjectLimit the number of game starts in a rolling window
levelLimitobjectLimit access above a certain difficulty level

Blocked reasons

ValueMeaning
"login_required"User must log in to access
"subscription_required"User must have an active subscription
"variant_locked"This game variant is locked
"host_rule"Blocked by a site-level business rule

Per-surface blocked reasons

If you need different messages for today's game, the archive, or statistics, use blockedReasons:

js
crossword: {
  default: {
    playToday: true,
    playArchive: false,
    viewStatistics: false,
    blockedReasons: {
      archive: 'subscription_required',
      statistics: 'login_required',
    },
  },
}

Meter limit (metered paywall)

Allow a limited number of free game starts within a rolling time window:

js
crossword: {
  default: {
    playToday: true,
    playArchive: true,
    meterLimit: {
      maxStarts: 5,      // maximum game starts allowed
      intervalDays: 30,  // rolling window in days
    },
    blockedReason: 'subscription_required',
  },
}

What are variants?

A variant is a version of the same game type with different content categories or characteristics — same rules, different flavour. For example, crossword may have variants like mini (a smaller grid), kids (simple vocabulary), or sports (sports-themed clues). Each variant shares the same game engine but is treated as a separate access surface.

Variants are identified by a string ID configured on the platform side. When no variant-specific policy is defined, the default policy applies to all variants of that game.

Variant-level overrides

Apply a different policy to a specific variant while keeping default for everything else:

js
crossword: {
  default: {
    playToday: true,
    playArchive: false,
    blockedReason: 'subscription_required',
  },
  variants: {
    mini: {
      // The mini crossword is free — override the default
      playToday: true,
      playArchive: true,
    },
    kids: {
      // Kids variant requires login but not subscription
      playToday: true,
      playArchive: false,
      blockedReason: 'login_required',
    },
  },
}

Supported game types

  • connect4
    Match words to 4 characters or objects; each item is shown as an image with a word below.

  • crossmath
    Crossword-style grid where cells are filled with math expressions instead of letters.

  • crossword
    Classic crossword puzzle with clues for words that cross each other.

  • crossword_mini
    Shorter, quicker crossword puzzle.

  • difference
    Spot-the-difference game: find 8 differences between two similar images.

  • memory
    Card-matching game: flip cards to find matching pairs.

  • number
    Number-based puzzle (e.g. sequences, logic, or arithmetic).

  • puzzle
    General puzzle (jigsaw, logic, or similar).

  • quiz
    Trivia or knowledge quiz with questions and answers.

  • self_defined
    Crossword where each cell contains its own definition or clue.

  • seven_letters
    Spelling Bee–style game: form words from a set of 7 letters, with one central letter required.

  • sudoku
    9×9 grid puzzle: fill each row, column, and 3×3 box with digits 1–9.

  • tiles
    Tile-matching game: find pairs or groups on a board with many elements.

  • timeline
    Order events, dates, or items in the correct chronological sequence.

  • word
    Guess a hidden word in a limited number of tries.

  • word_links
    Connect words that belong to the same family or category.

  • word_search
    Find hidden words in a grid of letters (horizontal, vertical, or diagonal).

Client integration documentation maintained in-repo.