Blockski+ , like Klotski but with a board editor.

So you have written that new, must have program. Let us see it here.
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

I present Blockski+

Much like the game Klotski

Move blocks around a board in order to get the Prize block to the Goal block in as few moves as possible.

I've made this because my girlfriend likes to play Klotski but the windows/python version she has does not play well on a laptop screen and she does not like the gnome version levels. so i made a version that she can make her own levels on :)
(should hopefully keep her quiet for a while ;) )

Current status: a working game with a number of boards and features.

Features... (edited for the more recent version)

Editor:
* Create and edit new boards.
* Create blocks, edit shapes.
* Use custom board pictures.
* Use custom block/wall images
* Set block colors
* Undo/Redo
* cut/copy/paste/delete

* Click away and see :)

Game:
* Adjust block size of the loaded board to make it fit screen/window
* Remember block size change on next load.
* Save high scores
* Make blocks multicolor

Also:
* Online updater
* change look of board
* set a preferred default block color
* various other options


Still beta and needs fully testing.

The editor is a bit buggy still but the play window is pretty stable.

Snapshots...

The main window...
Blockski.png
Blockski.png (442.14 KiB) Viewed 3643 times
The Board Editor...
BlockskiEdit.png
BlockskiEdit.png (556.99 KiB) Viewed 3688 times
Note: the following archive is updated to the latest version. long after this initial post.
Attachments
Blockski+-1.3.35.tar.gz
(661.03 KiB) Downloaded 32 times
If at first you don't succeed , try doing something differently.
BruceS
User avatar
cogier
Site Admin
Posts: 1127
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Blockski+ , like Klotski but with a board editor.

Post by cogier »

Could you add some help? I haven't a clue what I am expected to do!
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

cogier wrote: Monday 29th January 2024 3:07pm Could you add some help? I haven't a clue what I am expected to do!
Do you mean game play or board building?

Gameplay is simply slide blocks about to get the prize block (one with the star) to the goal block (grey one with star) in as few moves and as little time as possible.
Blocks can only move to free space and if the way is not blocked by other blocks.

Only the prize block can move through the ghost walls.

The editor is fairly self explanatory.
You can move, add, remove blocks.
You can set block size and shape.

Like I say it's very WIP at mo.
Consider them s a preview of the finished game that will have boards and docs 😎
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

Everybody feel free to make some boards and send them to me 😁
If at first you don't succeed , try doing something differently.
BruceS
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: Blockski+ , like Klotski but with a board editor.

Post by thatbruce »

The move counts in the winner popup are wrong.
The winner popup is strange when run with "current desktop". Its titlebar needs to be clicked to get it to fully show. Works fine on qt5.
Occasionally the blocks get stuck, frequently when the target clock is in the ghost wall, but also sometimes happens when moving a normal block. The only clue I can see is that it happens when they are next to or near a wall.
Haven't tried the builder yet.
b
Have you ever noticed that software is never advertised using the adjective "spreadable".
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: Blockski+ , like Klotski but with a board editor.

Post by thatbruce »

Thus far, this works much better under qt5.
The timer is w a y out! And I got an overflow in Board1_Win() at the DateDiff. I don't think the timer should start until the player tries to move the first tile. It was counting while I was adjusting the tile size.
I can't get the editor to save my new layout. But the game is started with it???
I appreciate that it is a WIP, just noting some things you may not have seen.
b
Have you ever noticed that software is never advertised using the adjective "spreadable".
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

thatbruce wrote: Tuesday 30th January 2024 6:14am Thus far, this works much better under qt5.
The timer is w a y out! And I got an overflow in Board1_Win() at the DateDiff. I don't think the timer should start until the player tries to move the first tile. It was counting while I was adjusting the tile size.
I can't get the editor to save my new layout. But the game is started with it???
I appreciate that it is a WIP, just noting some things you may not have seen.
b
Thank you Mr B all reports are welcome :)

I think there was a problem with the timer not being stopped when going from game to board editor.
It "should" start with the Board1_Started event and stop with the Board1_Win, i added some timer stopping code now so hopefully fixed most of those issues.
Also the Win event did not count the last move so fixed that.

I also now have added a Board.Frozen property that stops the board doing anything after a Win event until reloaded as you could still move blocks after a win and that would restart the timer..

And sorry yes there was a lack of code that refreshed the board menus/layout after saving a board so although it saved it did not show till closed/re-opened. have fixed that too :)

I also added a way in the editor to shift all board blocks up/down/left/right with ctrl-up, ctrl-down, etc

attached is v 0.0.3

Thanks again for trying/testing :)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

Regards the sticky block problem..

I'm working on it.
You are right Mr B it is when the mouse is being dragged over a wall.
The next update will have movement fixed :)
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

It's better but not perfect.

if the pointer moves too far away from the block the X or Y position will stick while the other moves.
It regains grip if you move closer to the block.

I may have to completely redo the mouse movement routine a different way to get this right :(
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1578
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Blockski+ , like Klotski but with a board editor.

Post by BruceSteers »

For anyone who is liking this project and wants to keep up with the changes I have made a gitlab repository that may be more up to date than what I have upload here.

https://gitlab.com/bsteers4/blockski

I just uploaded an update that now has copy/paste blocks in the editor and tiled paint mode now supports the configured shape as well as build mode. Plus a fix that now properly enables the delete button on the settings custom wall image list.

(I'll attach it to the first post anyway)

Just to briefly explain the paint modes..

Stretch will stretch the block image to fit the whole block rectangle (shapes are not possible with stretch mode only square/rectangle)

Tiled will paint the block image for each part of the block shape.

Build splits the image into 9 little squares (3x3) so there are 4 corner images, 4 side images and a center image then uses the parts to build the block shape.

Some modes will work better for different things.

Ie,
Tiled works better for walls as Build breaks up the brick pattern too much.
But tiled is no good for the default movable block as the image has a transparent margin so a 2x2 block will just look like 4 individual blocks! so Build is better.

Almost ready to wind down the coding and start making some boards now :)
Then will commeth the beta Version 1.0 :D

(goto first post for archive)
If at first you don't succeed , try doing something differently.
BruceS
Post Reply