From Idea to Reality
There's a lot going on with my idea, and I kept coming up with more ideas; so I quickly opened up a new Unity project and just began working.
I didn't really want to spend money on assets, so before diving into any code, I spent a small amount of time in Blender modelling the mahjong
tiles and drawing the textures for them. Once imported into Unity, I added the material and visual effects that I wanted to use; I took a lot
of inspiration from 51 Clubhouse Games for the Nintendo Switch, which has a mahjong solitaire game mode. Once I had the "main" game object
ready to go, I started working on coding the game.
"Matching tiles, how hard can that be?" I thought. But the logic behind the game was a lot more complex and difficult to program than
I had originally thought. There are some rules to mahjong solitaire pertaining to what tiles can be matched, and tiles that are available
change as the game goes on. Writing code for the yaku was even harder; with so many possible hands, there was no way I could write an
if statement for all possibilities. I decided to try and write down all possible hands and determining any similarities between them, so as to
consolidate the logic for determining the correct hand. The logic for the joker tiles was definitely the easiest to write; they add unique
modifiers to the game, so I made a base abstract class that all other jokers could inherit and implement their own modifier. As for debugging,
there was a lot of back and forth between me and my friends who helped me, and I really enjoyed our live debugging sessions, where
my friends would share their screens and identify bugs and I would fix them on the spot.
Once I had the logic down, I was able to work more on the other aspects of the game, such as scoring, earning money, showing different layouts,
etc.; as well as the aesthetics and UI. I designed all of the UI using Figma, and I took a lot of inspiration from Persona 5;
I've always loved the unique aesthetic of the game and wanted to allude to that look in my own game, but I also had recently saw the UI from
Valve's new game Deadlock, and some of those UI elements influenced my design. Lastly, I drew all of the game art myself, with the exception of
the tile back designs.