Udemy_Creating_a_Cross-Platform_Quiz_App_using_Unity_and_Csharp

در این آموزش تصویری با ساخت اپلیکیشن کوئیز چندسکویی با سی شارپ و یونیتی آشنا می شوید.

این دوره آموزشی محصول موسسه Udemy است.

سرفصل های این دوره:

  • امکانات این دوره
  • ایجاد پروژه جدید و وارد کردن امکانات
  • ایجاد یک پس زمینه
  • ساخت عنوان صفحه نمایش
  • شخصی سازی ظاهر دکمه ها
  • نوشتن کد برای سوئیچ بین طرح بندی صفحه نمایش
  • ایجاد صفحه نمایش
  • پیاده سازی انتقال به صفحه انتخاب شده
  • نصب و راه اندازی صفحه نمایش سوال
  • ایجاد یک کلاس سوال
  • نوشتن کد برای ایجاد سوالات
  • تکمیل موارد برای تولید تمام انواع سوالات
  • مسابقه معماری نرم افزار
  • آزمایش نتایج کار
  • نمایش سوال بعدی وقتی که پاسخ انتخاب شده است
  • اضافه کردن مرحله تأیید و نمایش نتایج: از صفحه نمایش
  • تفسیر نتایج مسابقه
  • نمایش نتایج امتحان و نتیجه گیری
  • اضافه کردن یک نوار پیشرفت به صحنه ما
  • نمایش نتیجه درست پس از سوال ها و پاسخها
  • نوشتن کد برای نشان دادن مارک ها و علامت های صحیح و غلط
  • اضافه کردن صدا به مسابقه
  • و …

عنوان دوره: Udemy Creating a Cross-Platform Quiz App using Unity and Csharp

مدت دوره: 4 ساعت و 30 دقیقه

نویسنده: Knowledge Base, Shaun Spalding

 توضیحات:

Udemy Creating a Cross-Platform Quiz App using Unity and Csharp

Knowledge Base, Shaun Spalding
4.5 hours


