Skip to content

Test assignment for Amaya Soft - a small quiz game made in 2 days (apart from post-publish refactoring). Goal of the game is to find a cell that matches the objective

Notifications You must be signed in to change notification settings

ForestSquirrelDev/Quiz-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo.mp4

Download Unitypackage

  • Link - this version is slightly adjusted for default PC build settings. Original project was made with Android build settings

Few short remarks

Events

Whole component structure of this project is heavily tied to events, both Unity and C#.

The greatest advantage of UnityEvents is the visualization in Editor - you can simply drag and drop desired listeners with no need of writing the code, which is very flexible if you don't know how many observers you want to have.

But at the same time relations between components become more and more unobvious as the number of those dragged listeners increases, whereas with C# events you can track every listener directly in the code. Because of that, i tried to use C# events where there's no need in visualisation and number of observers is meant to be fixed.

Code comments

Though there is a very popular opinion that clean code doesn't need to be commented, i tend to believe that a short summary over a class or method, or even few lines of comments can speed up reading the code a lot, especially when this code is far from being perfect.

Scene hierarchy management decisions

image image image

In order to keep my project structure as clean as possible, i broke vast majority of GameObjects into two logical groups: UI Canvas and Game logic components.

In my code structure i've made an attempt to minimize cross-component dependencies and make classes that only do one particular thing. If it's a quiz class, it manages quiz flow, notifies all observers about how the quiz is going and it does not care what other classes are doing at the moment (except for the events that the Quiz class is subscribed on). If the class is responsible for some kind of tweening, it only does this particular thing - it tweens.

And in the scene hierarchy i've tried to keep this mentality of separating things up so the workflow with this project's structure could be as convenient and intuitive as possible.

About

Test assignment for Amaya Soft - a small quiz game made in 2 days (apart from post-publish refactoring). Goal of the game is to find a cell that matches the objective

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published