Note: This only works in forge at this time, not sure why yet but something with Targets does not work in custom games. FORGE ONLY!
Note: The script is set to find a valid puzzle, but this could take some time. Times range from as little as 10 seconds to as long as 20 minutes. If you want you can restart the map after a few minutes, but restarting does not matter much. Again, FORGE ONLY!
Randomly Generated Sudoku,
The job is simple, all we have to do is make a script that generates 1 of 6,670,903,752,021,072,936,960 (6.6 sextillion) valid 9-by-9 sudoku puzzles. From the start of the project I knew I wanted to make this a Randomly Generated Sudoku map, pre-selected numbers would have been too easy. So….
Difficulty (Easy to Evil)
Level of Difficulty from left(L) to right(R) and Numbers Given
(L)Very Easy................50
Easy...........................41
Medium......................34
Hard...........................28
(R)Evil..........................22
Generating Algorithm
A few Basic points, this is a Randomizing globally Sequence.
The Main script doing all the work is a basic “For Loop”,
Basic Example
for (int i = 1; i < 1; i++)
More Like
for (int a = 9; a >= 1; a--)
This system may take some time to generate a valid puzzle, the times can be 10 seconds to 20 minutes.
The scripts being used currently are very unorganized, and I don't plan on cleaning them up if the map does not work custom games.
If you could see the system being built
Checking
At this current time there is no system to check if you have finished the puzzle and or did the puzzle right. I have had a working system at one point but it was creating lag with the “Number Input”. I don’t see myself taking the time to add working ver any time soon.
The number Input system from above is simple but a bit all over the place, so I'm just not going to talk about it right now.
Problem Analysis
This is something that would take like hour or so in java to build, but we are in halo, so…..
Other Notes: The Targets do not disappear, by switching from Human > Forge Monitor > Hunan the targets will disappear.
- Forge is Slow! (Slowing task down so forge does not crash)
- Forge has a 512 Script Budget! (FML)
- There is no input system in forge. The decals 0-9 are not numbers, they're just objects that we see as numbers. Basic input systems that have been used in other maps would cost 700-800 scripts. (Did it in 10 Scripts, GG)
- Part of forge, Labels may only talk to 64 objects at a time. basic sudoku grid has 81 cells.
- Issues with Targets is its own thing. (This required scripts to be in a perfect order, or it will not work at all.)
- Basic Coding things that Halo does not have, If Then, Else, For loops, Arrays, ETC…(Made up a simple “For Loop”)
- The map not working in Custom Games
- Finding Time, I'm addicted to Rainbow Six Siege
- And lot of other small bs that comes with forge
Shoutout to "A Squid Loaf" for helping me with forge bs and bouncing ideas off of.