XRD Week 11
Repository link: https://github.com/composer404/XRArcade
XRD Week 11 - Cards Game
During week 10 the card game was developed. The mini game is a memory game targeting people of all age groups.
Main purpose behind the game is to find all matching cards in the card set. There are 9 types of fruits and each fruit card has its matching corresponding card and the player has to find it within 40 seconds to win. At the beginnning of the game cards are rotating so that the player can see all the cards and try to memorise their location, after that all of them turn back and game starts, player can pick two cards at once in order to see if they match. If the player picked unmatching cards, both will rotate back allowing the player to choose another set of cards that he thinks might be a match. The screenshot below represents cards at the beginning phase of the game - rotated for a short period of time allowing the user to memorise them before they rotate back and the player can test how well he memorised the cards.
Card models
Card models were designed in blender and then imported to unity. In order to create the textures for each of the fruits photoshop was used to paint on UV map of the object.
Card components
Each card has a box collider and XR Simple interactable components which are allowing us to interact with the card, like pointing and rotating it.
Each card has an unique id and cards with the same fruits on them (matching ones) have the same ids.
Applying ids lets us check the cards in order to know if the player pointed to the card with matching id.
Hover Entered and Exited
| On hover |
Checking for matching cards
On select entered
On select event method on click is triggered which rotates the card and enables the player to see the fruit on the card.
Card position
Thanks to this method called Shuffle, each time we start the game, cards are shuffled to different positions.
Cards are firstly shuffled and later their position is assigned.
Comments
Post a Comment