NCSU Libraries County and City Data Directory: Everything You’ve Always Wanted to Know
Living the Dream: Make the Video Game You’ve Always Wanted and Get Paid For It!
-
Upload
david-isbitski -
Category
Technology
-
view
606 -
download
0
description
Transcript of 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
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
?
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
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%
Gamer?
xbox.com/phone
xbox.com/phone
Xbox Live on Windows Phone
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
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
Powerful
Productive
Portable
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
Engines
Develop exciting games
Simplified graphics
API’s
Visual Studio 2010 integration
Enhanced audio
support
New configurable
effects16
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
Simplifying Game Development
XNA Framework
XNA is about Polling not Events
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
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!
Demo - Game Loop
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
Interacting with games gets easier!
Input / Touch
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) { //... }}
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;
Demo - Let’s add Touch
Fun with Sensors
Accelerometer
Demo – Zoom Zoom!
Can you hear me now?
Audio & Media
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();
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
Demo - Red Alert,Shields Up!
Adding a Menu System
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
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
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
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
Demo – Main Menu
Ads and Trial Mode
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
• 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
• 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
• 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
Demo - PubCenter
Think Global
Today (16)
+ 19 New (35)
Publish Apps to More Places
49
Hong Kong
Singapore
1.8 Billion more potential users
Call to ActionDownload the Windows Phone Developer Tools
http://create.msdn.com
http://creators.xna.com
Fun First. Test on a device if possible!
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