A QML Memory Game Tutorial
In this article we will cover very basic QML elements that will help you to create an easy but cool Memory game using the recent QML technology.
This is the game description in short
- This game consists of a deck with 32 paired cards arranged randomly.
- You open a card by clicking or tapping on it, if so, the card will show its content
- You can open a second card in the same way
- If cards match, then they are removed from the deck
- If cards don't match, they cover themselves again
- Match or not, the pair counter will go up 1 unit and this is displayed in the top/right
- On the top/left you will be able to see the elapsed time
Here is an image of the game scene:
Main Menu and other Screens
The game contains a main menu presented in two different scenarios
- When the app starts or game is over: two options (Start/Exit)
- When the game is paused: three options (Continue/Restart/Exit)
It also contains an End Dialog displayed when all the cards are matched and the game is over.