Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: Very Simple Tile-Sliding Puzzle
#1
Reply
#2
Tiles are switched via scrolling.  Nothing fancy, but I added a little bit of animation to the scrolling.

Next, make the code generic enough to handle various grid sizes.
Reply
#3
Nice one.  The animation added a lot.  Game is harder than I first thought it would be at first.

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#4
(07-15-2023, 01:50 AM)Dav Wrote: Nice one.  The animation added a lot.  Game is harder than I first thought it would be at first.

- Dav

Yes I found it completely disorienting since all puzzles I have seen put the empty hole at the bottom right corner of board. Thats how I trained myself with my versions. I could not solve a simple 3x3 and I swear the code screwed up the order of blocks to make it impossible to solve. But it does look like the puzzle was scrambling correctly by making random legal moves the standard way to safely scramble the puzzle.

Update: Oh Dah!! I got row and cols mixed up ie 2, 1 is column 2 row 1, no wonder I thought it was wrong. LOL
b = b + ...
Reply
#5
(07-14-2023, 04:53 AM)CharlieJV Wrote:

The program is a little bit more "polished" (as in behaviour, still simplistic otherwise) , and allows setting the puzzle to various sizes: 3 means 3X3, 4 means 4X4 ... you can choose any size between (inclusively) 2 and 8, although 2 is really just for quickly testing the behaviour of the program.

   
Reply
#6
Oh - NOW I get it!  The screen at the beginning made me understand.  Still a challenge though.  Nice work - I'll test it out more later today. 

Edit: At least I could solve a 2x2 grid, lol.

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#7
(07-15-2023, 06:10 PM)Dav Wrote: Oh - NOW I get it!  The screen at the beginning made me understand.  Still a challenge though.  Nice work - I'll test it out more later today. 

Edit: At least I could solve a 2x2 grid, lol.

- Dav

The beauty of this simple program: it helped me catch a strange little bug with my implementation of SLEEP (and SLEEP 0) to pause the program until user interaction (keyboard press or mouse-click/screen-touch.)
Reply




Users browsing this thread: 1 Guest(s)