Skip to content

ShenMian/sokoban-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sokoban-rs

A sokoban with solver.

Features

  • Solver: The solver can automatically solve simple levels. More details.

  • Auto move: Supports full mouse control for automatic player movement and crate pushing. More details.

  • Level management: Levels and solutions are stored in the database. More details.

  • Customizing: Options can be customized via configuration file. More details.

  • 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 has smooth movement and animations in different directions.

  • Front-end and back-end separation: Backend code (such as solvers) is decoupled from the frontend (such as Bevy).

Keymap

Mouse

Key Action
Click Left on player reachable area Move the character to this position
Click Left on a crate Show the pushable area of the crate
Click Left on crate pushable area Push the selected crate to this position
Hold Right and drag Adjust viewport
Click Button 4 Undo the last push
Click Button 5 Redo the last push
Scroll Middle Zoom in/out

Keyboard

Key Action
W/A/S/D Move the character
Arrow keys Move the character
[/] Switch to the previous/next level
Ctrl + [/Ctrl + ] Switch to the previous/next unsolved level
Ctrl + Z Undo the last push
Ctrl + Shift + Z Redo the last push
Esc Reset current level
-/= Zoom in/out
Ctrl + V Import levels from clipboard
Ctrl + C Export level to clipboard
P Toggle automatic solution
I Toggle instant move1
F11 Toggle fullscreen

Keyboard (Vim)

Key Action
H/J/K/L Move the character
U Undo the last push
Ctrl + R Redo the last push

Controller

Key Action
D-Pad Move the character
LB/RB Switch to the previous/next level
B/Circle Undo the last push
A/Cross Redo the last push
LT/RT Zoom in/out
Right stick Adjust viewport
X/Square Toggle instant move1
Y/Triangle Toggle automatic solution

Footnotes

  1. Turn off character and crates movement animations. 2