Mini Code Camp

I’m doing an awesome one-night mini-code camp on August 21st. Pascal Rettig (@cykod), organizer of the Boston HTML5 Game Development meetup group, is giving me the floor to show you how to bring your awesome HTML5 skills to the fastest growing mobile platform, Windows Phone. Go here to sign up, it’s free

Before I explain what I’ll be showing you, check out the prizes I am giving away…

Awesome Giveaways!

I will be giving away some great stuff, including:

  • Bunch of swag (Swiss Army computer backpack, Purity In-Ear headphones, reprogrammable NFC stickers, t-shirts and more)
  • Nokia Lumia 822 (SIM unlocked!)
  • Nokia Lumia 920 (Engadget “Smartphone of the Year” for 2012)

Everyone who attends will get the following:

  • One-on-one attention to help build your app
  • Nokia Premium Developer Program token ($1500 value, contains a Microsoft developer license to unlock phones and publish to the store) when you email me your first app.
  • A Nokia Lumia 800 (or 900) when the app is live in the Store (you use the token above to pay for your developer account, then you can publish your app globally)

What Is This Mini Code Camp About?

I’ll be showing you how easy it is to build a native HTML5/JS game for Windows Phone. You can literally drag and drop your existing HTML5 game into a native Windows Phone app. If your game works on IE10 on a pc, 99% of the time it will work on the phone. Why? Because you are still developing for IE10 on the phone. Here is the break down of my presentation:

  1. 15-20 minutes: Intro– I’ll introduce myself and explain all the different free giveaways, rewards and resources that are available to you. Here is just some of the items I’ll guide you through to get
    1. Join Dvlup Nokia’s developer rewards program (its free. Get a loaner phone to help you develop your app and get real life rewards like computers, phones, hardware, gift cards and much more. You can even get featured global WP Store placement!) Here is my profile.
    2. Nokia’s powerful Marketing In a Box. You get free professional marketing assets. Check out my last promo video, you’ll get one too
    3. Show you how to get great revenue from your app (in app purchasing is super-easy to do in WP8. literally a few lines of code)
  2. 15 minutes: Code demo– Using an existing HTML5 game, I will show you how to bring your existing game into a WP8 app. Literally just a couple steps. You will all get the full source code and slides for the demos
  3. First Giveaway! – I will raffle off a pair of great Purity In-Ear Headphones and a Wenger Swiss Army TSA ready computer backpack
  4. Break: Eat! I will also provide on-on-one help on installing the WP8 SDK on your machine. I’ll be bringing the SDK on USB drives as well.
  5. 15 minutes: Using middleware- I will demo using the Unity3D game engine and deploying to the phone. The Unity3D editor is now free for Windows Phone 8 development. If you have an existing Unity3D game, you’re going to love this mini-session.
  6. 10 minutes: Questions/Answers- Ask me anything!
  7. Giveaway Time! – I will raffle off the Nokia Lumia 822, built for Verizon, but is SIM unlocked!

Prepare

I recommend that you install the SDK on your PC before coming to the event. You’ll be able to follow along during the group. It also will let you find any problems during installation that you may need help with. One of the requirements on building Windows Phone 8 and Windows 8 apps is that you need to be running Windows 8. You can do this in a VM if you need to. There are some great articles on how to set your VM up. If you are using a Mac, you can use Parallels or Bootcamp.

I have a blog post that will step you through setting up the SDK, and also building your first app in minutes. If you have any trouble, please send me an email and I will help you every step of the way.

I look forward to seeing you there!

Lance

From The Ground Up

This post is to get you started on Windows Phone Development “from the ground up” and is targeted towards people who have no prior experience with the Windows Phone SDK.  At any time you can refer to my resources page for additional links to WPDev assets, tutorials and example code.

Ok, let’s begin.

The first thing you should know is that is does not cost a penny to develop for Windows Phone! The SDK and the tools are free. The only time you will need to pay is when you sign up for your Microsoft DevCenter account. The DevCenter is your portal to the Windows Phone Store. It is where you will submit, update and track your apps. I can help mitigate those costs for you. If you are an Android or iOS Developer and are porting an app, or a true “from the ground up” developer,  I will pay for your first year’s DevCenter fee. Contact me for details.

Now, we need to go over some minimum requirements that you’ll need to meet in order to use the different versions of the SDK.

Step 1: Minimum Environment Requirements

Windows Phone 8 SDK: If you are looking to write Windows Phone 8 (WP8) apps, here are the minimum requirements. If you do not have access to a Windows 8 (Win8) machine or cannot upgrade your machine to Win8, you can install and run Win8 in a VM. If you install the WP8 SDK, you also can develop for Windows Phone 7.x (WP7).

Supported operating systems: Windows 8, Windows 8 Pro

Operating system type:

  • Windows 8 64-bit (x64) client versions

Hardware:

  • 6.5 GB of free hard disk space
  • 4 GB RAM
  • 64-bit (x64) CPU

Windows Phone 8 Emulator:

  • Windows 8 Pro edition or greater
  • Requires a processor that supports Second Level Address Translation (SLAT)

If your computer meets the hardware and operating system requirements, but does not meet the requirements for the Windows Phone 8 Emulator, the Windows Phone SDK 8.0 will install and run. However, the Windows Phone 8 Emulator will not function but you can still deploy to a physical phone!

Windows Phone 7 SDK: Whenever I reference Windows Phone 7 in my posts, I am speaking about Windows Phone 7.1 (AKA Mango/Tango).

Supported operating systems: Windows 7, Windows Vista

  • Windows® Vista® (x86 and x64) with Service Pack 2 – all editions except Starter Edition
  • Windows 7 (x86 and x64) – all editions except Starter Edition
  • Installation requires 4 GB of free disk space on the system drive.
  • 3 GB RAM
  • Windows Phone Emulator requires a DirectX 10 or above capable graphics card with a WDDM 1.1 driver

