top of page

Educational Game

This educational game is created by Unity. I used several different types of codes to finish this program. The first program was to learn the functions and variables to create a text that welcomes a name and a calculator. Also, using the codes, I compared the user answer with the real answer to judge if the player inserted a correct answer. I used an if and else code to compare the answer. If the answer is correct, the text will show 'you are correct.' If the answer is incorrect, the text will show 'you are not correct.' For calculator purpose, I also used dropdowns UI to change the calculation to addition, subtraction, multiplication, and division. I also put the image sprite for more delight. The code were inputed within the if code with the text.

For my own program, I tried out new things beyond what I learned in the previous program. First, I created different strings and integers for the variable. Basically, this game is to pick out a word that has a grammar mistake from a given question. To compare the words from the sentence and the user answer, I had to use a string to check the answer. For UI, I created a serialize field for input fields, buttons, texts, and images. Within the code, I had to use a serialized field to connect the code with the actual UI interface. I dragged each UI to the variable controller script tab. For the first part, I made the code for user to enter their name to start the quiz. After, I created a function to load the questions. I used a random generator to randomly select a question for program. By setting a random integer, I made an if code to connect the random number to certain question. I've set a string for each answer of each questions, and I had to compare to the user's answer. Once again, I used an if code to compare things out. There was a string for answer and another string for a user answer from the input field. I converted them to lowercase to make my life easier. I compared the both strings to see if they are equal. If they are equal, the program will answer the player 'you are correct.' If they are not equal, the program will answer the player 'incorrect.' Later, I created a image sprite to show image that congratulates or discourages a player. I also made a button that quits the program. For fun, I created a secret black list, and if that person types his name, the program will ban the user. It is just for fun without any negative feelings!

© 2023 by Graphic Design Porfolio. Proudly created with Wix.com

bottom of page