51
Living the dream: make the video game you’ve always wanted and get paid for it! Dave Isbitski Sr. Developer Evangelist, Microsoft http://blogs.msdn.com/davedev @TheDaveDev Level: Intermediate

Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Embed Size (px)

DESCRIPTION

Have you ever dreamed of writing your own video game but didn’t know where to start? During the past five years Microsoft’s XNA framework has become a favorite of Windows and Xbox game developers everywhere. XNA uses the same great Visual Studio development environment you are used to but brings a slew of features specifically for games development. With the release of Windows Phone last year XNA can now be used to create Windows Phone games exposing your ideas to a whole new marketplace! We’ll charge full speed into XNA to learn about the basic Windows Phone model, explore its core device characteristics, and review highlights of the XNA phone framework. Finally, we’ll explore some of the cool games that have been developed specifically for Windows Phone and even learn how to build one ourselves. You will learn: Get up to speed on utilizing Microsoft XNA Tools for Windows Phone Get exposed to freely available third party tools and frameworks that will help jumpstart your game Learn how to make money through in game Advertising as well as the new Trial mode on Windows PhoneWalk away with the foundation for a game we will build first hand during the session Source code can be found on Github here: http://github.com/disbitski

Citation preview

Page 1: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Living the dream: make the video game you’ve always wanted and get paid for it!

Dave IsbitskiSr. Developer Evangelist, Microsoft

http://blogs.msdn.com/davedev@TheDaveDev

Level: Intermediate

Page 2: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Agenda

• Windows Phone– A new world of opportunity

• XNA Game Studio 4.0– Xbox and Windows Phone

• XNA Framework for Phone– Game Loop, Touch, Accelerometer, Sound,

Graphics

• Making $ Money $ in the Marketplace

Page 3: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

?

Page 4: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Page 5: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Large and Growing

Selection of Apps & Games

40,000+ certified applications and games Growing at over 100 new apps per day 61% Paid, 39% Free 70+ exclusive Xbox LIVE games

5

Loved by Users

12 Downloads per User per Month 10% Conversion rate from Trial to Paid Purchase Daily Merchandising drives 500% download uplift

Generating High ARPU

MO Billing now available to over 50% of Windows Phone users

% Paid Downloads: 3.2% Paid Apps Average Selling Price: $2.93; High ad

monetization rate

From Many Developers

38,000+ developers registered 7,300+ developers have submitted one or more apps 1,200 new developers every week

Page 6: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Merchandizing PlacementsPlacement Type Panorama Featured Icon Featured List

Download Uplift 2000%

Merchandizing PlacementsPlacement Type Panorama Featured Icon Featured List

Download Uplift 2000% 800%

Merchandizing PlacementsPlacement Type Panorama Featured Icon Featured List

Promoting Your App

6

Merchandizing PlacementsPlacement Type Panorama Featured Icon Featured List

Download Uplift 2000% 800% 150%

Page 7: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Gamer?

Page 8: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

xbox.com/phone

Page 9: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

xbox.com/phone

Page 10: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Xbox Live on Windows Phone

Page 11: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Xbox LIVE is Gaming Services

Windows Phone will extend the Xbox LIVE brand beyond the console for the first timeWindows Phone is the first step towards our vision of a ubiquitous gaming service

Differentiates your title from the rest

Gamertag

Friends

AchievementsMerchandising Premium Placement

Page 12: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Portable Gaming Perfection

Display

480x800 QVGA

Capacitive touch

4 or more contact points

Sensors

A-GPS, Accelerometer, Compass, Gyro

Camera

5 mega pixels or moreDedicated camera button

Hardware buttons

Start, Search, Back

CPU

ARMv7 Cortex/Scorpion 1G or higherQualcomm  MSM7x30, MSM8x55 800Mhz or higher

GPU

DirectX 9 acceleration

Multimedia

Common detailed specsCodec acceleration

Memory

256MB RAM or more8GB Flash or more

Page 13: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Powerful

Productive

Portable

Page 14: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

XNA Game StudioMakes game development easier

XNA Framework provides robust APIs for games

C#, .NET and Visual Studio tooling

Solutions for game content processing

Not an engine solution

Creating Games

Page 15: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Engines

Page 16: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Develop exciting games

Simplified graphics

API’s

Visual Studio 2010 integration

