Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I Made a Sudoku Game (sudoku-aj.netlify.app)
40 points by alabhyajindal 9 months ago | hide | past | favorite | 33 comments



Unfortunately this doesn't feel good enough to even justify playing a full game.

- The puzzles it's serving don't look very interesting or well-constructed. Are they randomly generated or from some existing puzzle DB?

- I'd really like to navigate the grid with arrow keys, not just by pointing and clicking.

- The app doesn't allow changing an already entered number, only undoing it.

- There's no support for pencilmarks that I can see. That's an absolute requirement for a digital Sudoku implementation.

- The app doesn't allow selecting multiple squares (for modifying all of them at once, or just for visualization).

Sorry if this sounds harsh, but the problem is that by making a Sudoku app you're setting up a comparison to all the existing ones. Apps like SudokuPad have amazing ergonomics, a ton of features, and a seemingly endless number of expertly crafted puzzles. It's not a comparison you can do well at. Picking a different type of puzzle with less competition might work out better.


The sudoku logic is very simple: https://github.com/alabhyajindal/sudoku/blob/main/index.html...

An empty grid is randomly filled in till it's solved, then a fixed number of cells are randomly cleared. Thus it's very possible to create an ambiguous solution.

However I don't grade it against every sudoku app in history, I grade it against other handcrafted index.html sites. And on that metric I think it's pretty good.

Lots of room to extend functionality of course, but it seems like a project whose value was in the making, not the having.


My first game had an ambiguous solution not resolvable with logic. It was one of these deals:

    a.b
    ...
    b.a
On the plus side, I like that it highlights the current number. For a mature exploration of this idea with many more features, look at https://www.sudokuslam.com/ for ideas. I've been playing that one for many years.


I will improve the puzzle generation function so there's only one possible answer. Thanks for sharing Sudoku Slam, looks great! Especially the "auto-fill in obvious numbers".


Yes autofill, which feels like cheating, along with automatically filling in marks. What this does, though, is let you focus on only the hard decisions and the auto does everything else for you.


Thank you!

Yes, I made the game because I enjoy playing Sudoku and wanted to implement one myself, just for fun!


All your points are valid, except that I'm not trying to compete with other online sudoku games. I enjoy playing sudoku and wanted to make one for fun.

Based on everyone's feedback it seems that keyboard navigation, overwriting incorrect answers and better puzzle generation are the top missing requirements, which I'll add next.

Thanks for your feedback!


For what it’s worth, it’s a really nice experience on an iPhone where you can use touch.


It seems I got an ambiguous sudoku puzzle. https://i.imgur.com/AUiLP7J.png

I read somewhere that sudoku puzzles should always only have one solution or they don't count as "real" sudoku puzzles.


I had one with at least two solutions as well and one of them was classified as invalid, though it should have worked.


That's unfortunate. I am looking into this.


Thanks for pointing this out, I didn't know about this. I will look into improving the puzzle generation function.


It is now harder than it was this morning (UK time). That's a shame. As someone with little idea what to do to solve it it was just perfect. Now I am at sea. Many of the comments here are from people who do Sudoku and probably won't use your site. With me you had a sector. That might be worth considering.

Also you really should store the puzzle in application storage (eg local storage) so it is persistent over page refresh, and have a "new puzzle" button.


Do you mean the generated puzzles are now harder? Because I haven't changed that at all. You can verify it here: https://github.com/alabhyajindal/sudoku/commits/main/index.h...

I am making changes based on everyone's feedback here. The game is for fun and not meant to be the best Sudoku game online.

I understand that storing the puzzle is useful. I might implement it at a later time. For now, I would recommend you to refresh the page in case you get stuck on a puzzle.

Thanks for your feedback!


> Because I haven't changed that at al

My apologies. It seemed that way.


I entered an incorrect number and it won't let me change it??


I realize that overwriting an incorrect number is the better UX than undo. I will look into this. Thanks for playing!


Press undo button at top


Aha - guess I didn't see that!! I spent about 5 mins trying everything to change a red 6 I had mistakenly typed instead of a the 5 I had intended.


This is fixed. You can now update a previously entered value. Thanks for the feedback!


The keyboard input is not being activated. I tried adding it to home (as a PWA, but didn’t see a difference.)

I’d love to play it regularly, could you give me a heads up when you fix the keyboard issue? Thanks for sharing!


Keyboard navigation has been added. You can use arrow keys or vim bindings to navigate the grid. Thanks for playing!


That's fun. Creating the puzzles must be quite complex.


I hate it when it tell you a mistake was made. Part of the challenge is figure out where you made the mistake or start over


This is a nice clean start. For inspiration, check out https://app.crackingthecryptic.com/94Qq6qGjh2 for the next set of features you could add. Important ones are the ability to make "pencil marks"


Thanks for sharing! I'll check it out.


Thanks, 2:51. Very clean UI for mobile. I'll bookmark and do a puzzle every morning with my wordles.


Nice. Always like a game of Sudoku. Did it in 6:10.


Love it! 07:43 :-)


Thanks for playing!


Really enjoyed it! 6:20 oo


Nice! 5:28


super cool, 5:51




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: