Sokoban

Rating: 
4.714285
Your rating: None Average: 4.7 (7 votes)

This is a Sokoban game entirely written in QML + Javascript.

The purpose of the game is to move the diamonds to the green spots by letting the warehouse keeper push against the diamonds. You move the warehouse keeper using the arrow keys or by clicking/touching the screen.

I u want to supprot me, or thanks in other way than saying it, consider donation ;)

Copyrights:
Copyright (C) 1998-1999 Anders Widell - original game and graphics
Copyright (C) 2010, 2011 Glad Deschrijver - port to qml
Copyright (C) 2018 Wiktor Strzębała <wiktorek140@tlen.pl> - port to SailfishOS

Category:

Application versions: 
Changelog: 

version 1.0-1 (2018-08-16):
- port to SailfishOS
- update QtQuick to 2.0
version 0.7 (2011-12-16):
- add panel to select level collections (the list of collections is hardcoded)
version 0.6 (2011-01-19):
- fix bug: the floor items could be disconnected during rotation and the
  objects and man didn't zoom until after the board was rotated
- make C++ wrapper so that a standalone executable can be produced
- make all buttons always available by putting them in draggable environments
- try not to hardcode font sizes
- the board can now be dragged
version 0.5 (2010-12-20):
- add menu with about box
- add zooming of the game view
- major rewrite of the code
- when changing a level, the opacity of the board items is set to 0 before
  destroying them
version 0.4.1 (2010-11-24):
- fix bug: numOfGoals was not increased when during initializing of a level
  the man is positioned on a goal
- fix bug: the texts in the game view didn't wrap when they are too large
- fix bug: clicking the buttons when the message in the game view is displayed
  didn't work
- fix bug: the number of blocks on a goal was incorrectly calculated when
  during undo a block moves to a goal on which the man was previously located
version 0.4 (2010-11-17):
- clicking on the intro text or "Level won" text switches to the next level
- another attempt to make the board resize when the orientation changes
- add French translation
version 0.3 (2010-11-16):
- add support for moving the man by clicking the new place for the man
  (only horizontal or vertical moves are possible)
- rescale the board when the orientation changes
- add undo support (by pressing Ctrl+Z)
version 0.2 (2010-11-11):
- rewrite Man and Object moving code
- add animations
- show correct level number at any moment during the game (also when the "Level won" message appears)
- nicer borders (similar but simpler as in ksokoban)
- center the playing field in the window

Comments

olf's picture

@wiktorek140, thank you so much for providing this Sokoban (ex-QML Sokoban, ex-ex-KSokoban) for SailfishOS.

As you asked for comments:

  • It is "hard to position the little guy" (as @rob_k and @Maximilian1st already mentioned), because one has to "tap without moving", otherwise the tapping is interpreted as a drag action.
    While the suggestion of @Maximilian1st to use two finger gestures for dragging (and maybe pinching / scaling, too) would work, it might be easier to implement a threshold of 1 (or ½) grid space (or a couple of pixels): Drag actions with distances below the threshold would be interpreted as taps.
  • I am unable to successfully select a different "Level collection" than the default one.
  • The thin, black grid lines are sometimes invisible (statically), rsp. always "dancing" while dragging the playing field (dynamically). As this is well visible on a Jolla 1 (960x540 screen resolution) and an Xperia X (1920x1080 screen resolution), these grid lines seem to be a single pixel (or less) in width on any device, causing these aliasing effects. This might be resolved by making them two pixels wide (or at least 1,5 px logically) or aligning the playing field (including the 1 px grid lines) to the physical pixels of the display.
  • The freshly enlarged bottom menu bar provides much better usability in landscape orientation, but is much too wide on a Jolla 1 phone in portrait orientation (540 px width). If it could be made wrapping around (hence using two lines, if horizontal space is insufficient), it would work on screens with less than ~ 1000 px width, while retaining the current button sizes.

P.S. (edit):
Three more minor issues:

  • The changelog entries for v0.1.1-0 and v0.1.1-2 are missing.
    As the only user visible change I experience is the altered button bar, I am curious what else changed.
  • A source code repository (e.g. at Github, including an issue tracker) would make the handling of such comments/ issues much easier for you (as the maintainer) and contributors (of bug reports or code).
    Its Readme.md may also provide links to the original source code (KSkoban by Anders Willers up to v0.3.0, 1999-07-14) and the original QML port (QML Sokoban by Glad Deschrijver up to v0.7, 2011-12-16), which your work is based upon.
    BTW, also a KDE 4 port (up to v0.5.0, 2012-07-25, with version numbers overlapping those of QML Sokoban) of the original KSokoban, plus an older port to QML2 and a port to BB-OS 10 (with a similar programming environment as SailfishOS) of QML Sokoban exist (all seemingly unrelated), but the latter two were not maintained for long (still may provide some ideas).
  • The name Sokoban is identical to the extant Sokoban (by BlueMagma, of 2015) in the Jolla Store. This does not prevent both apps to be running well, but may create confusion and prevents this Sokoban from ever being successfully submitted to the Jolla Store. Spontaneous suggestion: What about Sokoban-QML2?
Maximilian1st's picture

Very nice game, good work. Could the moving of the map be done with two fingers instead of one. The map moves when I want to position the guy...

rob_k's picture

Buttons are great now. Unfortunately it is very hard to position the little guy to the next field somehow. Playing on SailfishX, Xperia X, 1080 x1920 pixels. Playing landscape. I'll try to upload screenshot later.

rob_k's picture

Reaching higher levels, I need larger buttons. "Undo" most obviously :)

wiktorek140's picture

You can alway try play in landscape mode. When i find a while i will redesign buttons on botton.

I consider made it larger or scaled up. but u need to test it and give feedback what i looks like on your device

pdelfes's picture

More crap coming to the SailfFail OS. Cool.

wiktorek140's picture

if u think its crap simply don't use it, or if you are great developer build an awesome game that nobody can tell its crap.

pdelfes's picture

Ok. Thank you dear.

rob_k's picture

Man, 30 years ago I got hooked on this game, and now it's happening all over again! (Great port, thanks)

cvp's picture

cool Game, thank you :)