Project Type | Side Project |
Team Size | 1 |
Language | Unity C# |
Role | Game Programmer |
Introduction
Secret Triangle is the second game I made with Unity. Unlike I Just Want to Cook, which is operated with just the keyboard, this game uses a mouse as its primary controller. From this experience, I learned different ways to use Unity’s ray casting function. This game also uses a turn-base combat system. Using this system taught me about state machines.
Game Mechanic Implementation
The ray casting function plays a vital role in game development. In the game I Just Want to Cook, I used it for the function of picking up objects in front of a character. In this game, with rays emitted from the camera, the program can detect where the mouse is clicking on the floor and move in that direction. This showed me that many functions could be used in different ways.
Turn-Base Combat System
Turn-Base is an interesting combat system. It gives the player more time to think about how to defeat the enemy and allows the player to appreciate the character animation after deciding on an action. At first, I encountered many problems in getting this system to work. Simple if-else statements made the codebase unclean, inefficient, and hard to manage. So I searched for information and found the state machine design pattern. Everything became manageable once I applied it.