App and software developers can use Unity to create a quiz application with randomly generated questions from scratch
We will create a simple quiz app for kids to learn elementary math. The example application will be built step-by-step, moving from the simplest viable version to more complex versions with more functionality and visual improvements. The ideas from this course can be used to create your own more complex quiz-like application.
The material in this course is divided into 3 Sections. Section 1 features a short introduction to the course.
In Section 2, we will discuss the architecture that is common for all quiz-based applications. In this section we will create the core of our example application. We will talk a lot about random generation, because in our math quiz all the questions and answers are generated randomly. By the end of section 2 we will have a minimum viable quiz application that is suitable for a very formal quiz.
In Section 3 we will add more interactivity to our quiz application. You will learn how to make important elements of quiz apps: progress bars, countdown timers, displaying visual feedback about players` answers, interpreting and showing the final results of the quiz. You will also learn how to add sound to your application. In the last Lecture of Section 3 I will show you how you can easily customize the visual appearance of your application in Unity without writing any extra code.
Follow along with free, downloadable assets
I have tried to save the project that I was working in as often as I can so that you can easily pick up the material from any point in this course. All these projects and the assets used to develop our example quiz will be available for download with this course.
What are the requirements?
You can be an absolute beginner with Unity to take this course. This course is very beginner-friendly and I try to explain everything that I am doing as much as I can.
It would certainly be easier to follow the material in this course if you have some previous experience with C#, but it is not strictly necessary. I do not use any advanced features of C# language in this course.
You should install Unity3d to develop the application that we are making in this course. Any version after Unity 5 will do.
What am I going to get from this course?
Over 41 lectures and 4.5 hours of content!
learn universal workflow for all the quiz applications.
organize the flow of your application by creating different screen layouts and switching between them at runtime.
learn a lot about random generation since the questions in this application are generated randomly.
how to add countdown timers and progress bars to your Unity applications.
learn how to interpret and show the results of your quiz app to your users.
learn how to add countdown timers and progress bars to your Unity applications.
learn the basics of working with Unity UI. You will learn how to create user interfaces in Unity that will look the same on different resolutions and screen aspect ratios.
get a fully functional Unity project of the quiz application created in this tutorial. You will also get a Bonus project with some visual improvements and decorations.
What is the target audience?
This course is for people who want to make their own quiz application and want to learn how quiz applications are made in general.
The techniques taught in this course can be used to build any other quiz or trivia application and are not limited to making just math quizzes. Other examples might include quiz games like: Who Wants to Be a Millionaire?, Logo Quiz, different psychology quizzes, etc...


Section 1: Introduction
Lecture 1
About the Author
01:08
My name is Valdimir Limarchenko and I am a Unity3D and C# developer with 2+ years of experience with Unity and 7+ years of programming experience. I absolutely love making 2d games. Just recently I have worked on a couple of freelance projects that involved a lot of work with Unity UI, so I might include that into my courses.
I would like to show you some footage from the game that I am currently developing. It is a simple Egypt-themed puzzle platformer. I am really interested in getting to know my students, so I encourage you to write a comment about yourself, your experience in game dev and your gaming tastes in the discussion section of this course.
Lecture 2
Introduction to the Course
05:43
Welcome to this Course!
In this Course you will learn how to create your own quiz applications from scratch. As an example we will develop a simple application for kids to exercise elementary math skills. In this Introduction Lecture I will show you the application that we will be making. I`ll talk about the structure of this course and we will set our goals for the course.
Lecture 3
FAQ about our courses
6 pages
Lecture 4
Assets for this Course
Article
Lecture 5
Exercise: Be Sure to Introduce Yourself
Article
We want to get started right and build a community of students who are invested in helping each other out, so I have a quick exercise for you.
Introduce yourself to the rest of the course by posting in the course discussion/questions.
Step 1: Start a new discussion/question
Step 2: Title it with 'Hi, I'm [Your Name]�
Step 3: Tell us who you are, why you enrolled in this course, and more about your creative work.
Talk about what games you're working on or you want to work on.
And if you already have a game that you've released, we'd love to check it out and feel free to share it with other students.
We�re excited to learn more about you, your projects, and your learning goals.
-The Knowledge Base Team
Section 2: Section 2
Lecture 6
Introduction to Section 2
03:03
In this lecture we will set our goals for Section 2 and discuss the means that we will use to achieve it. By theend of this Section we should have all the core logic of our quiz application complete.
We will take a look at what our quiz app will look like by the end of Section 2.
Lecture 7
Creating New Project and Importing Assets
05:29
In this Lecture we will create an empty Unity project and import every thing from the folder AssetsForImporting into our newly created project.
We will briefly discuss all the assets that are required to start the development of our application.
Lecture 8
Creating a Background
09:05
In this Lecture we will create a chalkboard image that will serve as a background for this application. We will also create 4 empty game objects (called Starting Screen, Difficulty Selection Screen, Question Screen and Results Screen) that will later serve as containers for different screen layouts that we will have in this app.
Lecture 9
Making the Title Screen
09:00
In this Lecture we will work with Unity UI to add the Title of our game to the Starting Screen. We will create a button that will start the game and redirect us to the Difficulty Selection Screen. I will show you how to use Sprite Editor to cut out multiple images from one sprite sheet.
Lecture 10
Customizing the Look of Buttons and Saving Scenes
06:08
In this Lecture we will change the standard look of the button on our Starting Screen and we will make it look like it is drawn with chalk. I will also guide you through the process of saving a scene in Unity and we will discuss what to do if it seems like all the game objects have disappeared and your scene looks empty.
Lecture 11
Writing Code to Switch between Screen Layouts
08:24
In this Lecture we will create the main script file of our app that will be called GameManager.cs. In this newly created script we will write a couple of methods that will be responsible for changing screen layouts in our quiz application.
Lecture 12
Creating the Difficulty Selection Screen
07:31
In this Lecture we will create the layout that our users will see when they are prompted to select difficulty of the quiz. Our quiz will have just 3 levels of difficulty. On the easiest difficulty our users will get just addition questions. And the hardest difficulty will feature all the elementary mathematical actions.
Lecture 13
Implementing a Transition to the Difficulty Selection Screen
08:05
In this Lecture you will learn how to handle button clicks in Unity. Our goals for this lecture are: First, when our user presses a button on the Starting Screen, we want him to be redirected to the Difficulty Selection Screen. Second, we want to always see the Starting Screen when the game is launched.
Lecture 14
Assembling the Question Screen
04:42
In this Lecture we will create a layout that our users will see on the screen during the actual quiz.
Lecture 15
Implementing a Transition to the Question Screen
07:23
In this Lecture we will create another method in the GameManager class that will be called when our user selects the quiz difficulty. In this method we want to store the selected value of difficulty for later and we want to switch to the Question Screen to start the quiz.
Lecture 16
Creating a Question Class
09:48
In this lecture we will create a new class called Question that will generate elementary mathematical questions for our game. We will outline all the fields that our Question class should have and we will start writing a constructor for this class.
Lecture 17
Writing Code to Create Addition Questions
07:25
The constructor in our Question class will act differently for different question types. In this lecture we will create the case for generating addition questions. It will have one limitation this code can be used only if you want your users to select from 3 options.
Lecture 18
Enhancing Our Question Creation Code
09:54
In this Lecture we will make our Question constructor universal and independent of the number of options that we want to show to the user in our quiz. By creating a couple of additional methods, we will get simple and universal code for generating false answers.
Lecture 19
Completing the Cases for Generating All Questions Types
08:59
In this Lecture we will complete all the cases for generating questions in each of our QuestionModes. We will use the code from the previous lecture to generate false answer options.
Lecture 20
Creating a ToString() method in our Question class
04:34
In this Lecture we will write a custom method called ToString() in our Question class so that it shows all the information that we need to know about our questions. We will use it later for test purposes.
Lecture 21
Quiz Application Architecture
09:49
In this Lecture we will take a look at a scheme that represents the most common structure among all quiz applications. We will talk about the most important stages that are present in every quiz application: preparatory stage, question stage, answer verification stage and the results stage. You will see how these stages are arranged and how the game loop is implemented.
Lecture 22
Creating a Random Question Generator
08:15
In this Lecture we will create a new method in our GameManager class. Whenever we call this method, it will give us a new random Question. The process of question generation will take into account the difficulty that our user has selected.
Lecture 23
Testing the Results of Our Work by Generating Som�om Questions
04:39
In this Lecture we will test the results of our work so far. I will make it so that when we press the button Q on the keyboard a new Question will be generated and all the information about this Question will be printed out in the console.
Lecture 24
Showing Questions on the Question Screen
09:18
In this Lecture we will add some code to the DisplayQuestion() method to show questions with false answers and one correct answer on the Question Screen. Position for the correct answer will be selected randomly and saved for later.
Lecture 25
Showing Next Question When the Answer Is Chosen
09:56
In this Lecture we will create a new method that will be called when the user chooses one of the answers. For now this method will just show another random question on the Question Screen.
Lecture 26
Adding the Verification Stage and Showing Results Screen
06:44
In this lecture we will store the information about the answers that user selects throughout the course of the quiz. We will also show the Results Screen when the quiz is over.
Lecture 27
Interpreting the Quiz Results
07:54
In this Lecture we will talk about interpreting the results of our quiz. All the questions from the Answered Questions List will be sorted by category. And we will determine the number of correct questions in each category so that we can later show the ratios of correct answers to total answers for each category.
Lecture 28
Showing the Quiz Results and Conclusion for Section 2
07:12
In this Lecture we will print out the results of our quiz on the Results Screen. In the end of this Lecture I will sum up everything that we have accomplished in Section 2 and talk about our main goals for Section 3.
Section 3: Section 3
Lecture 29
Introduction to Section 3
04:26
In this Lecture we will take a look at our finished quiz application with all the extra features that we will be working on in this Section. The countdown timer and the progress bar.
Lecture 30
Adding a Progress Bar to Our Scene
05:25
In this Lecture we will add the visual representation of the progress bar to our project. It will consist of two images. We will examine all the settings that we have to change in the Image script to make our images behave like a progress bar.
Lecture 31
Writing a Method that Will Update Progress
05:51
In this Lecture we will create a new method in our GameManager class that will be responsible for calculating progress and showing it to our users on the progress bar.
Lecture 32
Showing the Correct Result after User Answers a Question
06:45
In this Lecture we will make the execution of our program wait for a certain amount of time after our user chooses an answer. During this time the correct answer will be shown instead of the question mark in the end of the question. We will achieve this effect by using coroutines.
Lecture 33
Adding Correct and Wrong Checkmarks to Each Answer Button
04:27
In this Lecture I will add 2 new game objects to each of the buttons that represent answers in our quiz. These game objects will be enabled to provide even more visual feedback to our user based on their answers.
Lecture 34
Writing Code to Show Correct and Wrong Checkmarks
09:23
In this Lecture we will add some code to our verification method that will be responsible for showing the checkmarks that we have created in the previous Lecture. We will also fix a bug that allowed to select more than one answer.
Lecture 35
Adding Sound to the Quiz
08:07
Our goal for this Lecture is to provide even more feedback to our users. We will create an AudioSource that will play one sound if our user chooses a correct answer and another sound if he chooses a wrong answer.
Lecture 36
Smarter False Results Generation (Optional)
07:35
In this Lecture we will enhance the code in the Question class that is responsible for generating False Results. Previously if we had a question 2+2 =?, we could get False Results that were very unlikely to be answers to our question. For example, because of completely random generation of these numbers we could get: 44, 70, and 56.
Our goal for this Lecture is to generate False Results that will be closer to our correct Result.
Lecture 37
Creating a Countdown Timer and a Timer Script
07:28
In this Lecture we will create a visual representation of a countdown timer for our quiz application that will look like a LED watch. We will also create a new script called Timer and establish a connection between the timer and the GameManager.
Lecture 38
Formatting the Time for Printing on the Countdown Timer
06:35
In this Lecture we will start working on a Timer script. We will override (replace with our own code) a method called ToString() so that it will return a string that is suitable for printing onto our LED watch.
Lecture 39
Handling the �Time Expired� Situation
09:54
In this Lecture we will continue working on a Timer script. When the time expires, we will call a method on our GameManager. This method will ensure that we record current question as answered incorrectly, it will show the Time Expired message it will also play a buzzer sound and move to the next question.
Lecture 40
Final Bug Fixes and Testing
04:05
In this Lecture we fix an interesting bug. It is caused by our convention that when the time has expired we are calling the VerifyAnswer method with an argument of -1. Then we launch the game test the Timer script.
Lecture 41
Conclusions and Bonus
07:47
In this Lecture I will sum up everything that we have achieved throughout this course. I will also show you a different take on out quiz application with some cosmetic changes and new decorations.
You will get the final version of this project in the Assets for this course.
Thank you very much for taking this course!!!
Please let me know your opinion about this course in the discussion section.