This application is a game and for fun enjoyment through gaming for Windows 8 and coded in XAML and C# .This game is based on simple concept that there is a ball having random motion through out the screen and there is two board on opposite side of the screen and player has to save the ball from being hit by two opposite surface of the screen with help of board by moving up and down through keyboard and touch. As the time will pass the speed of the ball will increase and complexity will increase and it will be tougher to play .
Here are some basic features of this app
- Ball-there is a ball having random motion throughout the screen.
- Board-there are two boards which are there to save the ball from being hit by two opposite surface of the screen.
- Score and Miss- The score will increase by 10 if player save the ball by board and miss will increase by one if fails to save the ball.
- User Input- we can move board up and down through keypad as well as touch input from player.
- Graphics- It has custom controls and there is no image inside the game, ball and boards all are customs controls and can be adjusted in any resolution and configuration of the device.
- Music -there are music clips in .wav format.
- Complexity-as the time will pass the complexity of game as increment in speed of the ball and it will be tougher to play and save the ball after some time.
This app will take advantage of Ultra book in following way:
As in ultra book there is very nice touch support and with key input and in this game same trend has been followed because the board can be moved by key input as well as by touching the both board simultaneously to save the ball. As like in ultra book both form of input are available same thing in this game is followed and it will provide the freely use of touch support of ultra book as well as key input through this game. Ultra books are Thin, light, so can be played between two players anywhere.
In this accelerometER is used in such a way that if player doesn't want to play the game through key input and touch support there is a option that player can move the board through accelerometer in such way that if player will have to tap on left hand side once and then acclerometer property will get activate for respective board and then moving up and down the ultra book board can be moved like if player want to move right board then then player have to tap to tap on right hand side once and then moving ultra book up and down player can move the board and same for left board ,in this way there is no need to play the game through touch and key input and player can play the game through accelerometer property of ultra book.
3-Ambient light sensor -
Generally it is used to check the intensity of light and according to that the visibility and readability can be switched to dark and light mode easily.
In this app there is two background theme and according dark and light and dark mode they can be switched and can be set automatically like in dark mode light theme will be placed and in light mode dark theme will be placed.
In dark mode the display will be switched to following screen
Using the Code
this game consist of one of the some fine Win/RT properties to configure this game for windows 8 some of them are:
Function to cause calculated delays:
public static void introduceDelay(int ms)
DateTime dt1 = DateTime.Now;
int diff = 0;
while (diff < ms)
DateTime dt2 = DateTime.Now;
TimeSpan ts = dt2.Subtract(dt1);
diff = (int)ts.TotalMilliseconds;
C# Code to intersect the ball and board is:
if (rd >= 500)
Rect board1Rect = new Rect(Canvas.GetLeft(rightBoard), Canvas.GetTop(rightBoard), 40, 300);
Rect ballRect = new Rect(Canvas.GetLeft(mainBall), Canvas.GetTop(mainBall), 80, 80);
if (board1Rect.Width > 0)
Adding custom popup in Settings Pane:
[___em_>void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
args.Request.ApplicationCommands.Add(new SettingsCommand("settings", "Options", e =>
MyUserControl1 mycontrol = new MyUserControl1();
mycontrol.Width = 346;
p = new Popup();
p.IsLightDismissEnabled = true;
p.SetValue(Canvas.LeftProperty, Window.Current.Bounds.Width - 346);
p.Child = mycontrol;
p.IsOpen = true;
Point of Interest
The Application which are made and based on Windows 8 and WinRT API's can give their best utility for Ultra Books and can be used for Ultra Books in very efficient manner because Ultra Books have very rich properties for touch and sensor support and these API's are quiet useful in making best use of these properties. In this app have included touch support in which user can play this game just by touching both boards and they can also use key input from key board to move the boards.
- Instead of two board 4 board can be added in future versions and then four player can play this game at a time just by saving he ball of their side just by touching the board.
- Timer restriction will be made in this game like if there will be 4 miss by any player then he will be out if the game.
- 18/10/2012-First Entry
- 19/10/2012-Enabled Touch Input Properties
- 20/10/2012-Enable Light sensing
- 20/10/2012-Enable Accelerometer