Dan Waters, Academic Relations Manager, Microsoft.

25
Creating Games for the Zune Dan Waters, Academic Relations Manager, Microsoft

Transcript of Dan Waters, Academic Relations Manager, Microsoft.

Creating Games for the Zune

Dan Waters, Academic Relations Manager, Microsoft

Who am I?

Dan WatersAcademic Relations ManagerMicrosoft – Southeast region

[email protected]://danwaters.comhttp://twitter.com/danwaters

Please Text!

If you like what you see today, please:

Text W17 to 23000 (standard rates apply)

Survey Text – Feedback Please!

X = How was the presentation? (1-5, 5 is best)

Y = How was I? (1-5) Z = Would you recommend this

presentation? (Y or N)

Text FB17 XYZ to 23000

So if you really liked the presentation, text:FB17 55Y to 23000

What is a Zune?

What is a Zune?

First and foremost: a media player Plays media of varying formats:

Audio Video Live radio Pictures Podcasts

Online Services for Zune

Zune Marketplace Allows you to search for, buy, download

and maintain a library of content (music, podcasts, videos, etc)

All transactions are linked to your Windows Live ID (such as a @hotmail.com, @msn.com, or @live.com email address)

Zune Social A social community of Zune owners

Zune Tags

Your “identity” in the Zune Social You can place this tag on websites to

tell people about your music interests.

Why write games for the Zune?

Opportunity Fun Easy if you know .NET, yet

challenging in some ways. Zune is powerful for its size Potential for interesting ideas

integrating music & pictures with your game

Same tools used to create games for the Xbox 360 and PC

Getting Started

You will need: Intermediate knowledge of the C#

programming language. Visual Studio 2008 (any version,

including Express) XNA Game Studio 3.0 A Zune device with firmware version 3.0

or later.

The Installation Process

1. Install Visual Studio 2008.2. Install Zune software & driver for

devicehttp://www.zune.net

3. Install XNA Game Studio 3.0http://creators.xna.comXNA installs as part of Visual Studio.

Registering a Zune, part 1

Connect the Zune via USB. Close the Zune software if it launches. Open Visual Studio.

Registering a Zune, part 2

Launch the XNA Game Studio Device Center (Tools menu) and click Add Device.

Registering a Zune, part 3

Select the Zune you want to register, and then click Next.

Registering a Zune, part 4

The software tests connectivity and the setup is complete. Make sure the Zune you want to deploy to is set as default.

Making Your First Game

1. Create a new Zune Game project2. Check your default Zune in the

Device Center3. Control+F5 to run!

Anatomy of an XNA Game

Four important methods: Initialize, LoadContent, Update, Draw

Initialize

Used to set up objects and initialize variables once, before the game starts

Cannot use content yet, because it hasn’t been loaded.

LoadContent

Used to get content (images and sounds) into the game

Called only once, after Initialize

Update

This is where all of your game logic goes

Collision detection, updating subsystems, updating object properties

Runs at a target rate of 60 times per second.

Draw

Draws content on the screen using a Sprite Batch

Called as often as possible

Sprite Batches

A group of textures (images) that are drawn together before being sent to the graphics device for final rendering

All Zune games use sprite batches, whereas Xbox 360 and PC games can use other means.

DemoBuilding a quick game

Please Text!

If you like what you see today, please:

Text W17 to 23000 (standard rates apply)

Survey Text – Feedback Please!

X = How was the presentation? (1-5, 5 is best)

Y = How was I? (1-5) Z = Would you recommend this

presentation? (Y or N)

Text FB17 XYZ to 23000

So if you really liked the presentation, text:FB17 55Y to 23000