Game Title Page
Dough it Urself is an innovative puzzle game inspired by the GMTK 2025 theme "loop".
While I originally came up with the concept of the game, my teammates collaboratively designed all levels and refined game mechanics. I worked as a programmer and composer and made the gameplay prototype, some level buildings, and the theme music for this game.
The game is collaboratively done by me, Ruimeng Bai, Enrui Luo, Kexin Liu, Xinran Wei, Hefei Sun.
I started prototyping the game as soon as we settled the basic concept of this game. The very first version of the game was built using simple geometric shapes, each representing a different game piece.
Using raycasts, I was able to easily detect the exact tile on which the player's cursor is currently hovering and exclude the obstacles on which no game pieces should be placed.
We confirmed the playability and feasibility of our idea using my prototype, and could thus work more on designing the game.
The win check was one of the difficulties we faced when making the game.
As we have designed, a legal "donut" is a closed loop of a uniform 1 width, and at least 1 empty tile must be enveloped by such a loop.
To convert this into a solvable programming problem, I concluded that, within such a legal shape, each piece (dough block) must have exactly 2 adjacent blocks. This ensures that the shape would have a uniform width of 1 unit, and it prevents two blocks from connecting diagonally. (see legality check)
Legality Check
Tile Check
This, however, does not ensure that the shape envelops at least 1 empty tile. To solve this issue, I randomly pick one dough block as the origin, and send a ray to every other dough block. As long as the ray hits one empty tile, the shape is legal. (see tile check)
This would not cause any issue even if the hit empty tile is not enclosed by the loop, because we have previously checked that the blocks that make up the shape have and only have 2 adjacent blocks, where no solid convex shape would be identified as legal.
When selecting levels, the camera moves as the cursor is near both the left and right edges of the screen. This is achieved by constantly comparing the mouse's position and the threshold, which is computed by:
Threshold Position = Screen Width x Ratio
The camera movement is locked when the camera hits a "stopper", placed on both sides of the screen. This prevents the camera from moving too far.
The level selection button effect is made possible by changing material colors. To detect any possible clicking and hovering, we send out a ray to see if the cursor is hovering above a button. If it does, the material of that particular button is darkened to mimic a highlight effect. This is, in fact, how most of our buttons work in the game.
The level selection buttons are all connected to an individual level, which the player goes to when pressing the buttons.