Counting Down to Seven

Counting Down to Seven: XNA Game Studio 4.0!!!!

by Joey deVilla on March 9, 2010

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

Xbox 360 Achievement: "Achievement Unlocked: New Version of XNA!"

"Counting Down to Seven" badge

The Game Developers Conference is a good time to make game development announcements, and that we did: version 4.0 of XNA Game Studio, Microsoft’s framework and toolset for easier game development. Here’s what it means in a nutshell:

  • No matter whether you develop with managed or unmanaged code, it’s what you’ll use for game development on Windows Phone 7.
  • You’ll create better mobile games faster, thanks to a powerful and comprehensive set of tools.
  • Xbox LIVE comes to mobile, meaning that you can take advantage of the Xbox’s popular gaming social network.
  • For those of you already building games with XNA, you’ve got a brand new platform, and it’s one that you take everywhere you go.

Games pages on Windows Phone 7

You’re going to see all sorts of details about XNA Game Studio 4.0 over the next couple of weeks, and here are some of the best places to get them…

Follow the “Seven Samurai”

By “Seven Samurai”, I’m referring to the Windows Phone 7 Series development team:

Check Out These Sites

This article also appears in Canadian Developer Connection.

{ 1 comment }

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

"Counting Down to Seven" badgeIf you’re a developer itching to get started writing apps for Windows Phone 7, you’re going to want to follow Charlie Kindel’s blog and Twitter stream (as well as Yours Truly and this blog, of course). Charlie’s one of the developers on the Windows Phone team, and while he won’t be delivering the first presentation on WP7 at MIX10 (Windows Phone’s VP Program Management Joe Belfiore will do that), he’ll be delivering the first technical presentation later that day.

The video above shows an interview that’s as informal as it gets. It’s a hand-held camera interview featuring CNET’s Ina Fried and Charlie on the Embarcadero in San Francisco, talking about what Windows Phone 7 will be like for developers, with Charlie demonstrating on his Windows Phone 7 prototype. I’d love to get my grubby paws on one of those!

This article also appears in Canadian Developer Connection.

{ 0 comments }

Get Microsoft Silverlight
Don’t have Silverlight? Get it here or download the video in
MP4, WMA, WMV, WMV (High) or Zune format.

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

"Counting Down to Seven" badgeWe’re a week away from the start of the MIX10 conference! I like to refer to this as Microsoft’s most “right-brained” gathering, as its target audience and topic isn’t just developers and writing software, but designers, design and user experience.

With designers and design in mind, it’s only fitting that I show you a video featuring Nic Fillingham interviewing a couple of Microsoft User Experience gurus who also hail from Canada:

  • Bill Buxton: He’s a Principal Researcher for Microsoft Research, and before that, he was Chief Scientist at Alias Wavefront and a professor at University of Toronto. And I’m pleased to report that he got his bachelor’s degree – in music – from my alma mater, Crazy Go Nuts University (which some of you may know as Queen’s University). He was the guy who thought of applying Fitts’ Law to human-computer interaction, did some pioneering work with multi-touch interfaces and invented the pie menu (which means that we owe weapon selection in Saints Row 2 and the full combat/spellcasting system in Dragon Age: Origins to him).
  • Albert Shum: He’s the Director of Mobile Experience Design for Windows Phone 7. Albert’s from Winnipeg, studied engineering and architecture at University of Waterloo and went on to do design work at Nike before joining Microsoft. You can watch a video showing him talking about the new Windows Phone 7 experience and the thinking behind it in a previous article of mine, Albert Shum on Windows Phone 7.

This article also appears in Canadian Developer Connection.

{ 0 comments }

Explore the software that powers the Windows Phone 7 Series. Free development tools and support for all MIX10 attendees.

"Counting Down to Seven" badgeWelcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

For the longest time, the sessions listed under “Windows Phone” at the MIX10 conference (taking place in Las Vegas from March 15th through 17th) have had no details – just a “more details coming soon” message. That changed yesterday, and now the sessions have full names and abstracts, which I’ve listed below in chronological order.

Monday

 
Changing Our Game: An Introduction to Windows Phone 7 Series
Joe Belfiore
Monday, March 15th
11:30 a.m.
Major changes are coming to Windows Phone! This session goes in-depth on the design and features of Windows Phone and gives a comprehensive picture of what’s coming in this exciting new release.

Joey’s note: Joe Belifiore is the VP Windows Phone 7 Program Management and the guy giving Laura Foy a walkthrough of the features in Windows Phone in that first Windows Phone video that got released during Mobile World Congress in Barcelona.

