TEERADEJ LO
CAPSTONE: GAME DEVELOPMENT
Game Story: This world is in the dream of a knight in which he will need to escape from things that he is scared of in each stage of life: pumpkin, dog, and bee.
GAMEPLAY
PRESENTATION
REFLECTION
My capstone project involves Designing and Building of Products. The topic I choose to do is developing a game. The engine I use on this project is Unity Engine. It is a popular engine that use C# programming language to code a game. It has a lot of function that make developing game easier. I have learned programming before; the language I used to learn is python which is quite easy to understand because of its syntax, its wording, and the order of how the code run. Learning C# is quite new for me because I don’t know anything about it at all. In learning how to code for my game, I start by finding a YouTube channel that teach C# from the most basic things.
YouTube contains a lot of video about Unity and C#. The first things I get to know about C# are class, struct, and inheritance which are the characteristics and place we used to write our command in C#. After a while, I think that I should focus more about the Unity itself instead of the C# language. I also don’t have any knowledge about Unity Engine so I decide to just play around with it first so I can understand its function and remember its interface. I first search about walking and jumping method in YouTube and one video teach me how to do it by using the RigidBody2d component. I follow his instruction and try to create double jump and wall jump by myself. One problem I see in my double jumping method is that the amount of jumps I can do each time are not equal. It keeps switching between 2 and 3 which I found out later that it was because sometime the game cannot catch up with what my character are doing. Therefore, the amount of jumps I can still do are not reduced even though I already jump once. I can’t really fix it myself and in the unity forum there are also many people who are facing this problem. I try to find others method rather than using RigidBody2d.
After a while, I decided to go watch video that teach about game developing from a channel name SebastianLague. He teaches about how to create 2d and 3d platformer games using Unity Engine via C# language. I already have it in my mind that I will create a 2d platformer game so I watch the playlist that contain all the video about it. His videos are very helpful. It starts from the basic of the movement of the character up until the physics, jumping, climbing a slope, moving platform, and camera following. His main function is the Raycasting. He uses Raycasting to detect the surrounding object and reduced the amount of the character movement to be the distance between the character and the object. Watching his video help me to have more understanding about the function in unity. The transform.Translate function will go through any obstacle that are in it way therefore we need to use it with the Raycasting to detect obstacle. The advantage of inheritance that make every others object containing just only the child script will get the property of the parent script. The update class that will run every frame, the start that will run only in the beginning of its existence, and the Awake that will always run before the starts. The getcomponent method that can be used to retrieve the information of specific script from others object. His video mainly teaches about the unity method but I think that it also helps to improve my understanding about the C#. I get to know about its syntax that we need to declare the type of the variable whether it is an integer, a string, a float, or a bool. The type can also be the name of the unity component such as Transform, Vector3, and SpriteRenderer. These are unique type that can be use in unity; it will contain different information such as Transform contains information about the object position, Vector3 contain a vector quantity, SpriteRenderer contain the function and information of the SpriteRenderer component such as the sprite we use or the color setting of the image. The usage of argument in a function or even the basics that when we pass a variable into a function through the argument, the function is actually making a copy of that variable and didn’t make any changes to the original one. To make change to the original, we need to give it the “ref” keyword. In the SebastianLague channel, he teaches only up until making the character jump-height depend on the time we press the jump button. The character that he used to demonstrate his code is just a mere square. He never mentions about the function that will change the look of the character or even the animation function. I need to find another channel and I found the Blackthornpod. I was impressed with the art that he used and the flow of his animation. I learn about his method of using Adobe Photoshop timeline to help in sketching the action for each frame and play it to check that the animation is smooth or not. I also learn the method of using the animator from him.
After having all the main components of the game, the decoration part is up to me. I need to try any method by myself and choose the one that fits the most with my game. There are many problems which the first thing is the animation. When dashing, my character will show weird behavior. It will switch between the standing and dashing animation for about 1-2 frame which is very annoying. I try to fix it using different kind of logic by using Boolean to check for the character status and play the animation according to it. But it didn’t help anything. I realize later that the error is from the core of it. In animation transition, I use the trigger method. Mostly, the trigger method is used just to play the animation only once but since my dashing animation contains only 1 frame the animation will keep repeating and it cause some error in the transition. I learn that the bool method is much more effective and easier to control. I just need to pass the value of the variable to the animator and it will work properly. Other problem is the pause menu. When pausing, we set the time of the game to be 0 which mean that the character shouldn’t be able to move but when I try to press some arrow button the character will move in a very fast pace in the same direction as the arrow. I fix this by telling that if it was pausing, the character won’t be reading any of the input from the keyboard. Therefore, we can be sure that the character won’t play any action.
Developing a game is very challenging for me. I need to learn many new things. Doing it alone also have a lot of effect. I need to create all the art for my game, think of the game mechanics, and coding all by myself. There are many bugs in my game. When I think that I can fix it, new problems will appear. I can just minimize all the bugs. This project helps me to improve my skills of analyzing the situation whether what I should care about the most, try to divide the problem into parts and fix it one by one. Lastly, I would like to say that I really enjoy doing this project.