Sudoku with Images Christmas 2020 Edition (QB64)

Started by bplus, December 21, 2020, 17:18:19

Previous topic - Next topic

bplus

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. :)



1 person likes this

Derron

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

bplus

@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.
1 person likes this

bplus

#3
@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. :)
1 person likes this

Derron

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

bplus

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.

QuoteAnd 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! :)
1 person likes this