
Create a 2D sudoku game in Unity by building the buttons and canvas system, implementing multiple game modes, hints, and win screens, then replay or return to the menu.
Design a Unity 2D sudoku game by building a 9-by-9 grid, applying sudoku rules, and enabling input, hints, and difficulty levels through C# structures.
Set up Unity with the console visible at the bottom, keeping game and scene views in sync. Use a 2D canvas with aspect ratios like 6:9 or 9:16, then save.
Initialize a 2d int grid and a solved grid in a new C# script, then fill it with a nested for loop using a sudoku-inspired formula.
Develop a debug grid function to print 9x9 Sudoku board by looping the grid, converting numbers to strings, and building console output with no duplicates per row, column, or block.
Improve sudoku grid debugging by inserting pipe separators between blocks, using Sep and J modulo 3 to insert dividers, then test and prepare to mix the play field.
Create shuffle grid function referencing a 2D array grid, loop over the shuffle amount, generate two random values between 1 and 10, and swap cells via a debug grid call.
Create a function to swap two grid cells in a Sudoku 9x9 board by locating matching coordinates with four nested loops and exchanging their values.
Learn how to shuffle a sudoku 2d board in Unity by randomizing grid cells, debugging, and preserving no doubles across rows and columns.
Create and initialize a 9x9 riddle grid by copying the solved grid, then erase 35 cells at random with checks to avoid overwriting nonzero values, and debug the grid.
Create the sudoku playfield UI by configuring a grid layout group for a 3x3 cell grid, add a black background, and size cells to 112x112 with consistent padding.
Add and configure number buttons in a sudoku grid using a grid layout group, adjust cell size and spacing, duplicate components, and prep for automatic grid filling.
Develop and connect number buttons in sudoku by organizing scripts, linking board, and implementing a public setValues function that updates coordinates, value, identifier, and the button's text and interactable state.
Instantiate sudoku 2D buttons by connecting a1–a3, b1–b3, c1–c3 transforms to a button prefab, assign coordinates and values from the riddle grid, and parent to the board.
Attach created buttons to the corresponding red fields, mapping i and j to A, B, and C, and use setParent with local position to preserve layout.
Create a button prefab from the board, assign coordinate-based fields, and configure colors to distinguish selectable (blue) from disabled cells for a sudoku 2d board.
Build a sudoku input field in Unity by adding a UI image and a grid of buttons (1–9 and a blank), then activate and deactivate the field on button press.
Create a new C# script for the input field, implement a public static instance in awake, and deactivate at start while enabling activation to collect input from number buttons.
Connect each number button to the input panel and activate the panel on click, then receive the input value, update the corresponding button text, and deactivate the panel after input.
Apply a public set function to update the riddle grid at specific x and y coordinates with a value, then propagate changes to the board via board.set.
Create an enum of difficulties (debug, easy, medium, hard, insane), implement a set difficulty function using a switch, and adjust pieces to erase when building the riddle grid in Unity.
The win check feature enables a check button that compares the riddle grid to the solved grid across a 9x9 board, returning true or false and displaying debug messages.
Implement a Sudoku 2D hint system that highlights a chosen number when the hint button is pressed, limits hints with a max, and updates the board via public methods.
Finish implementing in-game hints for a Unity sudoku 2D game by wiring the hint button, updating the grid, coloring the hint, and configuring debug settings to control hints.
Create a Unity 2D sudoku menu scene with a canvas and buttons for easy, medium, hard, and insane modes, arranging the layout and anchors and wiring buttons to set mode.
Create a static settings class and a button script to set the difficulty via an enum, wire on-click events, and load the game scene from the menu in Unity.
Connect the menu to settings, read the difficulty from settings, and apply it to the board via typecasting. Validate easy and insane modes across scenes.
Remove all debug lines and print messages across the sudoku 2d project, refactoring references from initial, shuffle, and riddle grids, and set up clear console with win/try again interface.
Implement a win panel in Unity Sudoku 2D that appears when the board is solved, with play again and back to menu buttons, wired to scene management via button settings.
Learn to build and shuffle a sudoku 2d play field, preserve parity across rows, columns, and blocks, and implement a backtracking algorithm to complete the board.
Implement a column check for sudoku 2d game using backtracking, validating whether a value exists in a column by scanning the grid along the y axis and returning a boolean.
In row check for sudoku 2d tutorial, learn to search a row for a number, adapt axis handling, loop through y values, and return true or false for grid validation.
Implement a boolean block check for a Sudoku block in Unity, using x and y coordinates, modulo arithmetic, and grid traversal to verify block contents.
In this sudoku 2d tutorial, implement a check-all function that tests column, row, and block for a value in a 2d grid, returning true if placement is possible.
Loop through a 9x9 2D grid to ensure every cell is filled, returning false on any zero and true when complete, a crucial step for backtracking.
Fill grid base by populating the first row and column to support backtracking in a 2D Sudoku. Use lists of 1–9 to pick the grid[0,0] value and remove used numbers.
Learn how to implement a backtracking sudoku solver that finds the first empty cell from the top left to bottom right, validates and fills the grid, with debugging and iteration.
Create a dynamic possibilities list for each empty sudoku cell, using get all possibilities and check all to feed valid numbers into the backtracking solver.
Apply recursive backtracking to solve a 2d sudoku grid by enumerating possibilities, placing values at the first free cell, and backtracking to update the grid under sudoku constraints.
Update and create the riddle grid by copying from the solved grid to the riddle grid using System.Array.Copy for two-dimensional integer arrays, then zero out cells and debug.
Master the update start function in a Unity sudoku 2d game by wiring buttons, setting difficulty, enabling hints, and loading a new scene with easy to insane modes.
Explore ideas to differentiate a 2D sudoku game using strings, images, colors, or shapes in input fields; vary grid sizes 6x6 or 12x12 and modes via an enum with backtracking.
Wrap up the sudoku 2d tutorial by delivering the final video in the classic sudoku series, invite questions and commands, and encourage learners to share a course review.
In this Course you'll learn how to create a Sudoku in Unity Game Engine.
We create 2 different Conzepts. A Fill Mix Method and Recursive Backtracking Method. We create it as a 2D Game.
This course is a Beginner/Intermediate Course, so if you have trouble in any case, write me a message or Q&A, and i'll help as best as i can.
If you are beginner, you might have some trouble to follow, but the videos will guide you through the complete course. Don't forget you only become better if you repeat things and keep on learning!
So we create several Systems which will give us enough freedom to:
C# (Monodevelop)
create any type of Sudoku in general
create easy to super hard Sudoku Boards
create a Auto Solving System using Recursive Back Tracking later
create Inputs with Buttons to get a working Sudoku Game
Settings possibility for multiple Game Modes
Unity (2019.1.8f1)
create a Playfield of your liking
create Inputfield to give the Player Input possibilities
Create a simple Win GUI - You may want to create a not solved yet GUI as well
Hint and Check Buttons
creating a Menu and the Game Scene
Course Material
I provide no Material since it's not needed for the Course.
You have to write the code on your own, i do not provide the final scripts!
All other graphics for Menu's, Icons, Images or Buttons need to be created on your own.
All Materials i provide are for education only and should not be in your final release!
Conclusion
In the end of this course you will have a fully functional Sudoku 2D Game with multiple Game Modes.
Challenge
After you have created nice Menus, Buttons, and maybe additional content, upload the Game to any Gaming Website, Google Playstore, Apple Store or even Windows Store or Steam.
So what are you waiting for?
Let's make your dream game a reality!!
Level: Beginner / Intermediate
Video Course Length: ~4 hours
Unity Version required: 5.3+