Click here to Skip to main content
Click here to Skip to main content
Go to top

Blocked Out

, 4 Sep 2013
Rate this:
Please Sign up or sign in to vote.
The game in which have to remove stucked up block outside the board

Please note

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.

Contest Credentials

  • Target Platform: All-In-One
  • Category: Games
  • Overview of the application:
    In short, this application is the simple but challenging game in which the player have to remove the Blocked Block outside of the board by moving the other blocks Horizontal & Vertical. Till now this app available for Android Platform as well for Windows Store platform but its not available as Windows Desktop App and not a single platform app supports multiplayer and Multitouch game. So My app is innovative as my app included multiplayer & multitouch part which is not still available on not a single platform and soon for Windows Desktop app I will launch it.
  • Intended uses for the Application:
    All the user who like to accept the challenge can play this game. Also game can play on AIO device so if the level feels too much challenging then as Lenovo Horizon 27" All-In-One® Tablet PC has Multitouch facility then the players friend also help player to remove block from board. Which will give more entertainment. Player can play game as on System too as well as tablet with Multi Touch Fingers so many can play at a time & help the player to accept the challenge of removing blocked block outside of the board.  
  • Application Development approach: Proposed  application is best for All In One Tablet PC as its Multi touch feature help player to play game, even app utilize all novel UI features of tablet & PC game app and capability of Windows 8 OS platform that is Modern UI App. In particular, for developing Windows 8 platform desktop apps we need .NET framework avail in Visual Studio 2012 and as I gave the animation to block movement for that purpose used Blend to animate blocks & make app more interactive for players those accepting the challenge.   
  • Coding Languages and Frameworks: Core application code base will be developed using complete C#  language and core .NET framework libraries. In addition to this, to give extra effect used Photoshop to create images & blocks to be feel real. And this game app saves the score of player on cloud so get global challenge to solve the puzzle hence using Microsoft Azure SDK with Microsoft SQL Server so all players score stored in SQL format on cloud so that all players can see high score people and try to accept the challenge of removing blocked block.

Introduction 

Blocked Out is a sliding puzzle game the goal is to get the Orange block out of the board by moving other blocks to make way in minimum number of moves. It sounds simple, yet players call it "frustratingly fun", as soon it turns into quite a challenge. With 30 free levels there's enough to keep you busy for a long time at my first attempt. and Score of player will get saved on Cloud so the top players score will get viewed to other players and other players have to break their points & try to be in top Score rankings.

Using the code

Core application code base will be developed using complete C#  language and core .NET framework libraries. I will update you with important code as soon as I will start with my app.

Below Code Snippet checks the available space where player can move the block