Enhanced audio

support

New configurable

effects16

Page 17: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Content Pipeline

Simplify Your Content Usage

Importers for common game data formats

Manage assets in Visual Studio

Optimize data into binary format for

efficient loading Fully extensible

XNA Framework/Game Loop not required

Content projects external in XNA Game

Studio 4.0

Page 18: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Simplifying Game Development

XNA Framework

Page 19: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

XNA is about Polling not Events

Page 20: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Typical Game Loop

All games do three things

Load content when they startUpdate the game worldDraw the game world

Resource management is critical in a game in order to maximize performance

Initialize

Engine

Load Resources

Free Resources

Get User Input

Calculate

Test Criteria

Give FeedBack

Typical Game Loop

20

Initialize() LoadContent()

UnloadContent()

Update()

Draw()

XNA Framework Game Loop

Page 21: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

XNA Framework Game Loop Example

System integration with Windows Phone 7 best practices

Translated to existing XNA Framework concepts

Traditional update/draw/present frame loop

Core programming model consistent with previous releasesChanges implemented yield better power performance on devices

XNA Framework Game Loop

protected override void Update(GameTime gameTime){ // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)

this.Exit();

// TODO: Add your update logic here

base.Update(gameTime);}

protected override void Draw(GameTime gameTime){ GraphicsDevice.Clear(Color.CornflowerBlue);

// TODO: Add your drawing code here

base.Draw(gameTime);}

Start simple and customize!

Page 22: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo - Game Loop

Page 23: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

System Support: Scaler and Orientation

Write your game without worrying about native resolution or orientation

Automatic rotation between portrait and landscapeTouch automatically supports both scale and orientation changes

Scaler can drastically improve performanceTrade off performance for “crispness” and shade fewer pixels800x480 = 384,000 pixels, 480x320 = 153,600 pixels

Upsample an arbitrary back buffer to native device resolutionFar higher quality than bilinear filteringAllows for easier porting from other platforms

Scaling/Rotation comes for “free” from Hardware

Page 24: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Interacting with games gets easier!

Input / Touch

Page 25: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Touch Input Handling

Cross Platform Input API

Touch API

Xbox 360 Controllers (Xbox/Windows)

Keyboard (Xbox/Windows/Windows Phone 7)