Overview of the Windows Phone 7 Series Application Platform
Charlie Kindel
Monday, March 15th
2:00 p.m.
The new Windows Phone is coming! Get a high-level overview of the new application platform and a complete picture of the developer story. Learn about the developer tools, the application frameworks, the support for Silverlight, and the support for XNA.

Joey’s note: Charlie isn’t exaggerating in his Twitter profile when he says that the future of application development for Windows Phones is in his hands.

Windows Phone UI and Design Language
Albert Shum
Monday, March 15th
3:30 p.m.
Windows Phone constitutes a dramatic new user experience paradigm. This session will provide prescriptive guidance, tips, and techniques on how designers & developers can build beautiful, compelling user experiences that are consistent with the built-in Windows Phone 7 Series experiences.

Joey’s note: Albert Shum is Director of Microsoft’s Mobile Experience Design Team. If you want to find out more about him, check out my article Albert Shum on Windows Phone 7.

Tuesday

 
Microsoft Silverlight “Media”: Moving at 60fps
Eric Schmidt
Tuesday, March 16th
11:00 a.m.
From HD delivery to dynamic advertising models, Silverlight has rapidly become the industry leader for enabling rich, interactive media scenarios. This session will review the media focused technology strategy behind Microsoft Silverlight, Microsoft Silverlight Media Framework, IIS Media Services, Microsoft Expression and Windows phone. Highlights for this session include: efficient media player development, 3-d rendering, real-time ad injection, leveraging multi-cast, managing large media delivery farms, choosing the right content protection strategy, real time media pipeline monitoring and a drill into what’s new in Silverlight 4. If you are building or want to build video based Silverlight applications this session will provide technical guidance and give you an opportunity to voice your needs about the future of media and Silverlight.

An Introduction to Developing Applications for Microsoft Silverlight
Shawn Oster
Tuesday, March 16th
11:00 a.m.

New to Silverlight? This is the session for you. This session will cover: how to get started building your first application, tooling, extensibility and deployment. We’ll also highlight the capabilities of Microsoft Silverlight on the PC, as well as support for Windows Phone.

Joey’s note: Shawn Oster is a Program Manager at Microsoft who works on Silverlight. One of his current projects in the Silverlight Toolkit, a way to give users new controls, fixes and updates at a rapid pace.

Building Windows Phone Applications with Silverlight, Part 1
Mike Harsh
Tuesday, March 16th
1:30 p.m.
Together with part 2, these sessions give an overview of the functionality for Silverlight applications that is unique to the Windows Phone application platform. Part 1 will cover new input paradigms including multi-touch, software keyboard, accelerometer and microphone, as well as the APIs to leverage phone applications like email, phone dialer, contact list and more.

Joey’s note: Mike is a Program Manager at Microsoft working on Silverlight.

Unit Testing Silverlight and Windows Phone 7 Applications
Jeff Wilcox
Tuesday, March 16th
2:05 p.m.

Learn how to create and maintain Silverlight and Windows Phone 7 Series applications using the Silverlight Unit Test Framework. See what tools are available to easily validate controls and application interfaces, add automatic testing to builds, and gain a solid understanding of test principles to deliver great experiences for your clients and customers.

Joey’s note: Jeff is a Senior Software Development Engineer at Microsoft, working on the Silverlight Toolkit. He is the creator of the Silverlight Unit Test Framework.

Building Windows Phone Applications with Silverlight, Part 2
Peter Torr
Tuesday, March 16th
3:00 p.m.

Together with part 1, these sessions give an overview of the functionality for Silverlight applications that is unique to the Windows Phone application platform. Part 2 will cover the new application model, updated control templates, themes, and services available to applications, including new Windows Phone web services.

Windows Phone Application Platform Architecture
Istvan Cseri
Tuesday, March 16th
4:30 p.m.

Windows Phone 7 Series represents a significant change from the past. The entire stack, starting with the operating system, user experience, and the application platform have been engineered to build a new class of phone that users will just love. This session will go under the covers and describe how to think about applications and games from the perspective of user experience, security, packaging, cloud services and performance. Details on the new application model, device capabilities, location, sensors, and other platform capabilities will be covered.

Silverlight Performance on Windows Phone
Seema Ramachandani
Tuesday, March 16th
4:30 p.m.

Learn how to optimize your Silverlight code for Windows Phone. This session will discuss common bottlenecks using the graphics and managed stacks, and will highlight how to optimize startup and reaction time.

