Simple Sudoku minigame

Game_2024-01-19_18-05-15.png


This plugin, as you might have guessed, adds a simple Sudoku minigame. You can use a specific puzzle, or use the included generator (courtesy of Mucahidyazar) to create them dynamically with a given difficulty.

To be honest, I'm not entirely sure what else to say about it. The digits can be selected from a keypad-style menu, or entered directly with the number keys. You can customise all the colours, set a background image, remove the default window, or change the size of the puzzle (in pixels, not cells). It should also adapt reasonably well to any changes you've made to windows in your game.

Whether the player solved the puzzle or gave up, as well as time spent in the puzzle, are written to a switch and variables of your choice.

There's a global object MAC_SimpleSudoku with a bunch of functions to interface with the plugin programmatically if you want to. Notably, if you generate a puzzle that you enjoyed and would like to include that specific one in your game, you can type MAC_SimpleSudoku.getPuzzle() in console to get it as a string you can use for the plugin command.


Big shoutout to Mucahidyazar for creating an MIT-licenced sudoku generator that's used in this plugin. It was surprisingly difficult to find one that actually created proper puzzles with unique solutions (and didn't just claim to), and my sanity might have taken some damage if I didn't find his work. Check it out here.
I didn't make a lot of changes to it - mostly getting rid of the node-related stuff to make it all work as a single JavaScript file, fixing one small bug and cleaning up the error messages. So if you'd like to make your own interface and just want the generator, you should be able to just grab it from this plugin and use it in yours without issues.

This plugin is available under the MIT Licence. You're free to use it in any games, commercial or not, or use the code in your own plugins. Credit is appreciated, but not required. If including credits, please remember to also credit Mucahidyazar for making the puzzle generator!


The interface for this plugin was surprisingly simple to make, and I could probably make one for other grid deduction puzzles without too much trouble now. Let me know if there are any specific ones you'd like to see!
Very cool and thanks for making and sharing this!

It will give me something to delve into to see if I understand what is going on.

Don’t be surprised if you see a Game In Development thread soon for the Sudoku game I am working on. I want to see how far I can get before looking at the more efficient way to do it!

Thanks again!
eventing is 1 part if you make seperate cells and checks, but this is
even nicer, usefull for personal to get a sudoku on your own instead
of using paper sudoku =)

I like tectonic as well as I'm pretty much good with numbers.

I might try this one out though, nice job on making this one =)
It will give me something to delve into to see if I understand what is going on.
Feel free to ask if you have any questions about it. The code might be a bit difficult to parse, given how much layout-related stuff there is. Functions that might be of interest to you are probably checkForConflicts and checkForVictory, since they handle all of the sudoku-related logic.
Thanks! I might need something because my Event is randomly experiencing a problem with drastic slow down. But it is random. I am trying to figure out what might be causing it. I will take some time to experiment with this plugin too.

Although I use MZ so not sure if this works for both MV and MZ.
not sure if this works for both MV and MZ.
Well, the plugin command to start the puzzle definitely wouldn't work with MZ out of the box, but it might work with Fossil.
Very cool - I have been looking through Sudoku.js and a few other generators that are out there already - glad to see it work for MV. I'll check it out! Maybe I'll customize it or just work through the original node-sudoku for learning purposes.

Thanks!
Thanks a lot for the plugin. I would love to use it on my MZ project. However, it looks like there a compatbility issue with vustella core engine. Do you have anny idea why?

thanks
Thanks a lot for the plugin. I would love to use it on my MZ project. However, it looks like there a compatbility issue with vustella core engine. Do you have anny idea why?

thanks
Unfortunately I don't, and with VS plugins being the way they are it'd be quite hard to diagnose this. Plus me not having MZ definitely doesn't help.

Original thread: https://forums.rpgmakerweb.com/threads/simple-sudoku-minigame.164942/