Click here to Skip to main content
Click here to Skip to main content

I Survived - Windows 8 Store app

By , 9 Nov 2012
 

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.

 

Introduction

I Survived creates global leaderboards in several categories allowing for competition among thrill seekers or simply for personal data collection using Ultrabook technology.

Background

I Survived uses the sensors available in Ultrabooks to enable a global leaderboard of data. The lack of extra bulk in dimensions and weight combined with the power of Ultrabooks match perfectly with the speed and power ideals of those who are Surviving. The solid state drives found in most Ultrabooks are less prone to failure under the extreme forces that can cause on mechanical devices like traditional hard drives. Voice Controls allow for hands free application navigation so the user can focus on their own navigation as they produce extreme forces. The Ultrabook sensors like the accelerometer, compass, gyroscope, and GPS allow for the capture and accurate measurement of Forces and supporting data. Windows Azure Mobile Services supports the leaderboard features where users can compete in many categories.

Pulling G's a global competition of G Forces

Pulling G's a global competition of G Forces

Using the code

The basics of this application on Windows 8 comes from the accelerometer sensor but other sensors will be used for supporting data.

_accelerometer.ReadingChanged -= 
   new TypedEventHandler<Accelerometer, AccelerometerReadingChangedEventArgs>(ReadingChanged);

async private void ReadingChanged(object sender, AccelerometerReadingChangedEventArgs e)
{
    await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
    {
        AccelerometerReading reading = e.Reading;

	if(xMax < reading.AccelerationX)
	{
		xMax=reading.AccelerationX;
	}

	if(yMax < reading.AccelerationY)
	{
		yMax=reading.AccelerationY;
	}

	if(zMax < reading.AccelerationZ)
	{
		zMax=reading.AccelerationZ;
	}

	if(xMin > reading.AccelerationX)
	{
		xMin=reading.AccelerationX;
	}

	if(yMin > reading.AccelerationY)
	{
		yMin=reading.AccelerationY;
	}

	if(zMin > reading.AccelerationZ)
	{
		zMin=reading.AccelerationZ;
	}
               
    });
}

Points of Interest

The simulator in Visual Studio 2012 Express for Windows 8 apps does not include any sensor data which was disappointing, hopefully they will include this in an upcoming release. The ability to import or record sensor data through the simulator would be very helpful when developing these applications. I was lucky enough to have a device with an accelerometer however. Testing my app has been pretty interesting and my wife has been giving me some really weird looks as I swing my computer around wildly tryingn is  to make my own G-Force's. This is where the simulator would be good, I'd be able to press a button to simulate some action like a race car going around a tight corner rather than having to swing my computer around. I'm a HTML5/JS developer and am coming over to use C#/XAML for this Windows 8 projects and one thing I've been running into is the inconsistency between the XAML WinRT controls and the controls available in the WinJS library. Hopefully they will rectify that as time goes on and make the same controls and features available in all languages.

Another limitation is that many consumer devisces only support up to 2 g's on the accelerometer while others go much higher.

History

  • 10/15/2012: Initialized article.

License

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

About the Author

giantveggie
Software Developer (Senior)
United States United States
Member
Software Developer making apps for Windows 8, Windows Phone, Android and Blackberry. Learned to code when I was 12 applying 'mods' to BBS source code in the late 80's and still clicking away. Web developer by day and app developer by night, I do this all day long.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 5memberrgawdzik16 Oct '12 - 11:38 

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 10 Nov 2012
Article Copyright 2012 by giantveggie
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid