Xamarin iOS Sliding Puzzle C#

Home / Courses / Xamarin iOS Sliding Puzzle C#

In this Xamarin iOS Sliding Puzzle tutorial we will cover the development of a Xamarin iOS Sliding Puzzle game in Xamarin and C# for the interface of iOS. The game will be developed in a way that user can choose a variety of levels to be played.

You can view the complete course on Udemy

https://www.udemy.com/xamarin-ios-sliding-puzzle-csharp

.

Throughout the series, you will discover the following

Section 1 – Introduction

Understanding how the app actually plays and runs

Xamarin iOS Sliding Puzzle C# . 1 . Understanding the App

In this lesson, we will do a quick review of the what the app entails, the interface to develop and compile the app as well as the programming language used. By the end of this lesson, you should have an overall understanding of the following components:

a) the assets that are used in this project
b) a grid making system where the pieces of the text likeable are placed on different seizes of grids
c) a randomization system where the blocks of the text labels are randomized on the background.
d) an empty block finder strategy where the adjacent blocks can move to.
e) a touch detection system
f) a timer system and a reset button

 .

Section 2 – Interface

Developing the interface elements and understanding how the constraints work

Xamarin iOS Sliding Puzzle C# . 2 . Making the Game Interface Elements

In this first coding lesson, we will cover how to build a new UIView, a Button and a Label for our time.

 Xamarin iOS Sliding Puzzle C# . 3 . Understanding the View Dimensions

In this lesson, we will discuss how to understand the size of our screen and how to adjust the X, Y, width and height of our different outlets.

Xamarin iOS Sliding Puzzle C# . 4 . Making the constraints

In this lesson, we will apply the appropriate constraints to our outlets to make sure they simulate similarly on all different devices.

 .

Section 3 – Grid of Tiles

Learning how to dynamically add UILabels and randomizing them

Xamarin iOS Sliding Puzzle C# . 5 . Understanding our Tile system

In this lesson, we will do a quick overview of how our tiles are actually located in our UIView.

Xamarin iOS Sliding Puzzle C# . 6 . Making the Grid of Blocks

In this lesson, we will write the code for developing the UILabels that will work as the tiles of our game and place them on the game view.

Xamarin iOS Sliding Puzzle C# . 7 . Storing Tiles Data

In this lesson, we will write the arrays to appropriately store the tiles and their location in the view.

 Xamarin iOS Sliding Puzzle C# . 8 . Removing One Tile

In this lesson, we will remove one title from our view to make sure the game is actually playable. This will make sure that there is at least one empty spot at the beginning of the game.

Xamarin iOS Sliding Puzzle C# . 9 . Randomizing the Grid

In this lesson, we will randomize the grid of the tiles.

 .

Section 4 – Prepare to Play

Understanding the connects necessary to run the game

Xamarin iOS Sliding Puzzle C# . 10 . Introducing the Empty Spot

In this lesson, we make a new CGPoint that will hold on to the empty spot.

Xamarin iOS Sliding Puzzle C# . 11 . Reset Method

In this lesson, we will work on our rest method. It will restart the game with new randomized state.

Xamarin iOS Sliding Puzzle C# . 12 . Timer Counter Method

In this lesson, we will add our timer function to our reset method.

 .

Section 5 – Interactions

Developing touch events and handling interactions with the interface

Xamarin iOS Sliding Puzzle C# . 13 . Touch Detection

In this lesson, we will write the TouchesEnded function that will detect the landed touches. In here we will learn how to find out what outlet the touch has landed on.

Xamarin iOS Sliding Puzzle C# . 14 . Touch View Center and Empty

We will then analyze the view where the touch has landed on and decide whether the tile can move or not.

Xamarin iOS Sliding Puzzle C# . 15 . Animating the Touched Tile

In this lesson, we will write the code to animate the tile that the touch has landed on.

.

Section 6 – Final thoughts

Xamarin iOS Sliding Puzzle C# . 16 . Summary of the course

In this lesson, we will go over all of the code once again and review the different functions.

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)

One Comment

Leave a Reply

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