Windows Phone Resources
You still have time to get your game into the You've Got Game Sweepstakes before the February 29th deadline. For every game you create and publish a to the Windows Phone Marketplace, you get another entry for a chance at winning a Dell Alienware M18x laptop or an Xbox LIVE Gold Card.
Head over to http://aka.ms/ygg to find out more about the contest, how to enter, and what you can win. Rules are at http://bit.ly/YGGRules
I was talking with my good buddy Sam Stokes today about a group of students he is working with who are having some trouble with
saving the state of their applications. He was looking for a way to show them an example on a single page, just to get the concept across. As we often do, we loaded up a screen sharing session and created a new project to build a sample out.
To start with, we wanted to be able to show that the state was being saved, so we dropped a couple of controls onto the page.
We added event handlers for the OnNavigatedTo, and OnNavigatedFrom events. When we navigate to the page, we'll check to see if anything was saved and load the values. When we navigate away, we'll save everything to IsolatedStorage.
Y
If you want to take a look at the project in action, you can download the source code.
After we got the project up and going, I was inspired to build another project that shows how to use the application events to support Fast Application Switching. I'll post more on that next.
Over the last couple months, I’ve been spending a lot of my time on the road presenting at at least a Phone Camp a week. We did nine cities in the West Region, and of those, I presented at seven. I also made it to a couple of Code Camps, and helped out at some of our other major events like the HTML 5 Web Camp. If you didn’t get a chance to attend one of the camps, and want to see me in action, I was recorded at the Sunnyvale Phone Camp hosted at Nokia, and the recordings are available through the links below.
Part 1: Windows Phone 7.5 Overview for Developers
watch it here
Part 2: Building Windows Phone 7.5 Applications with Visual Studio 2010
watch it here (Me!)
Part 3: Building Windows Phone 7.5 Apps with Silverlight
Part 4: Windows Phone 7.5 Fast Application Switching, Tombstoning and Multitasking
Part 5: Live Tiles and Push Notifications
Part 6: Building Games for Windows Phone 7.5
Part 7: Monetizing a Windows Phone 7.5 Application
Being at all those camps was incredibly fun, but of course it meant that I was pretty busy. In the little free time that I had, I tried to keep up with the emails I had coming in, but I could only get so far each time before I had to rush off to the next event. Over the next few days I hope to get through the remainder of what I have sitting in my inbox, but if you haven’t heard back from me I recommend you send me a ping with the original email to bump yourself to the top of my inbox, since my process is to go from the newest emails back.
I also got a chance to meet some really cool people on the road, and hope to do some more events in some locations I hadn’t gotten much of a chance to visit like Portland. We’re working on the next series of events, including a few full day Game Development Camps where we’ll be going through how to get your game up and running using XNA, combining Silverlight and XNA, and going multi-platform. We’re still looking at whether we can get enough people in some of the cities, so if you want us to come to you, let me know.
The other thing I’m working on right now is getting my projects that I’ve been showing at all the camps to a point where they are ready to go online. Similar to the TriangleShooter series I posted starting about a year ago, I have a few other projects I will be chunking out into consumable slices. Of course, I still have the Language Learning Game, but I also have the first seven steps of an Augmented Reality sample in Silverlight, am working on the open source Geo Augmented Reality Toolkit over at http://gart.codeplex.com, a couple projects around the .NET Micro Framework using Netduino and Gadgeteer, and have four more projects that I will be putting into the marketplace and sharing code for. I’ll post updates here on my blog, and am working on recording video walkthroughs to be able to demonstrate everything more easily than screenshots, which is pretty important for samples like the Augmented Reality bit. I’m expecting to post at twice a week, with one of those posts being a continuation of whatever developer series I’m working towards.
If you are local to the Silicon Valley, tonight I’ll be at the Hacker Dojo for the final night of our “30 to Launch” event. I’ll be bringing some books to give away to the first people who ask me for them. I’ll also be at the Windows Phone Night Out on Wednesday in San Francisco. I won’t be able to bring books there, but I can see if I can bring something smaller with me to give out.
I’ve run a couple of phone camps so far, the largest and most in depth being the 2-day phone camp hosted by Nokia in Sunnyvale. At the camps, and during my work with developers and designers at other events, there are a number of resources that get requested quite often, so I wanted to put together a post that I can link to and point towards in the future. Please let me know if you think that I’m forgetting anything, and I’ll make sure to keep my list up to date.
Windows Phone Getting Started - http://aka.ms/wp7gs
Visit the Getting Started page to download the Windows Phone SDK, get more information on the Marketplace and how to monetize your apps and games, and explore the documentation and online communities.
Silverlight Toolkit - http://aka.ms/wp7sl
The Silverlight Toolkit includes some controls like the DatePicker and WrapPanel that you can drop into your application just like the tools that are included in the SDK. You can download a sample app as a xap that can be deployed to your device or the emulator to try out the included tools and see if they’re right for you.
Windows Azure Toolkit for Windows Phone - http://aka.ms/wp7wat
Put the cloud on your phone with the Windows Azure Toolkit. While the power and storage on mobile devices continue to increase, one of the most important things you get is an internet connection. By taking advantage of Windows Azure, your application back end can scale and grow with the needs of your users.
Geo Augmented Reality Toolkit (GART) - http://aka.ms/gart
Updates to the Windows Phone in 7.5 have opened up Augmented Reality possibilities through the live camera stream and motion API. The Geo AR Toolkit makes it possible to create location enabled AR applications without having to know Linear Algebra and geospatial math.
WP7 Tombstone Helper - http://aka.ms/wp7tsh
If you want to quickly and easily persist your application state to isolated storage, the Tombstone Helper might be just what you need. With a couple of lines of code, you can save and restore state and make it easier to allow users to come back to your application in a state they expect.
Join the Marketplace - http://aka.ms/wp7mp
Joining the Marketplace gives you the ability to submit your apps and games, as well as developer unlock up to three devices so you can test your project. Student developers registered through DreamSpark can join the Marketplace for free, and developer unlock one device. More information on DreamSpark below.
App Hub Forums - http://aka.ms/wp7forums
If you have questions, the forums are a great place to find answers. Between the Microsoft employees and community members who frequent the forums, you’re sure to get pointed in the right direction. Of course, remember that you can learn more by teaching someone than by being taught, so helping out others on the forums is a great way to increase your skills.
Windows Phone Developer Blog - http://aka.ms/wp7devblog
The Windows Phone Developer Blog is a great place to find out about developer programs, contests, device news, and to get the latest on what’s happening in the Windows Phone world, from the developer’s perspective.
Windows Phone How-To Index - http://aka.ms/wp7howto
If you want to do something on the Windows Phone and aren’t sure where to start, start here. Through the articles, you can pick up an understanding of any topic on the platform to jump start your own development.
BizSpark for Startups - http://www.bizspark.com
If you’re a startup and want to get some tools and support, BizSpark is made for you. Through the BizSpark program, you can get access to a suite of tools including an MSDN Premium subscription, access to Azure, production licenses, training, and more.
DreamSpark for Students - http://www.dreamspark.com
If you’re a student, you can register for DreamSpark and get a free Marketplace account to begin testing and deploying your phone apps and games. In addition, you can download free tools like Visual Studio Professional and Expression Studio Ultimate, and get access to training from Pluralsight On-Demand.
This week we’ll be starting a new game for the Windows Phone. We’ll be using Silverlight this time around, and building a language learning game. The idea behind the game is to make use of a database of words and meanings, pick a word, and give four possible definitions. I actually originally built the first version of this game in XNA, and when I redid it in Silverlight, the implementation ended up being much easier. This week, we’ll start with a new Silverlight project, and walk through what that gives you. We’ll also look at a source of graphics we’ll be using for the game.
To begin with, load up Visual Studio 2010 Express for Windows Phone, and choose File –> New Project, and under the Silverlight for Windows Phone templates, choose Windows Phone Application. In the Name field, type QuizGame, then click OK. You’ll get a new solution containing a single project with a few files. The basic structure a Silverlight application is a set of XAML files, containing markup that defines the user interface, and .cs files with code behind. In the MainPage.xaml file, you’ll get a visual desginer with a few elements in it. The layout is done through a Grid element containing a StackPanel with two TextBlocks. When you run the application, the emulator will pop up and display the application, looking something like the following:
The numbers on the right of the page is a frame rate counter. You can turn it on or off using the following line in the App.xaml.cs file’s constructor.
The other important files in the project are the ApplicationIcon.png file, the icon that will appear in the list of apps on the phone, Background.png, the image to display when your application is "pinned" to the Start screen, and SplashScreenImage.jpg, the splash screen that will be displayed when you launch the application.
We’ll be getting deeper into the XAML next week when we lay out the user interface. This week, we’ll finish off by looking at the source of images we’ll be using. There’s a great resource over at http://www.lostgarden.com/ where an artist occasionally posts sets of graphics like the one we will be using. The post in question is Danc's Miraculously Flexible Game Prototyping Tiles.
Here’s an example of the type of graphics we’ll be using.
See you next week, when we’ll set up the game interface.