
Board Game
I made a board game with Unity program, and it was whole new programming experience. I had to use several different aspects of programming to make this board game. First, I started out with a plane and imported the dice object for my comfort. Then, I created several game objects as game pieces, game tiles, and more. I had to create several empty objects to set the position for the board game. First, to set the position of the each position of the game panel, I had to use a code called arrays to store the data of the numbers of positions for the board game. By using the array code, I was able to use them to move the game pieces. For the dice, I created a random generator to choose the number between 1 to 6, and according to the random number, I made the code to let dice to change its rotation to its corresponding number. Later on, I created an animation object and put it in the dice to run the animation to make the action of rolling the dice. To move the game pieces, I used the code called Instantiate to move the gameobject to the corresponding position according to the random number. I moved the game pieces into the prefab, so instead of moving one piece for the game, the game is creating another piece of prefab to the position every time the roll happens. I had to create different integers and floats to control the max roll number, temporary movement, animation time, and more to control the board. Lastly, I created a code to bring out the result screen such as "Player 1 wins." For this I created two different scenes each representing each player's victory. When the game is finished, the code will detect who won, and by the result, it will load either player 1's victory scene or player 2's victory screen. In addition, I created two buttons, which one is a button that plays the game again, and one is an exit button.