Skip to content

Commit 919b543

Browse files
Add missing puzzle documentation (#727)
1 parent 0cab36a commit 919b543

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

client/assets/localization.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,4 @@ mod_manage_music,Label for music in mod management,Music,Musique,Música,音楽,
637637
mod_manage_submods,Label for submods in mod management,Sub Mods,Sous-mods,Submods,サブMOD,Submods,Submods,Submod,ซับม็อด
638638
mod_manage_enabled,Label for enabled in mod management,Enabled,Activé,Ativado,有効,Activado,Aktiviert,Abilitato,เปิดใช้งาน
639639
mm_2_time,,2P time attack,2J contre la montre,2J contra o tempo,2P スコアアタック,2J Contrareloj,2P Time Attack,2P a tempo,2P time attack
640+
op_about_puzzles,,About custom puzzles,À propos des puzzles personnalisés,Sobre quebra-cabeças personalizados,カスタムパズルについて,Acerca de rompecabezas personalizados,How to: Eigene Puzzles erstellen,A proposito dei puzzle personalizzabili,เกี่ยวกับ custom puzzles

client/src/PuzzleSet.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ PuzzleSet.keyOrder = {
107107
Puzzle.PUZZLE_PROPERTY.START_TIMING,
108108
Puzzle.PUZZLE_PROPERTY.MOVES,
109109
Puzzle.PUZZLE_PROPERTY.STOP,
110-
Puzzle.PUZZLE_PROPERTY.PRE_STOP,
111110
Puzzle.PUZZLE_PROPERTY.SHAKE,
112111
Puzzle.PUZZLE_PROPERTY.STACK,
113112
Puzzle.PUZZLE_PROPERTY.PANEL_BUFFER,

client/src/scenes/OptionsMenu.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,10 @@ function OptionsMenu:loadAboutMenu()
514514
GAME.theme:playValidationSfx()
515515
love.system.openURL("https://github.com/panel-attack/panel-game/blob/beta/docs/panels.md")
516516
end),
517+
ui.MenuItem.createButtonMenuItem("op_about_puzzles", nil, nil, function()
518+
GAME.theme:playValidationSfx()
519+
love.system.openURL("https://github.com/panel-attack/panel-game/blob/beta/docs/puzzles.md")
520+
end),
517521
ui.MenuItem.createButtonMenuItem("op_about_attack_files", nil, nil, function()
518522
GAME.theme:playValidationSfx()
519523
love.system.openURL("https://github.com/panel-attack/panel-game/blob/beta/docs/training.txt")

docs/puzzles.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Each puzzle file can contain as many puzzle sets as you like. Each set within a
1313

1414
The contents of each puzzle file should be formatted something like this:
1515

16-
```json
16+
```jsonc
1717
{
1818
"Version": 3,
1919
"Puzzle Sets": [
@@ -24,7 +24,7 @@ The contents of each puzzle file should be formatted something like this:
2424
"Puzzle Type": "chain",
2525
"StartTiming": "countdown",
2626
"Moves": 0,
27-
"Stack":
27+
"Stack":
2828
"040000
2929
111440",
3030
"CursorStartLeft":
@@ -36,7 +36,7 @@ The contents of each puzzle file should be formatted something like this:
3636
{
3737
"Puzzle Type": "clear",
3838
"Moves": 0,
39-
"Stack":
39+
"Stack":
4040
"
4141
[====]
4242
[====]
@@ -81,7 +81,9 @@ Version 3 is the current version it allows "Puzzle Sets" to have recursive "Puzz
8181
- **"clear"** - all garbage on the field needs to be cleared before health runs out
8282

8383
#### Other Fields
84-
- **"Moves"** - the number of moves, can be zero to not have a limit
84+
- **"Moves"** - the number of moves allowed to complete the puzzle
85+
- Set to 0 for unlimited moves (no move limit)
86+
- **Important**: "moves" type puzzles must have a value greater than 0
8587
- **"Stack"** - the starting arrangement of the panels, see below
8688

8789
#### Start Timing
@@ -100,6 +102,14 @@ If no start timing is given, a suitable start timing is selected based on puzzle
100102
- **"Shake"** - specifies how many frames of shake time are initially granted to the player
101103
- **"CursorStartLeft"** - specifies where the left part of the cursor should start the puzzle
102104
- Format: `{ "Row": 1, "Column": 1 }`
105+
- Valid ranges: Row must be 1-12, Column must be 1-5
106+
- **"Solution"** - a compressed input string representing the solution to the puzzle
107+
- Format: String of encoded inputs (swap directions and timing)
108+
- Used by the game to verify solutions or provide hints
109+
- The best way to add this is to solve your puzzle in game, and it will be added to the puzzle.
110+
- **"Help Description"** - optional text that explains the puzzle pattern or provides hints to the player
111+
- Format: String describing the puzzle mechanic or strategy
112+
- Displayed when the player requests help for the puzzle
103113

104114
#### Panel Buffers
105115
**"PanelBuffer"** specifies the panels that should appear if the player is raising the stack.
@@ -174,4 +184,8 @@ Carriage returns are allowed in the middle of the panel maps for each individual
174184
- **]** = bottom right corner of a combo / chain garbage block
175185
- **{** = left end of a shock garbage block
176186
- **}** = right end of a shock garbage block
177-
- **=** = filler space to determine the size of the garbage block indicated by the surrounding `[]{}`
187+
- **=** = filler space to determine the size of the garbage block indicated by the surrounding `[]{}`
188+
189+
## More Examples
190+
191+
For additional examples, check out the [default puzzles included with the game](https://github.com/panel-attack/panel-game/blob/beta/client/assets/default_data/puzzles/) on GitHub. This file contains a variety of puzzle types and demonstrates many of the features described in this guide.

0 commit comments

Comments
 (0)