//Checks the space available beside of block
private int CheckSpace(RectangleExtension item, Helper.Direction direction, Rect itemRect)
{
var otherObjects = Coordinates.Where(itm => itm.Key != item.Name).ToList();
int counter = 0;
switch (direction)
{

//check left direction
case Helper.Direction.Left:
if ((itemRect.X - 100) > 0)
{
foreach (var obj in otherObjects)
{
var objPoints = obj.Value;

if (objPoints.Top <= itemRect.Top)
{
if (objPoints.Left <= itemRect.Left)//Intereseted in only the blocks which are on the left side of the moving block
{
if (itemRect.Top == objPoints.Top) //Both blocks are starting from the same row
{
if ((itemRect.Left - 100) == objPoints.Left) //checking if moving the block to left will result in colliding
{
counter++;
}
else
{
if ((itemRect.Left - 100) > objPoints.Left && (itemRect.Left - 100) < objPoints.Right)
{
counter++;
}
}
}
else if (itemRect.Top > objPoints.Top && itemRect.Bottom < objPoints.Bottom)//block is in the middle ( |- )
{
if ((itemRect.Left - 100) == objPoints.Left) //checking if moving the block to left will result in colliding
{
counter++;
}
}
else if (itemRect.Top > objPoints.Top && itemRect.Bottom == objPoints.Bottom)//block is in the middle ( |_ )
{
if ((itemRect.Left - 100) == objPoints.Left) //checking if moving the block to left will result in colliding
{
counter++;
}
}
}
}
}
}
else
{
counter++;
}
break;

//Check right direction
case Helper.Direction.Right:
if ((itemRect.Right + 100) <= 600)
{
foreach (var obj in otherObjects)
{
var objPoints = obj.Value;

if (objPoints.Top <= itemRect.Top)
{
if (objPoints.Right >= itemRect.Right)//Intereseted in only the blocks which are on the right side of the moving block
{
if (itemRect.Top == objPoints.Top) //Both blocks are starting from the same row
{
if ((itemRect.Right + 100) == objPoints.Right) //checking if moving the block to right will result in colliding
{
counter++;
}
else
{
if ((itemRect.Right + 100) > objPoints.Left && (itemRect.Right + 100) < objPoints.Right)
{
counter++;
}
}
}
else if (itemRect.Top > objPoints.Top && itemRect.Bottom < objPoints.Bottom)//block is in the middle ( -| )
{
if ((itemRect.Right + 100) == objPoints.Right) //checking if moving the block to right will result in colliding
{
counter++;
}
}
else if (itemRect.Top > objPoints.Top && itemRect.Bottom == objPoints.Bottom)//block is in the middle ( _| )
{
if ((itemRect.Right + 100) == objPoints.Right) //checking if moving the block to right will result in colliding
{
counter++;
}
}
}
}
}
}
else
{
counter++;
}
break;

//Check upward direction
case Helper.Direction.Top:
if ((itemRect.Y - 100) > 0)
{
foreach (var obj in otherObjects)
{
var objPoints = obj.Value;
if (objPoints.Top < itemRect.Top)
{
if (objPoints.Left <= itemRect.Left)
{
if (objPoints.Left == itemRect.Left)
{
if ((itemRect.Top - 100) == objPoints.Top)
{
counter++;
}
else
{
if (itemRect.Top - objPoints.Bottom < 100)
{
if ((itemRect.Top - 100) < objPoints.Bottom && (itemRect.Top - 100) > objPoints.Top)
{
counter++;
}
}
}
}
else if (objPoints.Left < itemRect.Left && objPoints.Right > itemRect.Right)// In Middle ( 'T' Shape)
{
if ((itemRect.Top - 100) == objPoints.Top)
{
counter++;
}
}
else if (objPoints.Left < itemRect.Left && objPoints.Right == itemRect.Right)// In End ( '7' Shape)
{
if ((itemRect.Top - 100) == objPoints.Top)
{
counter++;
}
}
}
}
}
}
else
{
counter++;
}
break;

//Check downward direction
case Helper.Direction.Bottom:
if ((itemRect.Bottom + 100) <= 600)
{
foreach (var obj in otherObjects)
{
var objPoints = obj.Value;
if (objPoints.Bottom > itemRect.Bottom)
{
if (objPoints.Left <= itemRect.Left)
{
if (objPoints.Left == itemRect.Left)
{
if ((itemRect.Bottom + 100) == objPoints.Bottom)
{
counter++;
}
else
{
if (objPoints.Top - itemRect.Bottom < 100)
{
if ((itemRect.Bottom + 100) > objPoints.Top
&& (itemRect.Bottom + 100) < objPoints.Bottom)
{
counter++;
}
}
}
}
else if (objPoints.Left < itemRect.Left && objPoints.Right > itemRect.Right)// In Middle ( 'T' Shape)
{
if ((itemRect.Bottom + 100) == objPoints.Bottom)
{
counter++;
}
}
else if (objPoints.Left < itemRect.Left && objPoints.Right == itemRect.Right)// In End ( '7' Shape)
{
if ((itemRect.Bottom + 100) == objPoints.Bottom)
{
counter++;
}
}
}
}
}
}
else
{
counter++;
}
break;
}
return counter;
} 

Now working on Multi finger touch effect for this game for Multiplayer effect, so trying to use GestureRecognizer class, I found this sample code for gesturerecognizer which will help us for multi touch support as Lenovo IdeaShare Tablet PC has Multi touch support of 10 fingers at a time.

 At the place of comments have to write the name of blocks which have to move & real logic, its only schema of gesture recognizer for our windows 8 desktop app.