Wednesday

 
Development and Debugging Tools for Building XNA Games for Windows Phone
Cullen Waters
Wednesday, March 17th
9:00 a.m.

This session covers tools available to the developer for building XNA games including debugging, emulation, and performance. Special emphasis is placed on best practices for managed code performance and .NET profiling tools you can use to optimize your games for Windows Phone.
Distributing and Monetizing Windows Phone Applications and Games
John Bruno and Todd Biggs
Wednesday, March 17th
10:30 a.m.

Windows Phone Marketplace will revolutionize distribution of Windows Phone applications, games, and content, and is designed to solve the two largest problems of the Windows Phone consumer-focused developer community: distribution and monetization. This session will provide application developers with the insights, tools, and processes necessary to begin distributing and monetizing their applications on the Windows Phone platform.

Building Windows Phone Games
Michael Klucher
Wednesday, March 17th
12:00 p.m.

With the release of Windows Phone, game developers will be able to create amazing content rapidly through the power of Silverlight and the XNA framework. This talk will outline the basic application model of Windows Phone, enumerate Windows Phone core device characteristics, and walk through highlights of Silverlight and XNA Frameworks on the phone.

Building a High Performance 3D Game for Windows Phone
Shawn Hargreaves and Tomas Vykruta
Wednesday, March 17th
1:30 p.m.

This session will detail how to use XNA to develop 3D games for Windows Phone, with a special eye towards the special characteristics of Windows Phone application platform. Special attention will be placed on optimizing high-performance managed code games for the platform, to help you squeeze out every last drop of performance.

Joey’s note: Shawn’s a developer on the XNA team and a character-at-large in the XNA Creators Club forums. Tomas is a Senior Software Development Engineer with Microsoft’s Advanced technology Group and a Senior Xbox Engineer.

Designing and Developing for the Rich Mobile Web
Joe Marini
Wednesday, March 17th
3:00 p.m.

The Mobile Web has been a long time in coming, and now that it’s here, it’s a force that you and your business can’t afford to ignore. What has made all of this possible is the combination of ever-more-powerful devices, fast network connections, and highly capable mobile browsers. In this session, you will learn how to build sites that work well and look great on Windows Phone and across mobile devices. We’ll cover the core mobile Web scenarios, preparing content for mobile, and tips and techniques for debugging and testing your sites.

Joey’s note: I would argue that the mobile web has been around for a couple of years now, but it’s nice to see it done properly on a Microsoft platform at long last.

 

This article also appears in Canadian Developer Connection.

{ 0 comments }

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

In my last article in the Counting Down to Seven series, I showed you Platformer, the game starter kit that comes with XNA, the toolset/framework for developing games for Windows, XBox and Zune:

image

Let me now show you this – Platformer running on Windows Phone 7:

That’s Microsoft’s Eric Rudder, Senior VP Technical Strategy demoing Platformer at the TechEd Middle East conference. Not only does Platformer play on Windows Phone, Windows, XBox and Zune, but he also demoed saving the game state on the phone and resuming it from the saved state on an Xbox 360.

Eric also showed that even though Platformer runs on a number of platforms, it’s based on a single codebase with slight platform-specific tweaks for the platforms it targets. This isn’t new: XNA has been about targeting Windows and Xbox 360 from the very beginning, and with version 3.0, the Zune was added to the set of target platforms.

Take a look at this screenshot of the Solution Explorer from Visual Studio 2008 with XNA 3.1 with a Platformer solution loaded. Note how the solution has three projects, one each for targeting Windows. Xbox 360 and Zune:

image

All three games share the same sounds, but the Windows and Xbox 360 versions use a set of higher-resolution graphics while the Zune version uses a lower-resolution set.

XNA also makes use of compiler directives to handle the differences between platforms. For example, here’s a code snippet from Platformer from the Player class, which manages the player’s character in the game:

Note how the Zune version has scaled-down values of those used in the Windows and Xbox 360 versions. That’s to account for the Zune’s smaller screen.

XNA on Windows Phone 7, with the ability to save game state on one platform and resume playing on another opens up a world of “ubiquitous gaming” possibilities. I hope that this will bring about some interesting mobile games and bring some attention to the XNA, which I always felt was underappreciated.

This article also appears in Canadian Developer Connection.

{ 3 comments }

Counting Down to Seven: Exploring XNA

by Joey deVilla on March 5, 2010

exploring xna largeCounting Down to Seven (Mar 15th at MIX 10): A series about ideas for mobile apps