Available across platforms for portability (fewer #ifdefs)

Multipoint on Windows Phone 7 and Windows

Orientation and resolution aware

Developer can override

Input Overview

var touchCollection = TouchPanel.GetState();

//...

foreach (var touchLocation in touchCollection){ if (touchLocation.State == TouchLocationState.Released) { //... }}

Page 26: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Touch gestures

• The touch panel can detect a number of different gestures including

– Tap – DoubleTap– Hold– HorizontalDrag, VerticalDrag and FreeDrag – Pinch– Flick

TouchPanel.EnabledGestures = GestureType.Flick;

Page 27: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo - Let’s add Touch

Page 28: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Fun with Sensors

Accelerometer

Page 29: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Page 30: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo – Zoom Zoom!

Page 31: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Can you hear me now?

Audio & Media

Page 32: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Audio Capture Example

Audio public void EventDrivenCapture(){ mic = Microphone.Default; buffer = new byte[mic.GetSampleSizeInBytes(mic.BufferDuration)]; mic.BufferReady += new EventHandler(OnBufferReady); DynamicPlayback = new DynamicSoundEffectInstance(mic.SampleRate, AudioChannels.Mono);}

public void OnBufferReady(object sender, EventArgs args){ // Get the latest captured audio. int duration = mic.GetData(buffer);

// Do some post-capture processing and playback. MakeMeSoundLikeARobot(buffer, duration); DynamicPlayback.SubmitBuffer(buffer);}

Audio Capture and Playback

Simple API to play back WAV data

Modify pitch, volume, pan audio

Ability to play synthesized/buffered audio

Serialize captured data

Provides more control over System.Media types on Windows Phone 7

Microphone/Bluetooth SupportPlayback through headset

Capture through mic or headset

Audio Playback Example// Load a sound effect from a raw streamSoundEffect effect1 = SoundEffect.FromStream(GetStreamFromTheWeb("http://url.wav"));effect1.Play();

// Create dynamic audio on the flybyte[] fluteSound = GetFluteNote();effect2 = new SoundEffect(fluteSound, SampleRate, AudioChannels.Stereo);SoundEffectInstance instance = effect2.CreateInstance();instance.Pan = -1; instance.Pitch = 1.5f;instance.Play();

Page 33: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

URI Song Playback Example

Retrieve Image Data

Music Enumeration and Playback

Media – Music/Photos/Video

// Constructs a song from a URIUri mediaStreamUri = new Uri("http://song.asx");Song streamedSong = Song.FromUri("Song",

mediaStreamUri);

// Play the songMediaPlayer.Play(streamedSong);

MediaLibrary media = new MediaLibrary();

// Get the JPEG image dataStream myJpegImage = ReadAndModifyPicture(somePicture);

// Save texture to Media Library   media.SavePicture("Awesome", myJpegImage);

Picture Enumeration and Playback

Video Playback

Control and enumerate users’ media within a game

Ability to play songs from URI/URL (i.e. music app)

Supports photo picking/editing/publishing

Uses standard video player API

Show/Hide controls

Page 34: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo - Red Alert,Shields Up!

Page 35: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Adding a Menu System

Page 36: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

XNA Framework Shared Graphics

• XNA 2D or 3D graphics within your Silverlight app!

• Silverlight app model–Application class–PhoneApplicationPage and Navigation

• XNA Rendering takes over entire display–SetSharingMode(bool enableXna)–Graphics operations only valid while shared

rendering is enabled

Page 37: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

XNA Framework Shared Graphics

• XNA SharedGraphicsDeviceManager–Manages Direct3D device sharing with Silverlight

• GPU resource management–Silverlight evicts resources when using XNA Graphics

–XNA APIs allow manual resource management

–Maximize free memory, minimize repeat loading of content

Page 38: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

What About “Game”?

• Microsoft.Xna.Framework.Game–XNA cross-platform application abstraction–Game “Heartbeat” methods–Application lifetime events–ContentManager

• Leverage System.Windows.Application events–OnNavigateTo (enable graphics, load content)–OnNavigateFrom (turn off shared graphics )

• New GameTimer type for Update/Draw events

Page 39: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Render Silverlight over XNA Graphics

• Silverlight Page is still active when using XNA Shared Rendering

• UIElementRenderer control renders a UIElement to a Texture2D

• Use the texture how you want!– UI, controls, and input– Texture models– Imposters/Billboards

• Text input, Storyboards, and Animations all available

Page 40: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo – Main Menu

Page 41: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
Page 42: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Ads and Trial Mode

Page 43: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Trial Mode

Trial ModeGuide.SimulateTrialMode = true;

// if we are in trial mode, show a marketplace offeringif (Guide.IsTrialMode){

PlayerIndex playerIndex = Gamer.SignedInGamers[0].PlayerIndex;Guide.ShowMarketplace(playerIndex);

}

Simple check Simulate for testing Send user to your Marketplace offer

Page 44: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

• Very easy to incorporate ads into XNA games

• Download the Ad-Control SDK

• AdManager added as a game component – easy to retro-fit to an existing game

• Players can click through an advertisement to a web site or call the advertiser from within your game

• Advertisements are specifically targeted at each player demographic

• You get 70% of the revenue

PubCenter Advertising SDK

Page 45: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

• Sign up here so that you can incorporate ads in your games: http://pubcenter.microsoft.com

• Find out more about Windows Phone Advertisinghttp://advertising.microsoft.com/mobile-apps

Page 46: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

• The Advertising SDK is now part of the Windows Phone SDK

• You can include a n XNA Drawable Ad into a game• This is very easy to do – full code example on my

Blog• http://blogs.msdn.com/b/davedev/p/events.aspx

Page 47: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Demo - PubCenter

Page 48: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Think Global

Page 49: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Today (16)

+ 19 New (35)

Publish Apps to More Places

49

Hong Kong

Singapore

1.8 Billion more potential users

Page 50: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Call to ActionDownload the Windows Phone Developer Tools

http://create.msdn.com

http://creators.xna.com

[email protected]

Fun First. Test on a device if possible!

Page 51: Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!

Living the dream: make the video game you’ve always wanted and get paid for it!

Dave IsbitskiSr. Developer Evangelist, Microsoft

http://blogs.msdn.com/davedev@TheDaveDev

Level: Intermediate