Blockski+ , like Klotski but with a board editor.

Post

Posted
Rating:
#1 (In Topic #1183)
Banned
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
* Online score sharing so you can merge other peoples scoreboards.
* various other options


Still needs fully testing.

The editor has a bug or 2 still but the play window is pretty stable.

Snapshots…

The main window…
Image

The Board Editor…
Image

Note: the following link is the latest updated version. long after this initial post.
Bruce Steers / Blockski+ · GitLab

Last edit: by BruceSteers

Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
 Could you add some help? I haven't a clue what I am expected to do!
Online now: No Back to the top

Post

Posted
Rating:
#3
Banned

cogier said

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 <EMOJI seq="1f60e" tseq="1f60e">😎</EMOJI>
Online now: No Back to the top

Post

Posted
Rating:
#4
Banned
Everybody feel free to make some boards and send them to me <EMOJI seq="1f601" tseq="1f601">😁</EMOJI>
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 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

Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 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

Online now: No Back to the top

Post

Posted
Rating:
#7
Banned

thatbruce said

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 :)
Online now: No Back to the top

Post

Posted
Rating:
#8
Banned
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 :)
Online now: No Back to the top

Post

Posted
Rating:
#9
Banned
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 :(
Online now: No Back to the top

Post

Posted
Rating:
#10
Banned
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.

Bruce Steers / Blockski+ · GitLab

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)
Online now: No Back to the top

Post

Posted
Rating:
#11
Banned
 There's a glitch in movement I will sort out after work this evening.

Just a little bug i've noticed where a block can move diagonally 1 space but it shouldn't really because block corners are in the way.

Plus i just tried the new Medium 2 board and i think it's impossible to do :-\

EDIT:  i just fixed medium 2 board before going to work.
and added a check before saving a board that is not in edit mode and may have been moved around for testing.
Online now: No Back to the top

Post

Posted
Rating:
#12
Banned
 With v 0.0.10 I have fixed the diagonally moving where it shouldn't bug.

I have also improved movement (the direction getting stuck) it used to just NOT move a direction if the mouse was more than one block away. Now it tries to move 1 space in that direction not stay where it is so this has improved it a lot.

Todo:
* Removable walls (walls that can be destroyed somehow)
* To be able to select multiple blocks for copy/move/delete.
* Highscores
* And make many many new boards.
Online now: No Back to the top

Post

Posted
Rating:
#13
Banned
I'm advancing this to Beta now.
Archive is in the first post Blockski+ , like Klotski but with a board editor. - Gambas ONE

The editor still needs some upgrades but is pretty functional now.

Added thing like…
* New board button now opens a form to set path/dimensions instead of just an InputBox for name.
Image
* Reselect checkbox on block selector stops block selection toggle button deselecting so you can add multiple blocks by clicking board.

* Settings window, Change "Default background image" makes background for all boards that have no image set use this image.

* made a clone of the gnome Klotski Daisy board.
Image
* made a hard board.
Image

Enjoy :)

Last edit: by BruceSteers

Online now: No Back to the top

Post

Posted
Rating:
#14
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
Have a look at Boards>Hard>Hard 2. It's very easy!
Online now: No Back to the top

Post

Posted
Rating:
#15
Banned

cogier said

Have a look at Boards>Hard>Hard 2. It's very easy!

haha yes sorry the latest board was an unfinished half build :-/

How did you find Hard 1 ?

I'm just about to upload V1.0.1 as there's been some changes
havent played Hard 2 yet but i think it's okay for now

I have added a new board selector that previews the boards and generates a thumbnail image in ~/.config/Blockski+/ that makes it look much better.

I just have to add code to update the thumbnail when a board is edited/saved
(EDIT: I have done that now)

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#16
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
How did you find Hard 1 ?

Hard! :? . I haven't completed it. Will try again…..
Online now: No Back to the top

Post

Posted
Rating:
#17
Banned

cogier said

How did you find Hard 1 ?

Hard! :? . I haven't completed it. Will try again…..

Cool , then the game challenge is good :)

I can do it in 2:30
70 moves
Online now: No Back to the top

Post

Posted
Rating:
#18
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
I can't run the latest version 1.0.1.

<IMG src="https://www.cogier.com/gambas/Blockski1.png"> </IMG>
Online now: No Back to the top

Post

Posted
Rating:
#19
Banned

cogier said

I can't run the latest version 1.0.1.



Aah cherers , must be a new property .
 i've removed setting from the IDE designer and used code with Try to stop error on previous gambas versions.

V1.0.2

Last edit: by BruceSteers

Online now: No Back to the top

Post

Posted
Rating:
#20
Banned
Hard 2 is now hard ;) lol

219 moves  , nearly 5 minutes

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#21
Banned
I have added a few things and also removed some things and made it backward compatible tested with gambas 3.17.3

I added loads of tooltips and also a ShowTooltips option in the preferences

also an override for board showgrid settings so you can use the board settings or override to show or not show grid on all boards.


link in the first post Blockski+ , like Klotski but with a board editor. - Gambas ONE
Online now: No Back to the top

Post

Posted
Rating:
#22
Avatar
Guru
cogier is in the usergroup ‘Guru’
cogier is in the usergroup ‘GambOS Contributor’
I managed to do the hard one as provided by Version 1.0.5 on start up :D.
I was showing the wife how to play it then clicked on Boards and….

<IMG src="https://www.cogier.com/gambas/Blockski2.png"> </IMG>

I'm using Gambas 3.18.4
Online now: No Back to the top

Post

Posted
Rating:
#23
Banned

cogier said

I managed to do the hard one as provided by Version 1.0.5 on start up :D.
I was showing the wife how to play it then clicked on Boards and….



I'm using Gambas 3.18.4

Oops , appologies for that.
I think because i removed the old menu creation routines that initialized the board lists, it should be fixed now :)

Thanks for letting me know :)

Last edit: by BruceSteers

Online now: No Back to the top

Post

Posted
Rating:
#24
Banned
 Ever so sorry folks i found a bug that was not recording the moves on some blocks :-\

Fixed in 1.0.7
EDIT: actually it was not fixed, fixed in version 1.1.8

Am currently starting to add some kind of highscore system
Online now: No Back to the top

Post

Posted
Rating:
#25
Banned
 1.0.8 now does high scores

Each board has it's own highscore list

The number of remembered scores can be set

1.0.9 has a bugfix where the score settings (settings key made from the file paths) were different if run through the IDE or running the executable. so essentially 2 sets of scores depending on how run.  now it should show the same either way.
Online now: No Back to the top
1 guest and 0 members have just viewed this.