Welcome to another article in the Counting Down to Seven series and the first article in the Exploring XNA series — it’s like the chocolate and peanut butter of mobile development!

If you haven’t read Windows Phone team member Charlie Kindel’s latest blog entry yet, do so now. In explaining what’s different in Windows Phone 7, he also lists some technologies that form it basis:

  • .NET
  • Silverlight
  • XNA
  • Web 2.0 standards
  • Microsoft’s developer tools

That’s right: along with Silverlight, one of the core elements of Windows Phone 7 is XNA, the toolset that makes it quite easy to build games for the PC, Xbox 360 and Zune. Kudos to those of you who ratiocinated that Silverlight and XNA would figure into Windows Phone: both are proven user interface technologies that have also shown that they’re capable of living on different platforms.

I’ll cover each of the core elements of Windows Phone 7 in the fullness of time, but for now, why don’t we start with what I consider to be the really fun one – XNA?

(It’s not only fun – it’s the gateway to customers: according to eMarketer, the number of people who play games on their phone has more than doubled in the past couple of years, from 155 million in 2007 to a predicted 340 million by the end of 2010.)

XNA: A Quick Overview

In the venerable geek tradition of using recursive acronyms to name things, XNA is short for “XNA’s Not Acronymed”. In the Microsoft-y tradition of using one name to represent a smorgasbord of things, XNA is a framework, toolset and runtime that makes it easier to build and deploy games.

XNA provides a great skeleton for building 2-D and 3-D games with a set of game-centric class libraries and a straightforward programming model. Its design frees you from a lot of the “yak shaving” and related drudgery involved in game development, letting you spend more time on programming the gameplay instead. Its “simple but not stupid” quality recently allowed me to walk a workshop of Humber College students from an initial “let’s draw a static sprite on the screen” project to a pretty decent “run around the game field, dodging the flying spinning blades” game, complete with animated sprites, sound effects and soundtrack and scoring, all in about three hours. Better still, we had fun doing it.

Required and Optional Tools for XNA Development

Here’s what you need (and some nice-to-haves) to get started with XNA development:

Required

  • Windows 7, Vista or XP, with the latest service packs installed.
  • Visual Studio 2008, which costs money, or Visual C# 2008 Express Edition, which is free-as-in-beer. Don’t let its being free throw you off; it’s a complete IDE and more than enough for developing games. As of this writing, the 2010 editions of Visual Studio, which have not yet hit the “Release to Manufacturing” stage, don’t support XNA game development yet.
  • XNA Game Studio 3.1. This is a set of Visual Studio add-ons and tools for developing games for Windows, Xbox 360 and Zune using XNA. This is also free-as-in-beer.

Optional

Platformer: XNA’s “Right Out of the Box” Game

If you’re the sort who wants to play a game before doing some game development, you’re in luck. XNA provides Platformer, a fully-functional “platform jumper” game as one of its project templates. You can simply treat is as a game, but that would be a waste – its true value is that in its source code are a lot of lessons in building 2-D games with XNA. I’m going to show you how to build a Platformer project.

