Xamarin Android Memory Game with C#

Home / Courses / Xamarin Android Memory Game with C#

In this Xamarin Android Memory Game course we will develop a very simple Memory Puzzle Game with Xamarin and C# for Android environment. Throughout the course, we will discover how to use the Xamarin Android axml editor to build our basic interface elements. We will also look into the use of hard coded elements that are developed dynamically.  We will then move on to building the logic of our game and how it would appear on the interface. Next thing will be the interactions that user can make with the game.   Throughout the lessons, you will have access to the latest project as I am working on. This will help you in case you fell behind or wanted to compare your project with mine.  I hope you enjoy it.  ​  ​

Xamarin Android C# _ 1 _ Understanding the App

In this lesson, we will review the entire app real quick to get a better understanding of what it is we are developing and what the different requirements of it. By the end of this lesson you should understand the need for the following:
a) image assets
b) the grid making system
c) grid randomizing system
d) touch listener detection
e) image view comparison system

Xamarin Android Memory Game C# _ 2 _ Building the Game Interface Elements

In this lesson, we will also make the interface elements of our game in axml. We will also add the image assets accompanying this tutorial to our project.

Xamarin Android Memory Game C# _ 3 _ Building our game view

In this lesson, we learn how to read the dimensions of our game interface and apply that to the grid layout that we make dynamically.

Xamarin Android C# _ 4 _ Making the Grid of Blocks

In this lesson, we will make the number of the blocks that we need out of Image Views and add them all into an Array. We will also add the different locations on our grid into another Coordinates Array that will be used through the randomization process.

Xamarin Android Memory Game C# _ 5 _ Randomizing the Grid

In this lesson, we will write a randomizing code that will take the existing blocks and places them randomly over our Grid Layout.

Xamarin Android C# _ 6 _ Reset Methods

In this lesson, we will add the body of the two buttons reset functions

Xamarin Android Memory Game C# _ 7 _ Timer Functions

In this lesson, we will add the timer function to our app.

Xamarin Android C# _ 8 _ Detecting Touch on Image Views

In this lesson, we will implement the Touchlistener and make sure each time a block from our series is touch a respond is returned.

Xamarin Android C# _ 9 _ Comparison Part 1

In this lesson, we will find out if this is the first or the second time in a pair that the blocks are touched upon. If it is the 2nd time, we will run a comparison function to compare the two blocks and decide whether they are a match or not.

Xamarin Android C# _ 9 _ Comparison Part 2

In this lesson, we will find out if this is the first or the second time in a pair that the blocks are touched upon. If it is the 2nd time, we will run a comparison function to compare the two blocks and decide whether they are a match or not.

Xamarin Android Memory Game C# _ 10 _ Summary

Understanding what we did so far and where to go from here.

The following two tabs change content below.

Amir J

Senior Instructor at Cinard.ca
Amir is our senior instructor here at Cinard. He comes to us with years of teaching experience in Dubai and online. His background is in computer animation and programing for 3d imagery. He has a MED in Higher Education, a MA in Digital Media and a BA in Digital Animation.

Latest posts by Amir J (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *