Professional Documents
Culture Documents
com/glengordon
Gamertag
Friends Achievements Merchandising Premium Placement
Windows Phone will extend the Xbox LIVE brand beyond the console for the first time
Windows Phone is the first step towards our vision of a ubiquitous gaming service Differentiates your title from the rest
Without Xbox LIVE You can still write and publish games for Windows Phone
Modern XAML/eventdriven application UI framework Rapid creation of visually rich apps HTML/Javascript Mature, robust, widely deployed technology
High performance game framework Rapid creation of multiscreen 2D and 3D games Rich content pipeline Mature, robust, widely adopted technology spanning Xbox, Windows, and Zune
APPLICATIONS
(and games)
GAMES
(and applications)
Powerful
Productive
Portable
Creating Games
wpgames@microsoft.com
for performance
Three + years of profiling and investment
for performance
Productive development with .NET and C# High performance IDE Intellisense makes coding faster Integrated build/deploy/debug experience MSBuild engine for build automation
The XNA Framework Game Loop is layered on top of the Silverlight Application object on Windows Phone 7
Provides the bulk of integration of APIs Most of the XNA Framework can be accessed from Silverlight applications Including Gamer Services (Xbox LIVE)
Youll want to choose the technology that works best for your scenarios
Graphics
UI control heavy consider Silverlight Desire vector graphics in XAML
Media
Rich video support in application
Tooling
If you use Microsoft Blend in your pipeline
Graphics
Using 3D graphics Sprite heavy 2D applications should consider the XNA Framework Game Loop
Simulation/Drawing
Those who prefer a traditional update/ draw/present frame loop
Tooling
Those who want to use the XNA Framework Content Pipeline graphics types
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);
Evolution of our existing immediate mode rendering API Simplifies for resource and render state management Feature segmentation between Reach/HiDef profiles Rendering primitives 2D and 3D
BasicEffect
SkinnedEffect
Scaler
Write your game without worrying about native resolution or orientation
Automatic rotation between portrait and landscape Touch automatically supports both scale and orientation changes
// Load a sound effect from a raw stream SoundEffect effect1 = SoundEffect.FromStream(GetStreamFromTheWeb("http://url.wav")); effect1.Play(); // Create dynamic audio on the fly byte[] fluteSound = GetFluteNote(); effect2 = new SoundEffect(fluteSound, SampleRate, AudioChannels.Stereo); SoundEffectInstance instance = effect2.CreateInstance(); instance.Pan = -1; instance.Pitch = 1.5f; instance.Play();
Music Enumeration and Playback Control and enumerate users media within a game Ability to play songs from URI/URL (i.e. music app) Picture Enumeration and Playback Supports photo picking/editing/publishing Video Playback
MediaLibrary media = new MediaLibrary(); // Get the JPEG image data Stream myJpegImage = ReadAndModifyPicture(somePicture); // Save texture to Media Library media.SavePicture("Awesome", myJpegImage);
Touch API
Available across platforms for portability (fewer #ifdefs) Multipoint on Windows Phone 7 and Windows Orientation and resolution aware
//...
foreach (var touchLocation in touchCollection) { if (touchLocation.State == TouchLocationState.Released) { //... } }
Windows Phone 7 OS
HTTP Push
Xbox LIVE
Avatars Invites Gamer Services
Profile
Trial Mode
Read a Players Profile // Profile access SignedInGamer gamer = Gamer.SignedInGamers[0]; // Get the player's GamerTag to display string gamerTag = gamer.Gamertag; // A SignedInGamer has a Profile GamerProfile profile = gamer.GetProfile(); // Get the player's current GamerScore int gamerScore = profile.GamerScore; // get the gamer picture (PNG file stream) Stream gamerPictureStream = profile.GamerPicture;
Award an Achievement
Real achieventments Real gamerscore Up to 20 awards, 200G total Dead simple API, deep game design
Read Achievements
// Get achievements AchievementCollection achievements = gamer.GetAchievements(); // walk through achievements foreach (Achievement a in achievements) { string name = a.Name; string description = a.Description; bool earned = a.IsEarned; int score = a.GamerScore; Stream icon = a.Picture; }
Write to a Leaderboard
Compete with Friends Score- or Timebased Fixed columns 10k blob data Pivot on gamer
// Create leaderboard identity with game mode 1 LeaderboardIdentity id = LeaderboardIdentity.Create(LeaderboardKey.BestScoreLifeTime, 1); // get the leaderboard writer from the signed in gamer LeaderboardWriter writer = gamer.LeaderboardWriter; // get the leaderboard entry for the identity LeaderboardEntry entry = writer.GetLeaderboard(id); // write new leaderboard data entry.Rating = 1000; entry.columns.SetValue("Outcome", LeaderboardOutcome.Win);
Simple check Simulate for testing Send user to your Marketplace offer
Trial Mode
Guide.SimulateTrialMode = true; // if we are in trial mode, show a marketplace offering if (Guide.IsTrialMode) { PlayerIndex playerIndex = Gamer.SignedInGamers[0].PlayerIndex; Guide.ShowMarketplace(playerIndex); }
Currently supported through web service only Static pose rendered on LIVE back-end Download as a stream
http://avatar.xboxlive.com/avatar/Major%20Nelson/avatar-body.png
Game invites are handled through email Guide.ShowGameInvite() invokes platform picker UI Player chooses game invite recipients Friends see invitations in their games hub
XNA Framework designed to be cross platform Smaller time investment and target more sockets Project synchronization between platforms
Reach
HiDef
Designed for compatibility across screens/devices This profile includes Windows Phone 7 Platform showcase features Xbox 360/Windows Only
Summary
Powerful
Great managed code games, working today Windows Phone provides a powerful platform for gaming
Productive
Focus on being a game developer Great tools make you more productive
Portable
Target more platforms easily Focus on your game differences, not the technology
Call to Action
Download the Windows Phone Developer Tools http://developer.windowsphone.com
Additional Resources
http://forums.xna.com
Hundreds of samples Lots of MVPs and experts to help you get started
Peer Support @
Blogs
XNA Creators Club @ http://creators.xna.com Team Blog @ http://blogs.msdn.com/xna/ Shawn Hargreaves @ http://blogs.msdn.com/shawnhar/ (Great Tech Info!)
Contact Microsoft
Email: wpgames@microsoft.com On the web: http://developer.windowsphone.com