# SUDOKU PUZZLE TUTORIAL!

### Create a fully playable sudoku puzzle.

Firstly, why I am writing this tutorial is that I suddenly had an idea of creating a game sudoku puzzle, and it works! What you have to do is to make numbers so that every number, no matter what you do, can add up to a certain number every way, even diagonally. Let's get off to the bare bones.

First, you need nine variables. Call them:
1st Variable: sudoku #1
2nd Variable: sudoku #2
3rd Variable: sudoku #3
4th Variable: sudoki #4
5th Variable: sudoku #5
6th Variable: sudoku #6
7th Variable: sudoku #7
8th Variable: sudoku #8
9th Variable: sudoki #9

Then, import a series of Number charsets into RM2k/3. Ask DFalcon for his if you want. Then, import some kind of grid or chipset that creates a grid. Here are the squares:

1 2 3
4 5 6
7 8 9

They are fit to their corrisponding variable. Next, create an event in the 1 square. Make it 10 pages. On the first page, select the "Set.." on the character graphic, and go through the Left, Right, Down, and Up, and the Left, Middle, Right, until you find a number 0. Select OK, and choose the Fixed Graphic action on the animation type, and then, set the condition to variable, select Sudoku #1, and set it to Equal 0. Do the same on the next page, select "Set.." go to a number 1 graphic, set the Variable Condition and choose it to Equal 1, and so on until you finish all pages. Create another event in the 2nd square, and do the same, but select Variable Sudoku #2 this time. And so on. Make sure to include that all of them are the event layer Below hero. After all pages are finished, create one new page in all of them, and create a Input number to the corrisponding variable on the grid. Make it 1 digit, to the corrisponding variable. Leave the conditions blank, and change the graphic to *Tileset1, the first chip. Make it below hero. Copy that command and then paste it onto all of the empty pages with the number graphics, but choose the right variable. After you have done all that, it's time to start programming the controler event.

Around the grid, create Action Key events that are all on the Same Layer as Hero event layer, and make the conditions switch: ****: Sudoku Begin . So that way, the hero cannot move out of the sudoku grid.

This is the controling event. Set it to parallel process, and make three pages.
Create a Touched By Hero event somewhere on the map that teleports the hero in the middle of the Sudoku grid, and then, turns the switch ****: Sudoku Begin ON. On the first blank page within the controling event, set it to switch ****: Sudoku Begin, and in the commands, set three of the variables Sudoku #1 - Sudoku #9, and set it to any number. Set the event start condition of this page to Auto Start. At the end of those Variable Operations, create a switch called ****: CharNum. Then, do a Switch Operations that turns that switch on at the end of those variable operations. Now, set the next page to Parallel Process with ****: CharNum as start condition, and inside the page, start with a Branch if Var: Sudoku #N a certain number and leave it on Else Handler. Then, create a new branch if var Sudoku #N is a certain number, until you get all of them in. Those do NOT have else handlers, and must be inside of each other like this:

@> Branch if Var: ****: Sudoku #N is 1
@> Branch If Var
@> Branch if Var
@> Branch if Var
@> Branch if Var
@> Branch if Var
@> Branch if Var
@> Branch if Var
@> Branch if Var
Switch Operations: SudokuBegin OFF
Switch Operations: sudoku1Complete ON

: Else Handler
@>

On the third blank page, create a page totally blank with Sudoku1Complete as starting switch, Event Start Condition Auto Start, and message: Puzzle Complete! or something like that. Insert some kind of prize reward... etc. Then, create a new switch called ****: Donewithpuzzle1 and then turn it ON after the message. On the last page, set the starting conditions to Switch ****: Donewithpuzzle1 and set it to all blank and Event Start Condition as Action Key.

There! You have finished a Sudoku tutorial. If you have any problems running this thing, please email me and I will fix it. I have one of these randomized sudoku things on my desktop, but otherwise, it's just boring.

***Edit:
If forgot include something. On the number grid:

1 2 3
4 5 6
7 8 9

Add up all of the variables in each direction and see of their correct BEFORE doing the Branch Conditions. That's all!

## Posts

Pages: 1
Sorry for the mispellings. I was doing this fairly fast.
Well, this is different. It certainly beats switch puzzles, at least!
Pages: 1