Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenMian committed Feb 4, 2024
1 parent ea6cb80 commit 3af6ada
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 40 deletions.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@ A sokoban with solver.

## Features

- [Integrated solver.](docs/solver.md)
- [Full mouse control.](docs/auto_move.md)
- Front-end and back-end separation.
- [Levels and solutions are stored in the database.](docs/database.md)
- [Custom settings via configuration file.](docs/configuration.md)
- Player animation.
- [**Solver**](docs/solver.md):
The solver can automatically solve simple levels.

### [Auto move](docs/auto_move.md)
<p align="center"><img src="./docs/assets/auto_solve.gif" width=50%></p>

<p align="center"><img src="./docs/assets/auto_crate_push.gif" width=50%></p>
- [**Auto move**](docs/auto_move.md):
Supports full mouse control for automatic player movement and crate pushing.

### [Solver](docs/solver.md)
<p align="center"><img src="./docs/assets/auto_crate_push.gif" width=50%></p>

<p align="center"><img src="./docs/assets/auto_solve.gif" width=50%></p>
- [**Level management**](docs/level_management.md):
Levels and solutions are stored in a database.

- [**Customizing**](docs/customizing.md):
Options can be customized via configuration file.

- **Map viewing**:
Supports moving and zooming the map. When switching levels, the zoom will be automatically adjusted to fit the window size.

- **Player character animation**:
Player character have smooth movement and movement animations in different directions.

- **Front-end and back-end separation**:
Backend code (such as solvers) does not depend on frontend (such as Bevy).

## Keymap

Expand Down
8 changes: 7 additions & 1 deletion docs/configuration.md → docs/customizing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Config
# Customizing

## Configuration

User can configure settings by editing `config.toml` in the same directory. If the file does not exist, a default configuration file will be automatically generated when the program is run.

Expand All @@ -20,3 +22,7 @@ lower_bound_method = "MinimumMove"
```

For `solver` related configuration options, please refer to [Solver](./solver.md).

## Keymap

User can configure keymap by editing `keymap.toml` in the same directory. If the file does not exist, a default keymap configuration file will be automatically generated when the program is run.
28 changes: 0 additions & 28 deletions docs/database.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
| load multiple files | :heavy_check_mark: |
| saves levels with format | SQLite database |

### Import and Export for Internet
### Import and export for Internet

| Feature | Support |
| ------------------------------------------------- | ------------------------ |
Expand Down
43 changes: 43 additions & 0 deletions docs/level_management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Level management

## XSB format

| Tile | Symbol |
| ---------------- | ----------- |
| Wall | `#` |
| Player | `@` |
| Player on target | `+` |
| Crate | `$` |
| Crate on target | `*` |
| Target | `.` |
| Floor | ` `/`-`/`_` |

## Import

Supports importing levels in XSB format (support run-length encoding) from files or system clipboard:

- Import from file: User can drag single or multiple level files in XSB format into the window.
- Import from clipboard: If the level in XSB format is already in the clipboard, it can be imported by input action.

The levels will be standardized first to prevent repeated import of the same or similar levels. The standardized levels are only used for deduplication, and the final imported levels are not standardized.

Levels that meet the following conditions are considered similar:

- The starting positions of the player characters are different, but in the same closed area.
- After rotation and inversion.
- The difference is only in the decorations that are inaccessible to the character. These decorations can make the level more beautiful, but do not affect the solution of the level.

## Export

Supports exporting the current level to the system clipboard in XSB format.

## Supported special level types

- [ ] Circular levels.
- [x] Levels with decorative outside elements.
- [x] Interior empty rows.
- [ ] Not closed levels.

## See also

- <http://www.sokobano.de/wiki/index.php?title=Level_format>

0 comments on commit 3af6ada

Please sign in to comment.