Nonogram
gameType: "nonogram"
Nonogram (also known as Picross) logic puzzles where the player fills in cells based on row and column clues. Each clue indicates consecutive filled cell runs. GameplayGen creates binary grids with various patterns (random, symmetric, border, cross), computes the corresponding row/column clues, and validates unique solutions. Difficulty scales via grid size and fill density.
Interactive Example
🎨 Nonogram
Picross-style logic puzzle — fill cells to reveal the pattern
Grid Size
10×10
Filled Cells
62
Pattern
Symmetric
Difficulty
0.38
Try it
await pf.generate({
gameType: "nonogram",
params: { width: 10, height: 10, pattern: "symmetric" },
count: 5,
difficulty: { target: 0.40 }
})API Parameters
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
width | number | Yes | 5 | Grid width. Range 5–15. |
height | number | Yes | 5 | Grid height. Range 5–15. |
fillDensity | number | No | auto | Proportion of filled cells (0.3–0.7). If not set, automatically calculated as 0.3 + difficulty × 0.3. Higher density creates more complex clues. |
pattern | "random" | "symmetric" | "border" | "cross" | No | "symmetric" | Pattern type for the solution grid. "symmetric" creates horizontally mirrored patterns (most aesthetically pleasing). "border" fills edges. "cross" creates a + pattern. "random" is pure random fill. |
Pattern Types
symmetricHorizontally symmetric — left half is mirrored to the right. Produces aesthetically pleasing pixel art-like patterns. Default and recommended.
randomPure random fill based on density. Most varied output but least visually coherent.
borderFills all border cells (outer ring) plus random interior at 50% density. Creates frame-like patterns.
crossFills center row and column, with higher density near the center. Creates "+" shaped patterns.
Content Output
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
width | number | — | — | Grid width. |
height | number | — | — | Grid height. |
solution | boolean[][] | — | — | The solution grid. true = filled, false = empty. |
rowClues | number[][] | — | — | Row clues. Each row is an array of numbers indicating consecutive filled cell runs. E.g., [2, 3] means a run of 2, gap, run of 3. [0] means no filled cells. |
colClues | number[][] | — | — | Column clues. Same format as row clues. |
filledCount | number | — | — | Total number of filled cells in the solution. |
pattern | string | — | — | Pattern type that was used for generation. |
Example Request
curl -X POST https://api.gameplaygen.com/generate \
-H "Authorization: Bearer gg_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"gameType": "nonogram",
"params": {
"width": 10,
"height": 10,
"pattern": "symmetric"
},
"count": 5,
"difficulty": { "target": 0.5 }
}'Example Response
{
"content": [
{
"id": "gg_nno3r8k",
"gameType": "nonogram",
"content": {
"width": 10,
"height": 10,
"solution": [
[false, true, true, false, true, true, false, true, true, false],
[true, false, true, true, false, false, true, true, false, true],
[false, true, false, true, true, true, true, false, true, false],
[true, true, false, false, true, true, false, false, true, true],
[false, false, true, true, false, false, true, true, false, false],
[false, false, true, true, false, false, true, true, false, false],
[true, true, false, false, true, true, false, false, true, true],
[false, true, false, true, true, true, true, false, true, false],
[true, false, true, true, false, false, true, true, false, true],
[false, true, true, false, true, true, false, true, true, false]
],
"rowClues": [
[2, 2, 2], [1, 2, 2, 1], [1, 4, 1], [2, 2, 2],
[2, 2], [2, 2], [2, 2, 2], [1, 4, 1],
[1, 2, 2, 1], [2, 2, 2]
],
"colClues": [
[1, 2, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1],
[1, 2, 1, 1], [1, 2, 1, 1], [1, 1, 1, 1],
[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 2, 1]
],
"filledCount": 48,
"pattern": "symmetric"
},
"metrics": {
"verified": true,
"difficulty": 0.52,
"balance": 0.90,
"novelty": 1.0,
"quality": 0.85,
"notes": ["Symmetric pattern, 48/100 cells filled, unique solution"]
}
}
],
"requested": 5,
"delivered": 5,
"stats": {
"totalCandidates": 5,
"totalValidated": 5,
"totalRejected": 0,
"totalTime": 320,
"avgDifficulty": 0.51,
"difficultyRange": [0.44, 0.58]
}
}Tips for Game Integration
- ▸Start with 5×5: For new players, 5×5 nonograms are the perfect introduction. Scale up to 10×10 and 15×15 for experienced players.
- ▸Use symmetric patterns: Symmetric patterns look like pixel art when completed, giving players a satisfying reveal moment.
- ▸Clue rendering: Display
rowCluesto the left of each row andcolCluesabove each column. Highlight completed clues for UX. - ▸X-marking: Let players mark cells as "definitely empty" (X marks). This is a core nonogram mechanic. The solution grid tells you which cells should be empty.
- ▸Unique solutions: Every nonogram from GameplayGen has a unique solution — there's only one way to fill the grid that satisfies all clues. This is critical for fair gameplay.