namespace GesturesApp.Manipulations
{
/// <summary>
/// Thin wrapper around the <see cref="Windows.UI.Input.GestureRecognizer"/>, routes pointer events received by
/// the manipulation target to the gesture recognizer.
/// </summary>
/// <remarks>
/// Transformations during manipulations cannot be expressed in the coordinate space of the manipulation target.
/// Instead they need be expressed with respect to a reference coordinate space, usually an ancestor (in the UI tree)
/// of the element being manipulated.
/// </remarks>
public abstract class InputProcessor
{
protected Windows.UI.Input.GestureRecognizer _gestureRecognizer;

// Element being manipulated
protected Windows.UI.Xaml.FrameworkElement _target;
public Windows.UI.Xaml.FrameworkElement Target
{
get { return _target; }
}

// Reference element that contains the coordinate space used for expressing transformations
// during manipulation, usually the parent element of Target in the UI tree
protected Windows.UI.Xaml.Controls.Canvas _reference;
public Windows.UI.Xaml.FrameworkElement Reference
{
get { return _reference; }
}

/// <summary>
/// Constructor.
/// </summary>
/// <param name="element">
/// Manipulation target.
/// </param>
/// <param name="reference">
/// Element that contains the coordinate space used for expressing transformations
/// during manipulations, usually the parent element of Target in the UI tree.
/// </param>
/// <remarks>
/// Transformations during manipulations cannot be expressed in the coordinate space of the manipulation target.
/// Thus <paramref name="element"/> and <paramref name="reference"/> must be different. Usually <paramref name="reference"/>
/// will be an ancestor of <paramref name="element"/> in the UI tree.
/// </remarks>
internal InputProcessor(Windows.UI.Xaml.FrameworkElement element, Windows.UI.Xaml.Controls.Canvas reference)
{
this._target = element;
this._reference = reference;

// Setup pointer event handlers for the element.
// They are used to feed the gesture recognizer.
this._target.PointerCanceled += OnPointerCanceled;
this._target.PointerMoved += OnPointerMoved;
this._target.PointerPressed += OnPointerPressed;
this._target.PointerReleased += OnPointerReleased;
this._target.PointerWheelChanged += OnPointerWheelChanged;

// Create the gesture recognizer
this._gestureRecognizer = new Windows.UI.Input.GestureRecognizer();
this._gestureRecognizer.GestureSettings = Windows.UI.Input.GestureSettings.None;
}

private void OnPointerMoved(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args)
{
// Route the events to the gesture recognizer.
// All intermediate points are passed to the gesture recognizer in
// the coordinate system of the reference element.
this._gestureRecognizer.ProcessMoveEvents(args.GetIntermediatePoints(this._reference));

// Mark event handled, to prevent execution of default event handlers
args.Handled = true;
}
}
}

Concept Screenshot

Single Player Game with Single Touch 

Multi Player Game with Multi Finger touch as Lenovo Idea share Supports 10 Finger Touch at a time


Features 

  • Play 30 unique puzzles
  • Simple but challenging Levels 
  • One after another level the Complication increases
  • Windows 8 Desktop App
  • Multi Player Mode with Multi touch effect
     

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Aditya Rajendra Patil
Student Konkan Gyanpeeth College of Engineering
India India
I am the Engineering Student from Konkan Gyanpeeth College of Engineering, Karjat, As well I am the Microsoft Student partner from my college campus. I like to develop windows 8 & Windows Phone Apps. I am Microsoft techenthuz. I like to work on technology of Microsoft as well of Intel.

Comments and Discussions

 
GeneralMy vote of 5 PinmemberChirag Rawal19-Aug-13 23:29 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil20-Aug-13 1:30 
QuestionAlready available on Android! PinmemberCaerwyn19-Aug-13 21:35 
AnswerRe: Already available on Android! PinprofessionalAditya Rajendra Patil19-Aug-13 22:03 
GeneralRe: Already available on Android! PinmemberCaerwyn19-Aug-13 23:05 
GeneralRe: Already available on Android! PinprofessionalAditya Rajendra Patil19-Aug-13 23:20 
I am trying to divide screen in two parts for 2 players, at one section one will remove blocked block out of board and at a same time another will remove blocked block from his board. and timer will start who will solve in less time will win.
But as its at next level first try to implement it for single player then after completing my single player I will go for multi player.
 
If you like my app concept, vote my app, I will update article soon.
GeneralRe: Already available on Android! PinmemberCaerwyn19-Aug-13 23:38 
GeneralRe: Already available on Android! PinprofessionalAditya Rajendra Patil19-Aug-13 23:40 
GeneralMy vote of 5 PinmemberVandana Patil19-Aug-13 16:14 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil20-Aug-13 1:31 
GeneralMy vote of 4 Pinmemberfredatcodeproject19-Aug-13 2:17 
GeneralRe: My vote of 4 PinprofessionalAditya Rajendra Patil20-Aug-13 1:31 
GeneralMy vote of 5 PinmemberSandesh Kadam19-Aug-13 1:35 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil20-Aug-13 1:32 
GeneralMy vote of 5 PinmemberPruthviraj Mohite16-Aug-13 17:53 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil17-Aug-13 14:54 
AdminThanks! PinstaffKevin Priddle16-Aug-13 5:50 
GeneralRe: Thanks! PinprofessionalAditya Rajendra Patil16-Aug-13 14:56 
GeneralMy vote of 5 PinmemberRaghav Narang12-Aug-13 4:10 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil12-Aug-13 4:16 
GeneralMy vote of 5 PinprofessionalNitin M. Patil12-Aug-13 3:51 
GeneralRe: My vote of 5 PinprofessionalAditya Rajendra Patil12-Aug-13 4:00 
GeneralRe: My vote of 5 PinprofessionalNitin M. Patil19-Aug-13 3:35 
GeneralMy vote of 4 Pinmemberpankajfmavit12-Aug-13 2:15 
GeneralRe: My vote of 4 PinprofessionalAditya Rajendra Patil12-Aug-13 2:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 4 Sep 2013
Article Copyright 2013 by Aditya Rajendra Patil
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid