Ooops
March 05, 2021, 07:08:19 PM

Author Topic: Sudoku with Images Christmas 2020 Edition (QB64)  (Read 404 times)

Offline bplus

Sudoku with Images Christmas 2020 Edition (QB64)
« on: December 21, 2020, 05:18:19 PM »
Merry Christmas all!

I'd like to share my favorite program this year with you, Sudoku with Images. This is a Christmas version I made with Christmas images (License - non commercial use only). But you can insert any group of nine images titled d1-d9.png to play. For best results use simple images with no backgrounds, here is a Sudoku  Around the World version snapshot I just made yesterday, it has an added level of difficulty because backgrounds make the 3x3 blocks harder to distinguish.

The compiled exe is for Windows but QB64 is cross platform, source code is included to compile for Linux or Mac but I don't guarantee results.

Help screen at start also used for choosing levels and txt file comes with tiny bit more info as I get feedback from users.

I just checked download and it seems to be working with all files present. :)




Offline Derron

Re: Sudoku with Images Christmas 2020 Edition (QB64)
« Reply #1 on: December 21, 2020, 07:14:27 PM »
Hehe ... I made an "image sudoku" many years ago:


https://www.gamezworld.de/showentry.php?ID=1203&lang=e

Written in BlitzMax - but somewhen lost the source code.


My game also featured some "shuffling" -- it just replaced images for "number a" with "number b" (so puzzle was the same but your "mind" was disturbed a little bit). Maybe this is a useful idea for yours too?


bye
Ron

Offline bplus

Re: Sudoku with Images Christmas 2020 Edition (QB64)
« Reply #2 on: December 21, 2020, 08:07:31 PM »
@Derron Oh yeah! Nice background and grid and buttons and...  ha, ha!

Hmm... disturbing the mind? alittle, ... ;-)) maybe after COVID is in the center of the news.

Oh but maybe some snow for the skiers and snow-people builders.

Offline bplus

Re: Sudoku with Images Christmas 2020 Edition (QB64)
« Reply #3 on: December 24, 2020, 03:22:44 PM »
@Derron

You know I've been wondering if your Sudoku version employed a method of "Notes" making. I'm not seeing it in the screen shot. If you don't have a method of notes making all those lovely graphics are just icing but no cake. ;-))

I can't see how any advanced puzzle could be solved without the help of notes.

What are notes? They are little notations in the cells you make when you've narrowed down the places a digit, number or image could go to 2 or 3 in a row inside a 3x3 cell block.

If my version has a feature that would be it (Plus it's in English hahaha! and the source code still exists so still open to mods as feedback comes in from users).
The ability to Right Click in tiny notes 1/9th the size of full cell image. And they toggle in or out, the first Right Click inserts a note of current image being highlighted into the clicked cell and a 2nd click would remove it. (Whereas Left clicks insert the highlighted image full sized into the cell as a guess and step towards solving the puzzle which every Sudoku app must have.)

Oh yeah, another feature I've already mentioned, the ability to use any 9 images you choose. Just name them d1 thru d9.png. Ha! now I feel like a salesman, but a crafty one figuring out how to make a more lovely graphics display of grid. :)

Offline Derron

Re: Sudoku with Images Christmas 2020 Edition (QB64)
« Reply #4 on: December 25, 2020, 09:40:21 AM »
I know that people exist who do notes on sudokus ... I never really did. I also never really did "strike" numbers no longer needed. Saw this by my wife or my father in law.

I dunno how you generate your sudokus. There are multiple ways. I did by generating a full board - which follows the rules (so 1-9 in horizontal, vertical - and within the "group blocks"). Then I remove cells according to the difficulty setting.
Each time I removed a cell the engine tries to solve the sudoku - if more than 1 solution is to found, the cell cannot be removed.
Continue until the desired difficulty level is reached.


Why did I describe it to you? Because this means the sudoku I create are "simple" ones - which are solveable by just going through all cells and checking "what fits" there (there is ALWAYS at least one cell which is only allowing the one and only fitting number). There is no "think ahead 2 steps" cell ("if I put X there, then only Y would fit to the other cell - and so Z must be used in this cell on the top").

And so you normally can solve it in your head, without having to take notes :).



And now without excuses .... when I created it I was a bit in a hurry (did it for christmas for my now-wife) and did not find enough time to add note taking :)

bye
Ron

Offline bplus

Re: Sudoku with Images Christmas 2020 Edition (QB64)
« Reply #5 on: December 25, 2020, 02:13:47 PM »
Oh yeah! making sure the puzzle has unique solution is very important and also that it is solvable after removing so many clues which is also when multiple solutions come into play. Yeah that was a little tricky and my level 7 and 8 sometimes take a while to generate. Level 7 and 8 will sometimes end up level 6 in number of clue counts if no puzzle could be generated after so many tries.

Quote
And so you normally can solve it in your head, without having to take notes :).

Well I confess I've not even tried. It took some time for my puzzle solving skills to catch up to the advanced puzzles this code was generating to be able to check if puzzles are unique and remain solvable by hand or by human human creator. I have run into puzzles I can't solve (less and less often) but none with more than 1 solution. Doesn't mean it can't happen but efforts made to avoid that situation, like solving puzzle from different starting points and checking solutions are the same.

So something new to do with Sudokus this new year! :)

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal