---
key: lesson/gameplay-acceptance
type: lesson
id: gameplay-acceptance
lang: en
title: Verifying gameplay behavior
summary: >-
  Turn “the mechanic is done” into reproducible scenarios with initial
  conditions, an action and an observable result.
updatedAt: '2026-10-20'
status: active
url: 'https://gamemechanics.pro/en/lessons/gameplay-acceptance/'
jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/gameplay-acceptance.json'
markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/gameplay-acceptance.md'
aliases:
  - тестирование
  - testing
  - acceptance
tags:
  - testing
  - acceptance
  - debugging
sourceIds:
  - source-ee9efb6934cc6681
  - source-e882a929b35f2ca0
sources:
  - id: source-ee9efb6934cc6681
    title: 'Cucumber: Gherkin reference'
    url: 'https://cucumber.io/docs/gherkin/reference/'
    verifiedAt: null
  - id: source-e882a929b35f2ca0
    title: 'Godot: Overview of debugging tools'
    url: >-
      https://docs.godotengine.org/en/stable/tutorials/scripting/debug/overview_of_debugging_tools.html
    verifiedAt: null
relations:
  - type: requires
    direction: outgoing
    label: Before you start
    key: lesson/agent-workflow
    title: Developing a game with an AI agent
    url: 'https://gamemechanics.pro/en/lessons/agent-workflow/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/agent-workflow.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/agent-workflow.md'
  - type: requires
    direction: outgoing
    label: Before you start
    key: lesson/state-machines
    title: States and transitions
    url: 'https://gamemechanics.pro/en/lessons/state-machines/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/state-machines.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/state-machines.md'
  - type: related
    direction: incoming
    label: Related materials
    key: lesson/performance-budget
    title: A performance budget
    url: 'https://gamemechanics.pro/en/lessons/performance-budget/'
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/en/lesson/performance-budget.json
    markdownUrl: >-
      https://gamemechanics.pro/content/knowledge/en/lesson/performance-budget.md
  - type: related
    direction: outgoing
    label: Related materials
    key: lesson/state-machines
    title: States and transitions
    url: 'https://gamemechanics.pro/en/lessons/state-machines/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lesson/state-machines.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lesson/state-machines.md'
  - type: reviews
    direction: outgoing
    label: Review through a lens
    key: lens/schell-033
    title: Rules
    url: 'https://gamemechanics.pro/en/knowledge/lens/schell-033/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/lens/schell-033.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/lens/schell-033.md'
  - type: contains
    direction: incoming
    label: Learning paths
    key: path/first-prototype
    title: Your first verifiable prototype
    url: 'https://gamemechanics.pro/en/learn/first-prototype/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/path/first-prototype.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/path/first-prototype.md'
  - type: contains
    direction: incoming
    label: Learning paths
    key: path/game-verification
    title: Game verification
    url: 'https://gamemechanics.pro/en/learn/game-verification/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/en/path/game-verification.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/en/path/game-verification.md'
placements: []
supersededBy: []
attributes:
  category: workflow
  level: beginner
  minutes: 6
endsAt: null
provenance: >-
  Original gamemechanics.pro material. Check illustrative examples in your own
  project.
license: CC-BY-4.0
codeLicense: MIT
attribution: gamemechanics.pro contributors
---
# Verifying gameplay behavior

id: gameplay-acceptance
type: lesson
key: lesson/gameplay-acceptance
lang: en
status: active
url: https://gamemechanics.pro/en/lessons/gameplay-acceptance/

Turn “the mechanic is done” into reproducible scenarios with initial conditions, an action and an observable result.

## Prerequisites

A game can launch and accept a button press while the mechanic still breaks its rule. Check promised behavior under known conditions, then separately assess how players experience it.

## The principle

Write the initial state, event and expected observable result. This matches the Given/When/Then structure in the [Gherkin reference](https://cucumber.io/docs/gherkin/reference/), but a manual check does not require installing Cucumber.

Separate a pure rule from integration. Charge consumption can be checked in a model; door collision, sound and recovery from pause need checks inside the game. Engine debugging tools help expose causes, but a clean console does not establish correct mechanics.

<span id="example-a-single-charge-dash"></span>

## Practical example

### A single-charge dash

In this teaching contract, a dash consumes one charge and lasts 0.2 seconds of game time. Pause stops the game timer. Death cancels dash movement without returning the charge. These are authored example rules, not universal requirements.

| Given                     | When                    | Then                                   |
| ------------------------- | ----------------------- | -------------------------------------- |
| Character alive, charge 1 | Dash request accepted   | Charge 0, dash state active            |
| Charge 0                  | Another request arrives | No new dash starts                     |
| Dash active               | Game is paused          | Duration does not advance during pause |
| Dash active               | Death event arrives     | Movement canceled, charge remains 0    |

Choose a priority for a simultaneous request and death beforehand: this model processes death first, so no dash starts. Reset initial state for each run; otherwise an earlier test consumes the next one's charge.

In a fixed-step model, check completion on the first tick where accumulated game time reaches 0.2 seconds. For manual observation, specify an acceptable tolerance and use a log rather than eyeballing duration.

## Common mistakes

- Testing only the successful case with full resources.
- Treating a screenshot as proof of correct duration.
- Requiring the same render-frame number at different rendering rates.
- Presenting an automated rule check as evidence of usable controls.

## Verify it

1. Execute each scenario from its specified state and retain the result.
2. Repeat integration checks at different rendering rates while preserving the simulation step.
3. Check pause, restart and simultaneous events.
4. For a failure, record build, input events, expected behavior and actual behavior.

## Prompt for an AI agent

> Implement the dash contract and scenario table. Automate pure transitions and describe the remaining checks for the target device. Separate executed checks, unexecuted checks and discrepancies in the report. Do not invent a successful run.

Compare transitions with [States and transitions](/en/lessons/state-machines/) and the [Rules lens](/en/lenses/#schell-033).

## Connected materials

- Before you start: [Developing a game with an AI agent](https://gamemechanics.pro/en/lessons/agent-workflow/) (key: lesson/agent-workflow)
- Before you start: [States and transitions](https://gamemechanics.pro/en/lessons/state-machines/) (key: lesson/state-machines)
- Related materials: [A performance budget](https://gamemechanics.pro/en/lessons/performance-budget/) (key: lesson/performance-budget)
- Related materials: [States and transitions](https://gamemechanics.pro/en/lessons/state-machines/) (key: lesson/state-machines)
- Review through a lens: [Rules](https://gamemechanics.pro/en/knowledge/lens/schell-033/) (key: lens/schell-033)
- Learning paths: [Your first verifiable prototype](https://gamemechanics.pro/en/learn/first-prototype/) (key: path/first-prototype)
- Learning paths: [Game verification](https://gamemechanics.pro/en/learn/game-verification/) (key: path/game-verification)

## Sources and provenance

Original gamemechanics.pro material. Check illustrative examples in your own project.

- [Cucumber: Gherkin reference](https://cucumber.io/docs/gherkin/reference/) (id: source-ee9efb6934cc6681)
- [Godot: Overview of debugging tools](https://docs.godotengine.org/en/stable/tutorials/scripting/debug/overview_of_debugging_tools.html) (id: source-e882a929b35f2ca0)

CC-BY-4.0 · gamemechanics.pro contributors
