Shooting Range Augmented Reality App

SplashScreenImage

As I work on the ‘tasks & quests’ for “Goblin Harvest” I am consistently hit by the opportunities for Games & Apps that take advantage of Augmented Reality.  This one is a bit of a ‘tester’ that I am hoping to have ready for BUILD and revolves around the concept of a shooting gallery (Inspiration – Inspector Callaghan in Magnum Force!) 

The idea is straightforward – you get points for shooting bad guys and you lose points for shooting good guys.  Each session in the range lasts one minute.

I have a number of levels planned which revolve around the following parameters:

  1. Expanding the number of Shooting Targets
  2. Reducing the ‘time standing’ for targets.
  3. Increasing the number of good targets that closely resemble bad targets(
  4. Expanding the width of the shooting range (level 1 being all in front of you with subsequent levels taking in more of your 360 degree panorama)

With all the above being driven through an XML file.  If the game proves popular I will add the ability to add your own targets and parameterise the variables from within the game.

All in all this has resulted in several 12-14 hour days as my enthusiasm demands and while maybe not quite the same as a trip to Prague (http://www.allpraha.com/d/33581/Magnum_Shooting_Range/)  great fun nevertheless!

Shooting Range Augmented Reality game–under development

Beta Testing

Send me your email if you would like to beta test this app and have a Windows Phone that supports motion (NB As I write this these are only in the hands of reviewers and developers)

Thanks to the family for support and not shooting ME

[tweetmeme only_single=”false”]

Marketplace Test Kit Walkthrough

Use the following steps to open the test kit.

  1. In Visual Studio, open a Windows Phone application solution that targets Windows Phone OS 7.1 or later.
  2. In Solution Explorer, select the project you want to test.
  3. On the Project menu, choose the Open Marketplace Test Kit option.

image

What Will the Test Kit Tell Me?


Running the test kit on your application will help you determine whether or not the application will pass Marketplace certification. If a test fails, the test kit provides details about what you need to fix in the application prior to submitting it for Marketplace evaluation. The following lists some of the tests in the test kit.

  • Whether the images provided meets certification guidelines
  • What capabilities the application uses
  • Whether the application screenshots meet the certification guidelines
  • Whether the XAP meets size guidelines
  • Whether the application starts quickly enough to meet certification guidelines
  • If the application does not exceed memory usage requirements
  • Proper use of the back button in the application
  • Application responsiveness
  • Whether the application closes properly

Overview of Tests in the Test Kit


The tests in the test kit are categorized by whether they can be run automatically or need partial or full participation from a developer. Each tab in the test kit contains either the application details or a category of test. Each test category lists a series of tests with a name and description. The test kit contains the follow tabs.

  • Application Details
  • Automated Tests
  • Monitored Tests
  • Manual Tests

The following sections discuss these tabs in more detail.

 

Application Details

The Applications Details tab lists the application package and enables you to specify images that will be evaluated later in the testing procedure (see the screen shot at the start of this article for an example)

The Application package box lists the path to the application package (XAP file) for your application, which by default is the BinRelease folder of the currently selected project. .

The Applications Details tab also enables you to specify the images that will represent your application in the Marketplace. These images will be tested as part of the test kit. If you do not specify the required images, your application will not pass the tests in the test kit. The following table lists the images that you can specify.

image

image

Automated Tests

The Automated Tests tab provides tests that evaluate the basic criteria of your application, such as application size, capabilities required by your application, and the presence and size of application images.

NB Note that the project needs to be built in release mode in order to run these tests:

  image

You run the tests by clicking the Run Tests button. When the tests complete, you will receive a pass or fail result for each test. You will also receive a description of the test and any error messages that are relevant. You can use the results of the Capability Validation test to update the WMAppManifest.xml file with the correct information.  If a test fails you should use the provided information to fix the issue and run the tests again. You should repeat this process until your application has passed all the tests in this section.

My initial automated test results give detail on changes required prior to marketplace submission:

image(Click on above image to enlarge)

Monitored Tests

The Monitored Tests tab provides a suite of tests that analyse the performance and reliability of your application during use on a device.

image(Click on above image to enlarge)

NB the above results come from an HD7 running the development release of Mango.

Manual Tests

The Manual Tests tab provides a series of test cases that you should complete with your application running on a Window Phone device:

image

This essentially provides a checklist of manual tests which you manage yourself via a dropdown box in the first column:

image

This should help improve on the quality of apps submitted to the marketplace if used correctly.  It should also ease the burden on the testers in the marketplace ingestion process!

[tweetmeme only_single=”false”]

Tip – Windows Phone Mango Training Videos

There are a great series of training videos available from those nice people at MSDEV at http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=174   If you get the chance (and you have the bandwidth) I would urge you to watch them online now.

However, if you are like me (bandwidth and time challenged) then you might want to download them for viewing later.  Two options present themselves:

The first is to go into the download page of each video and download them in your browser (that can be a little time consuming).

The second is the essence of this tip and involves using a third party application called “free download manager”

image

I use this app all the time for batch downloading of all sorts of files.  One of the useful features that I often take advantage of is the option to download a list of files from the clipboard (CTRL+SHIFT+V).

For this particular series I noticed that the urls for all the videos were consecutive, so I simply copied the first one to notepad and replicated the rest of the links myself:

http://www.msdev.com/Directory/Attend.aspx?eventId=1999
http://www.msdev.com/Directory/Attend.aspx?eventId=2000
http://www.msdev.com/Directory/Attend.aspx?eventId=2000
http://www.msdev.com/Directory/Attend.aspx?eventId=2001
http://www.msdev.com/Directory/Attend.aspx?eventId=2002
http://www.msdev.com/Directory/Attend.aspx?eventId=2003
http://www.msdev.com/Directory/Attend.aspx?eventId=2004
http://www.msdev.com/Directory/Attend.aspx?eventId=2005
http://www.msdev.com/Directory/Attend.aspx?eventId=2006
http://www.msdev.com/Directory/Attend.aspx?eventId=2007
http://www.msdev.com/Directory/Attend.aspx?eventId=2008
http://www.msdev.com/Directory/Attend.aspx?eventId=2009
http://www.msdev.com/Directory/Attend.aspx?eventId=2010
http://www.msdev.com/Directory/Attend.aspx?eventId=2011
http://www.msdev.com/Directory/Attend.aspx?eventId=2012
http://www.msdev.com/Directory/Attend.aspx?eventId=2013
http://www.msdev.com/Directory/Attend.aspx?eventId=2014
http://www.msdev.com/Directory/Attend.aspx?eventId=2015
http://www.msdev.com/Directory/Attend.aspx?eventId=2016
http://www.msdev.com/Directory/Attend.aspx?eventId=2017

So it was then simply a case of copying the above links to the clipboard (Select All then CTRL+C), firing up “Free Download Manager” and using CTRL+SHIFT+V to begin the downloads in the background.  I can now get on with other work until I am notified that the downloads are complete.  I hope you find this tip useful.

You can download Free Download Manager from here: http://fileforum.betanews.com/detail/Free-Download-Manager/1090197761/1

And just in case you are a little lazy, here are the titles of the videos (hosted by none other than Adam Kinney):

MSDN How Do I: Use the new features in the Window Phone Emulator and Tools?
MSDN How Do I: Use the Windows Phone Profiler?
MSDN How Do I: Work with the Execution Model?
MSDN How Do I: Use the new Bing Tasks?
MSDN How Do I: Access Contacts and Appointments Data?
MSDN How Do I: Use Toast, Tile and Raw Notifications?
MSDN How Do I: Update Tiles and Use Secondary Tiles?
MSDN How Do I: Use the System Tray features?
MSDN How Do I: Use the Search Extensibility features?
MSDN How Do I: Combine Silverlight and XNA?
MSDN How Do I: Programmatically Access Camera Features?
MSDN How Do I: Create an Augmented Reality Application?
MSDN How Do I: Use the WebBrowser Control?
MSDN How Do I: Use HTML5 in the WebBrowser Control?
MSDN How Do I: Use the RichTextBox control?
MSDN How Do I: Localize an Application?
MSDN How Do I: Work with a Local Database?
MSDN How Do I: Communicate with Sockets?
MSDN How Do I: Access OData Resources?

[tweetmeme only_single=”false”]

Filtering your wp7 App Hub Data in Excel

With the new update to the App Hub comes the option to download your data for offline analysis.

One of the most effective ways to do this is also one of the quickest.  Utilise two of Excels’ built in analysis features – “autosum” and “autofilter” by following the following two videos which show this can be achieved within a matter of seconds. (With apologies if I am teaching Granny to suck eggs).

This will then allow you to ask questions of your data such as:

  • How many paid version of a particular app have been downloaded?
  • Which Country is the primary user of my apps?
  • Which apps are the most popular?
  • What is the ratio of free to trial to paid apps ?

(and many more …)

Creating an autosum field

AutoSum Exported Data
AutoFilter Exported Data

NB To filter by date simply bring down only the data required and go through the two steps above again.

 

No doubt we will see a multitude of Excel templates that make detailed analysis of this data  a breeze, but for a quick and dirty analysis you can’t beat the basics of this method!

New App Hub Submission Walk Through

 

Anyone logging in to the new hub will be greeted with a prompt to agree to a new set of terms and conditions

image

and on acceptance will be welcomed to what at first appears to be the standard hub (the basic homepage remains the same).  But then the fun begins with the new Phone option (accessed from the ‘My Dashboard’ menu):

image

As can be seen above the reports have been enhanced and a number of summary and detail reports follow by way of example:

image

NB There is an option to export the data to Excel which opens the door to a wealth of other reporting options:

image

(Sad perhaps that this was my most successful app!)

From the App Highlight pane the following can be obtained:

1. Detailed download reports on each app (as above), with further details available such as the current status of an app within the ingestion process:

image

2. Daily crash report (with stack traces available as Excel Spreadsheet downloads – see below)

image
Stack Trace Data in Excel – Click to enlarge

 

Submitting an App

Clicking on ‘submit an app’ reveals the following screen:

image

(Note the option for the Private Beta – see my other post for a walk through of a Mango App)

The page that follows represents a ‘cleaned up’ version of a previous app hub submission at this stage:

image

Note the option to describe what has changed for this update.

Another useful addition is an option to ‘see how these images are used’ :

Pricing and Region availability also gets a facelift:

image

and finally a new option to submit but make hidden:

image

image

A nice touch is a direct link to the lifecycle page shown previously.

WP7 Launchers – Mango (Windows Phone 7.1)

Launchers are a set of APIs that Windows Phone applications can use to enable common tasks such as making a phone call or sending an email. Unlike Choosers, Launchers do not return a value back to the calling application.

If you are developing an application that uses a Launcher or Chooser, you should be aware that these features behave differently on a physical device and on Windows Phone Emulator. For a detailed list of the behaviour of each Launcher and Chooser in both environments, see Launcher and Chooser Support in Windows Phone Emulator.

This topic contains information about the following launchers:

  • BingMapsDirectionsTask

  • BingMapsTask

  • EmailComposeTask

  • MarketplaceDetailTask

  • MarketplaceHubTask

  • MarketplaceReviewTask

  • MarketplaceSearchTask

  • MediaPlayerLauncher

  • PhoneCallTask

  • SearchTask

  • SmsComposeTask

  • ShareLinkTask

  • ShareStatusTask

  • WebBrowserTask

Using Launchers in Your Application


The Launcher APIs belong to the Microsoft.Phone.Tasks namespace. You need to add a using directive for this namespace to the PhoneApplicationPage class file. All of the Launcher APIs function in a similar manner. First, you create an instance of the Launcher class you want to use. Next, you set properties of the Launcher object that will determine the behaviour of the task application when it is invoked. For example, you can specify a phone number that will be displayed when the Phone application launches. Finally, you call the Launcher’s Show method to launch the task application.

It is important to note that when you use a Launcher, a separate application is launched to complete the task. For example, the EmailComposeTask invokes the Messaging application. When the separate application is launched, your application is deactivated and is no longer running. After completing the task, the user can return to your application, at which point it is reactivated. For information about handling the activation and deactivation of your application see, Execution Model for Windows Phone.

BingMapsDirectionsTask

BingMapsDirectionsTask launches the Bing Maps application and displays driving directions between two points. If you do not set the start or end point, Bing Maps will use the user’s current location for the one that is not set. If you omit both the start and the end point, an exception will be thrown when you call Show().

The start and end points are LabeledMapLocation objects that contain a string label and a GeoCoordinate specifying the latitude and longitude of the location. You must add a reference to the System.Device assembly to your project and include the using directive referencing the System.Device.Location namespace to your page in order to access the GeoCoordinate API.

BingMapsDirectionsTask bingMapsDirectionsTask = new BingMapsDirectionsTask();         
GeoCoordinate spaceNeedleLocation = new GeoCoordinate(47.6204,-122.3493);
LabeledMapLocation spaceNeedleLML = new LabeledMapLocation("Space Needle", spaceNeedleLocation);
bingMapsDirectionsTask.End = spaceNeedleLML;
// bingMapsDirectionsTask.Start is not set. The user’s current location is used as the start point.
bingMapsDirectionsTask.Show();

BingMapsTask

BingMapsTask launches the Bing Maps application. You can optionally set a Center point for the map that is displayed. If you do not set this property, the user’s current location is used as the center point of the map. You can also provide a search string that will be used to mark locations on the map. The ZoomLevel parameter allows you to specify the zoom level that is initially displayed when the map is shown.

The center point is specified using a GeoCoordinate object. You must add a reference to the System.Device assembly to your project and include the using directive referencing the System.Device.Location namespace to your page to access the GeoCoordinate API.

BingMapsTask bingMapsTask = new BingMapsTask();
// Omit the Center property to use the user’s current location.
// bingMapsTask.Center = new GeoCoordinate(47.6204, -122.3493);
bingMapsTask.SearchTerm = "coffee";
bingMapsTask.ZoomLevel = 2;

EmailComposeTask

EmailComposeTask launches the Email application, which displays a new email message. You can optionally specify recipients, a message subject, and a message body that are prepopulated in the new message. You can also specify a code page for the new message. The message is not sent until it is initiated by the user.

EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.Subject = "message subject"; 
emailComposeTask.Body = "message body";
emailComposeTask.To = "recipient@webservicesuk.com";
emailComposeTask.Cc = "cc@example.com";
emailComposeTask.Bcc = "bcc@example.com";
emailComposeTask.Show();

MarketplaceDetailTask

MarketplaceDetailTask launches the Windows Phone Marketplace client application, which then shows the details page for a product specified by the unique identifier you provide. If you do not provide an identifier, the details page for the calling application is shown. The only allowed value for the ContentType property is Applications.

// Show an application, using the default ContentType.
MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentIdentifier = "<ID>";
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
marketplaceDetailTask.Show();

MarketplaceHubTask

MarketplaceHubTask launches the Windows Phone Marketplace client application. Set the ContentType property to a value from the MarketplaceContentType enumeration to launch the Hub to a particular type of content.

MarketplaceHubTask marketplaceHubTask = new MarketplaceHubTask();

marketplaceHubTask.ContentType = MarketplaceContentType.Music;

marketplaceHubTask.Show();

MarketplaceReviewTask

MarketplaceReviewTask launches the Windows Phone Marketplace client application, which then displays the review page for your application.

MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();

marketplaceReviewTask.Show();

MarketplaceSearchTask

MarketplaceSearchTask launches the Windows Phone Marketplace client application, which then shows the search results based on search terms you provide. You must provide a value for the ContentType property to specify what type of content you are searching for unless you are searching for an application, which is the default content type.

To search for an application, use the following code.

//Search for an application, using the default ContentType.
MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask();
marketplaceSearchTask.SearchTerms = "Apple Watch";
marketplaceSearchTask.Show();

To search for an application author, use the following code.

//Search for an application, using the default ContentType.
MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask();
marketplaceSearchTask.SearchTerms = "Web Services UK";
marketplaceSearchTask.Show();

To search for a music item, use the following code.

//Search for a music item.
MarketplaceSearchTask marketplaceSearchTask = new MarketplaceSearchTask();
marketplaceSearchTask.ContentType = MarketplaceContentType.Music;
marketplaceSearchTask.SearchTerms = "Teenage Kicks";
marketplaceSearchTask.Show();

MediaPlayerLauncher

MediaPlayerLauncher launches the Media Player application and plays the media file you specify. Media files are stored in isolated storage when saved to disk by the application and are stored in the application’s installation directory if they are bundled into the applications .xap file. You must specify one of these locations using the MediaLocationType enumeration. You can optionally specify that one or more controls should be shown by the Media Player using bitwise OR combinations of the MediaPlaybackControls values. You can also specify a preferred orientation for the player when it is launched.

MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();

mediaPlayerLauncher.Media = new Uri("MyVideo.wmv", UriKind.Relative);

mediaPlayerLauncher.Location = MediaLocationType.Data;

mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause | MediaPlaybackControls.Stop;

mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape;

mediaPlayerLauncher.Show();

PhoneCallTask

PhoneCallTask launches the Phone application and displays the specified phone number and display name. The phone call is not placed until it is initiated by the user.

PhoneCallTask phoneCallTask = new PhoneCallTask();
phoneCallTask.PhoneNumber = "55555555555";
phoneCallTask.DisplayName = "Gage";
phoneCallTask.Show();

SearchTask

SearchTask launches the Search application and performs the search query you provide.

SearchTask searchTask = new SearchTask();
searchTask.SearchQuery = "XBox game trailers";
searchTask.Show();

ShareLinkTask

ShareLinkTask launches a dialog that enables the user to share a link on the social networks of their choice.

ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "Code Samples";
shareLinkTask.LinkUri = new Uri(http://rd3d2.wordpress.com, UriKind.Absolute);
shareLinkTask.Message = "Here is a blog all about Windows Phone.";
shareLinkTask.Show();

ShareStatusTask

ShareStatusTask launches a dialog that enables the user to share a status message on the social networks of their choice.

ShareStatusTask shareStatusTask = new ShareStatusTask();
shareStatusTask.Status = "This is my current status.";
shareStatusTask.Show();

SmsComposeTask

SmsComposeTask launches the Messaging application, which displays a new SMS message. You can optionally specify recipients and a message body that are prepopulated in the new message. The message is not sent until it is initiated by the user.

SmsComposeTask smsComposeTask = new SmsComposeTask();

smsComposeTask.To = "5555555555";

smsComposeTask.Body = "Check out this new app.";

smsComposeTask.Show();

WebBrowserTask

WebBrowserTask launches the Web browser and displays the URL you provide.

WebBrowserTask webBrowserTask = new WebBrowserTask();

webBrowserTask.Uri = new Uri("http://webservicesuk.com", UriKind.Absolute);

webBrowserTask.Show();

Goblin Harvest!

I have teamed up with Ian Williams (of Textise.Net and the Textise App fame) to work on a Windows Phone 7.1 strategy game to be called ‘Goblin Harvest’.  It’s my first real collaborative experience working on Windows Phone and I am pretty excited about it.

image

After several lengthy sessions (yes, down the pub) to hammer out ideas, the base graphics are done (OK still more work needed there!) and the gameplay is (almost fully) documented!

Coding has begun in earnest using the beta Mango SDK with a view to making this one of the first Mango based games to come out of the UK.image

Its a bit too early to discuss gameplay (developed by Ian Williams) safe to say that it  is tried and tested and already proving to be popular with local testers.

With a requirement to be able to view the whole board, but also to focus in on a specific areas of gameplay ‘pinch to zoom’ plays an important part in the design,  as does the rules engine that manages the randomised board layout – making every game unique.

Stand by for a Goblin Winter!

[tweetmeme only_single=”false”]