Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sudoku - Proof of Concept
#1
It's been many years since I last posted any QB64 demos. I primarily use C++ as my go-to programming language nowadays, but I chose QB64 once more to create, what I thought would be a quick demo of a Sudoku game.

@Norby Droid was working on one in FreeBasic which inspired me to create one too. I needed a little mental break from my websites and other big projects, so I thought this game would be the perfect thing to do just that.

@Norby Droid added over 6,000 puzzles to his Sudoku game that are easy, medium, hard, and evil. He has shared those puzzles with me so I can add them to my project.

I'm currently working on the menu system. When that is done, I can work on the AI, which the user can step through.

Here's a current screenshot of the project

   

You can switch between AI and Manual modes with the <F4> key.

The font used is the same as the one on my three websites, the "SAIRA" font from Google Fonts.

The puzzle is dynamically sized according to the font size of the subcells. You can adjust the border size, the box separator size, and the cell separator size by changing the global variable values.

The text box on the right-hand side is the information box that provides info as needed.

The 50 bubbles in the background are animated and bounce around. The bubble is just a single PNG file I created from an Adobe Illustrator file I found online. The bubbles are randomly scaled by using the _MAPTRIANGLE command.

As you can see in the screenshot above, when the cell cursor is over a playable cell, there is a green outline around it. When the cell is unplayable, there is a yellow outline around it, as seen in the following screenshot.

   


Other features I need to add to the game after the menu system and AI are the puzzle selection menu and the save/load game.

When selecting the puzzle you want to play, the icons will show how much they have been played, as seen in the following screenshot.

   

The puzzle icons are scaled versions of the playable puzzles.

The grey subcells are unplayed, the yellow subcells are the possible playable values, and the red subcells are non-playable.

I will share the source code for the Sudoku game on my GitHub account when I get it done.
Reply
#2
I am a fan of the Sudoku game, looking forward to the release Smile
Reply
#3
(04-18-2024, 05:52 PM)Jack Wrote: I am a fan of the Sudoku game, looking forward to the release Smile

Why wait?

https://qb64phoenix.com/forum/showthread.php?tid=2307

find a christmas image version there as well!

tried and tested over 5 years now
b = b + ...
Reply
#4
Moved this to the "Works in Progress" forum.  The "Games" forum is for finished games, which someone could just download and grab a copy of and then compile, run, and play.  Feel free to repost this there once it's finished, but while it's still being worked on, let's keep it here and keep that forum for complete projects.  Smile
Reply
#5
thank you bplus Smile
Reply
#6
I've also created one in the past, but it is rough and ugly  Confused
I love coding logic (liked coding smart solver) and struggle with looks

[Image: image.png]

Really looking forward using yours....
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply
#7
My first models used an approach like Walter and mdijkens eliminating numbers available starting by listing all 9 in cell.

But after you play that system for awhile you learn "too many numbers ie too much information" when it comes to narrowing the cell down to only one or two, maximally 3 choices is best ie note the numbers yourself. I use right clicking for notes, if i click number again in notes, it is removed.

I suspect Walter more concerned with look of the thing than playing on master level, see all the yak about bubbles Smile
He is probably more likely designing an icon logo than testing the practical use of 9 numbers in cell.
b = b + ...
Reply
#8
For example here is my first round notes with a couple easy 5's filled in
   

missed a 3 solve in 4th cell
b = b + ...
Reply
#9
Further along see how 9 is solved for row 7 col 6
   
b = b + ...
Reply
#10
   
Kinda stuck here until see that 2 has to go in 9th cell bottom row, so 2 goes in 5 col, 7th row.
and 1 goes in 9th cell 7th row
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)