O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Windows Phone: From Idea to Published Game in 75 minutes

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 78 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (19)

Quem viu também gostou (13)

Anúncio

Semelhante a Windows Phone: From Idea to Published Game in 75 minutes (20)

Mais de Microsoft Developer Network (MSDN) - Belgium and Luxembourg (20)

Anúncio

Mais recentes (20)

Windows Phone: From Idea to Published Game in 75 minutes

  1. 1. Initialize LoadContent Update Draw
  2. 2. interface ISprite { void Reset(SamplerState game); void Draw(SmudgeGame game); void Update(SmudgeGame game); }
  3. 3. Texture2D smudgeTexture = Content.Load<Texture2D>("Smudge"); smudge = new Sprite(this, smudgeTexture, Vector2.Zero, Color.Red, 20, 0);
  4. 4. public virtual void Draw(SmudgeGame game) { game.spriteBatch.Draw( spriteTexture, // texture of sprite spritePosition, // vector position on screen null, // source rectangle in texture (all of it) spriteColor, // colour of the light spriteRotation, // rotation – in radians spriteOrigin, // centre of sprite – position and rotation spriteScale, // scale – scaled to fit SpriteEffects.None, 1); // draw everything at the same depth }
  5. 5. public virtual void Draw(SmudgeGame game) { game.spriteBatch.Draw( spriteTexture, // texture of sprite spritePosition, // vector position on screen null, // source rectangle in texture (all of it) spriteColor, // colour of the light spriteRotation, // rotation – in radians spriteOrigin, // centre of sprite – position and rotation spriteScale, // scale – scaled to fit SpriteEffects.None, 1); // draw everything at the same depth }
  6. 6. public virtual void Update(SmudgeGame game) { }
  7. 7. Demo 1
  8. 8. List<ISprite> gameSprites = new List<ISprite>();
  9. 9. foreach (ISprite sprite in gameSprites) sprite.Draw(this);
  10. 10. protected override void Initialize() { TouchPanel.EnabledGestures = GestureType.Tap | GestureType.FreeDrag; base.Initialize(); }
  11. 11. while (TouchPanel.IsGestureAvailable) { GestureSample gesture = TouchPanel.ReadGesture(); gameSprites.Add( new Sprite(this, smudgeTexture, gesture.Position, Color.Red, 20,0)); }
  12. 12. Demo 2
  13. 13. class GrowingSprite : Sprite, Isprite { float spriteGrowSpeed = 0.05f; public override void Update(SmudgeGame game) { spriteScale += spriteGrowSpeed; base.Update(game); } }
  14. 14. Demo 3
  15. 15. Random colorRand = new Random(); Color randomColor() { int r = colorRand.Next(256); int g = colorRand.Next(256); int b = colorRand.Next(256); return Color.FromNonPremultiplied(r, g, b, 255); }
  16. 16. Demo 4
  17. 17. while (TouchPanel.IsGestureAvailable) { GestureSample gesture = TouchPanel.ReadGesture(); if (gameSprites.Count > smudgesLength) gameSprites.RemoveAt(0); gameSprites.Add(new GrowingSprite(this, smudgeTexture, gesture.Position, randomColor(), 20, 0)); }
  18. 18. Demo 5
  19. 19. Demo 6
  20. 20. Demo 7
  21. 21. <Deployment xmlns= "http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="WindowsPhonePuzzle" EntryPointType="WindowsPhonePuzzle.App" RuntimeVersion="3.0.40624.0"> <Deployment.Parts> <AssemblyPart x:Name="WindowsPhonePuzzle" Source="WindowsPhonePuzzle.dll" /> </Deployment.Parts> </Deployment>
  22. 22. <Capabilities> <Capability Name="ID_CAP_LOCATION"/> <Capability Name="ID_CAP_MEDIALIB"/> <Capability Name="ID_CAP_PHONEDIALER"/> <Capability Name="ID_CAP_PUSH_NOTIFICATION"/> <Capability Name="ID_CAP_SENSORS"/> <Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/> <Capability Name="ID_CAP_ISV_CAMERA"/> <Capability Name="ID_CAP_CONTACTS"/> <Capability Name="ID_CAP_APPOINTMENTS"/> </Capabilities>
  23. 23. <App xmlns="" ProductID="{eb43b2c2-b7e9-4e5c-8aea-8047eb5e335f}" Title="FunkyCamera" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="FunkyCamera author" Description="Sample description" Publisher="FunkyCamera">
  24. 24. http://go.microsoft.com/?linkid=9730558
  25. 25. 57
  26. 26. using Microsoft.Phone.Marketplace; LicenseInformation info = new LicenseInformation(); if ( info.IsTrial() ) { // running in trial mode }
  27. 27. 67
  28. 28. http://www.robmiles.com Twitter @RobMiles
  29. 29. http://aka.ms/mbl-phone/start http://aka.ms/mbl-phone/tools http://aka.ms/mbl-phone/mango http://aka.ms/mbl-phone/register

Notas do Editor

  • Demo 01 - Smudgegame
  • Demo 2 – SmudgeDraw
  • Demo 03 Smudge Growing
  • Make the point that it is more efficient to opimise the important bits than to try to optimise everything.A good diagnostic tool will tell you where your program is spending most of its time.
  • Make the point that this will tell you about asset use, give indication of most popular methods and the time spent in them.
  • Make the point that this can be obtained from the real device too.
  • Demo 2 – SmudgeDraw
  • Make the point that whenever a program is downloaded into a device for execution or deployment it is a XAP file that is sent.The XAP file is the totality of output from the Visual Studio solution. It contains XNA content too, if this has been added.
  • Say that I got this by renaming the XAP file to ZIP and just browsing it
  • This is something that people should not have to fiddle with, but it is useful to know how this all fits together
  • This file is something that is very important. If you want to put an application in the Marketplace you will need to edit this file.
  • Make the point that by default the project has every capability registered.You should make sure you only ask for the ones that you need.
  • This step is very easy to do.Make the point that all these fields must be filled in correctly.The Genre setting determines what hub the application appears in, game or Silverlight
  • We have seen the files as they are deployed in the XAP file. Now we can see how they are created and managed by the developer
  • This is the file that you will submit.
  • This is a very important document, make sure that everyone is aware that they must read this.Also remind folks that this document is updated quite frequently as the abilities of the phone evolve.For this reason they should keep up to date with it.
  • This is a very useful way of testing programs. Make the point that you can deploy to the emulator as well.
  • Make the point that hardware folks will always be able to break into the phone platform and steal stuff.For that reason, be careful about what you put out there.
  • Make the point that the PreEmptive system also includes some very useful reporting tools.
  • It might be worth mentioning some initiatives with Chevron who are bringing some lower cost “homebrew” access options.
  • The payment to overseas is a pain, but not a problem.There are also some third party publishing houses that will allow you to publish your applications if you don’t want the hassle of publishing your own or you are based in one of the few countries that does not support Windows Phone Marketplace
  • There is some history here, in that originally the number of free apps was limited.The limit was effectively removed some time back
  • Note that there is nothing to stop developers releasing a fully functional application in “try before you buy” mode.
  • Make the point that this happens to ensure a certain level of quality of applications.Remind folks that they can use this service as many times as they like.My experience has been that the validation process is speedy and the feedback is excellent
  • My experience of this has been very good.
  • The testing kit lets you perform the same automated tests that are performed during a submission.It also provides a set of steps identical to the ones used when the application is tested.Mention that the kit automatically updates with new procedures if the testing process changes.
  • This is very new and shiny. The documentation for this lovely new feature is here:http://msdn.microsoft.com/en-us/library/hh334585(v=VS.92).aspx

×