The Windows Phone SDK 7.1 is compatible with the final version of Visual Studio 2010 SP1.

Step 2: Download and install the SDK

In the links below it is very important to read the “Overview” section before installing the SDKs. There are nuances that may apply to you and are good to know in general. The download you’ll get is a small file that when run will start the installation. You will need a data connection to install, however if you don’t have a connection, you can alternatively download an ISO version.

Windows Phone 8 SDK (download it from here):

  • Choose the language version you want to install and click the Download button for the WPexpress_full.exe file. Follow the instructions to install the SDK. Note that each localized version of Windows Phone SDK 8.0 is designed to function with the corresponding localized operating system and localized version of Visual Studio 2012.  Note – Windows Phone SDK 8.0 installs side-by-side with previous versions of the Windows Phone SDK. You don’t need to uninstall previous versions before beginning this installation.
  • Download the release notes which are in a separate file. For Windows Phone SDK 8.0 documentation and samples, see theWindows Phone Dev Center.
  • To start VS Express for Windows Phone, click the application in the Apps list. If you have Visual Studio Professional, Premium or Ultimate installed on the computer, the VS Express for Windows Phone shortcut won’t appear. Instead, start your Visual Studio instance as usual and then create Windows Phone SDK 8.0 projects using the installed Windows Phone templates.
  • If you try to run a project in Windows Phone Emulator and Hyper-V is not enabled, you will be prompted to turn on Hyper-V. Turning on Hyper-V requires you to restart your computer.

Note: this release is also available in .iso format. Choose one of the following options for handling downloaded ISO images:

  • (Recommended) Write the image file to a blank DVD.
  • (Alternative) Mount the image file virtually as DVD devices.

For more information about these options, see “What are ISO image files and how do I use them?” on the FAQ page.

Windows Phone 7 SDK (Get the 7.1 SDK here and the 7.1.1 SDK here)

There are two SDKs for WP7 development, the first one (7.1) is the full SDK and the second (7.1.1) is an update that adds support to develop for low memory devices. Install 7.1 first, then download and install 7.1.1 immediately afterwards. The 7.1.1 update adds an additional emulator with a lower memory cap (256MB). Windows Phone has low end devices in a lot of “emerging markets”. This is a huge opportunity for you to reach millions of devices.

Instructions for the 7.1 SDK (Do this one first):

If a pre-release version of the Windows Phone SDK 7.1 (Beta or RC) is installed on the machine, please uninstall it before installing this product. 
Click on the vm_web2.exe file in the download section above. This will start the installation of Windows Phone SDK 7.1 and install necessary components on your computer.
Please refer to the Release Notes in the download section above for additional details before running setup.
Note: this release is also available in .iso format.
Choose one of the following options for handling downloaded ISO images:

  • (Recommended) Write the image file to a blank DVD.
  • (Alternative) Mount the image file virtually as DVD devices.

For more information about these options, see “What are ISO image files and how do I use them?” on the FAQ page.

Instructions for the 7.1.1 SDK update (Do this one second):

Windows Phone SDK 7.1 must be installed on your computer before you can install Windows Phone SDK 7.1.1. For more information, see Installing Windows Phone SDK.
To install Windows Phone SDK 7.1.1 Update, click the Download button for WPSDK-7.1.1-KB2669191-x86.exe file, and then follow the instructions to install the SDK.

Note: This update configures a 256-MB emulator and a 512-MB emulator as part of the installation, and so might take longer to install than a typical SDK.

Step 3: Fire it up!

Congratulations! Now that you have the environment and tools installed, you are ready to roll. You may be asking yourself, “What do I do now?”. That’s a good question. To answer it, I will have you  write your very first Windows Phone app. My instructions from now on will be using the Windows Phone 8 SDK, most of the steps are the same. If you are using the WP7 SDK and something doesn’t make sense to you, contact me and I’ll give you a custom lesson.

  • Open Visual Studio Express (If you already have Visual Studio installed on your machine, use it instead of the Express version)
  • Go to File > New > Project
  • In the window that just opened select the following

StepsForNewPanoApp

  1. Make sure you have Windows Phone selected
  2. Select Windows Phone Panorama App
  3. Name your project
  4. Click OK.

Visual Studio will now ask you to choose a Windows Phone version. There is one thing you should know at this point. If you build an app as a WP7 app, it will work on WP7 and WP8 devices. If you build a WP8 app, it will only work on WP8 devices. In most basic scenarios, you should choose WP7 (7.1) and then update your app to WP8 afterwards. You will only be able to target WP8 if you need a feature that only WP8 offers (ex. NFC, Bluetooth, etc).

TargetVersionSS

Once you click OK, Visual Studio will automatically generate all the files you need to run and deploy the app. In fact, this app you just created is ready to build and deploy. Complete with example data and ViewModel!

Step 4: Build and Deploy

Now that you’ve got a project open in Visual Studio and it is ready to be deployed to an emulator or device (you can debug/deploy to a developer unlocked device via USB cable), it’s time to build and debug. Familiarize yourself with the image below (full size image):

VS2012ui

I always say the best lesson is the one you did hands-on, so go ahead and click the little green debug arrow to debug your project. If the emulator isn’t already open, Visual Studio will fire it up for you. If this is your first time running the emulator, Windows 8 will ask for Hyper-V permission, this only happens once. Once that’s done, your app will launch inside the emulator.

It will take some time to become more familiar with the process involved and learn more about the infrastructure of a Windows Phone app, but you are on your way. Congrats, you are now officially a Windows Phone developer.