(In the screenshots below, I opted to use free Visual C# 2008 Express. If you have one of the full version of Visual Studio, the experience will be similar.)

Start up Visual C# 2008 Express or Visual Studio. From the File menu, select New Project… You should see a dialog box like the one shown below appear.

image

In the Project types: list on the left-hand side of the dialog box, select Visual C# and the select XNA Game Studio 3.1 from its sub-menu. In the Templates list on the right-hand side of the dialog box, you should see a number of game application templates. Select Platformer Starter Kit. Fell free to the edit the contents of the Name: textbox if you want to give your project a different from the default and click the OK button.

Visual Studio will generate a new project. You’ll know because the Solution Explorer pane will be filled with projects and their files:

image

Press F5 to run the game. In moments, you’ll be greeted by the screen below:

image

Platformer looks like an homage to both platform games as well as Raiders of the Lost Ark. You’re represented by an Indiana Jones-esque sprite and must reach the “Exit” sign before time runs out. You have the option of collecting gems to increase your score.

You move to the next level if your reach the exit sign before time runs out:

image

Here’s level two, which features more platforms, more gems and a shambling mummy who can kill you with a touch:

image

Here’s level three, which is filled with platforms that you can jump through:

image

Make sure you check out the code for Platformer. Reading it is a great way to learn XNA game development techniques and tricks.

Hello, XNA!

Once you’re done playing Platformer, you might want to try your hand at XNA development. I’m not going to show you how to write anything resembling a game in this article (I’ll do that over the next few articles in this series), but I thought I’d quickly show you how to get the world’s simplest XNA application – in the best “Hello, World!” tradition – up and running.

Just as you did with Platformer, click on the File menu, select New Project… This time, when the New Project dialog box appears, select Windows Game (3.1), give the project a name in the Name text box (I chose HelloXNA) and click OK:

image

Visual Studio (or Visual C# Express) will then generate your game project.

A newly-created XNA game project has all its code living in a single class, which is given the name Game1, which in turn is stored in the file Game1.cs. I want to rename that class to HelloXNA. That’s easily done by moving the cursor over Game1 at the start of the class declaration, right-clicking on it, selecting Refactor from the menu that appears, and then Rename… from the submenu:

image

I could use good ol’ search-and-replace, but it blindly taking the search term and changing it into the replacement term, no matter where it is. Refactor –> Rename… is smarter; it does a true renaming of the identifier without mangling other identifiers that happen to contain the search term. It also allows you to specify whether you want to do the renaming in comments and string literals, which old-school search-and-replace doesn’t do.

When the Rename dialog box appears, enter the new name for the Game1 class, HelloXNA, into the New name: text box. Make sure that the Preview reference changes checkbox is checked before clicking OK:

image

If you checked the Preview reference changes checkbox in the previous dialog box, you’ll see a preview of the changes that will result if you apply Refactor –> Rename…. Click Apply to finalize the renaming:

image

You’ll see that the Game1 class and any references to it in the code have been changed to HelloXNA. For consistency’s sake, we’ll rename the Game1.cs file in which the class formerly known as Game1 to HelloXNA.cs in the Solution Explorer:

image

By default, a brand-new XNA game project without any code added to it does a very simple thing: it draws a blank screen with a cornflower blue background. If you hit F5 to run the application right now, you’ll see this:

image

Now “all you have to do” is write some game code! I’ll walk you through that process over the next few articles in this series.

Next Steps

Cover of O'Reilly's book "Learning XNA 3.0"

You could wait for the next article in this series, but if you’re rarin’ to learn how to develop games with XNA, let me recommend Learning XNA 3.0, written by Aaron Reed and published by O’Reilly. It has a 4.5-star rating at Amazon.com, which it’s earned – it’s a great introduction to XNA development. The first half of the book is devoted to 2-D game development, starting with drawing a sprite on the screen and finishing with a pretty complete game. The second half of the book adds the third dimension and works towards building a 3-D game.

image

You should also get a look at XNA Creators Club, the online community for XNA developers. It features:

  • Links to all the downloads you need to get started developing games with XNA
  • Starter kinds for various game genres – you get Platformer with XNA; you can download starter kits for other game genres, including:
    • Marblets: a marble colour-matching puzzle game.
    • Spacewar: the classic “spaceship vs. spaceship” game that comes in two flavours – retro and evolved.
    • Role-Playing Game: A tile-based RPG engine with support for character classes, multiple party members, items and quests.
    • Racing Game: A 3-D auto racing game featuring advanced graphics, audio and input processing, where you race against the ghost car for the best time.
    • Ship Game: 3-D spaceship combat in a tunnel system with advanced lighting and textures, a full GPU particle system and an advanced physics engine.
    • Net Rumble: A 2-D shooter showcasing XNA’s new multiplayer features in an arena with asteroids, power-ups and up to 16 players.
  • Forums to discuss ideas and ask questions with your fellow XNA game developers
  • A catalog of games created by members of the XNA game developer community. You can try out their games, submit games and vote for games to be included in the Xbox Indie Games catalog, whose games can be purchased through Xbox Live.

If you want to be a rock star on Windows Phone 7, you’re going to want to sharpen your XNA chops. Get a head start and take it out for a spin!

This article also appears in Canadian Developer Connection.

{ 1 comment }

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

"Counting Down to Seven" badgeA report from Nielsen – as in the ratings company that got their start with television – says that women use mobile devices for social networking more than men do and that the lion’s share of mobile social networking isn’t done by Millennials (see the previous article in this series).

First, the women: 55% of the people in their study who said that they use social networking software and sites on their mobile phone were women, while the remaining 45% were men:

men-women-mobile-social

Second, age: according to Nielsen’s study, the age group who used their mobile devices to social network the most were between the ages of 35 and 54, closely followed by the 25 – 34 group.

social-mobile-by-age

More stuff to consider as you think of applications to build for Windows Phone 7: what are you writing for women between the ages of 25 to 54?

This article appears in Canadian Developer Connection.

{ 2 comments }