Home
SKEET SHOOTERS
Contents
1. Game Tutorial B Class GameScreen a GameplayScreen Class GameScreen k LoadingScreen ES Class GameScreen Fields at loadinglsSlow ae otherScreensAreGone ge screens loLoad Methods Draw Load Y LoadingScreen Update BackgroundScreen 2 Class GameScreen E Fields ae background Texture e content E Methods BackgroundScreen Draw LoadContent UnloadContent Update e 6622 Figure 3 5 Game Screen Classes a ait I 1 1 1 GameScreen le El Properties MessageBoxScreen amp Class Gamescreen E Fields aw gradientTexture g message Il Methods 4 Draw Handlelnput 4 LoadContent Q MessageBoxScreen 1 overload El Events F Accepted F Cancelled MenuScreen A Abstract Class El Fields menuEntries menuPoint menu Tithe menurTitlePoint EESTI selectedEntry ES MenuEntries E Methods Draw Handlelnput sy MenuScreen gv OnCancel 1 overload Y OnSelectEntry it Update sss eee ee eee ee ee eee ee eee cr Page 29 of 54 Game ph any gramm m rn zz Class E Gam eShoreen E Fields n dd Ene ti AEREA ARRE RARAS He XXL analo Linn background F rse background Pour backgrou ndine backgrou nd Six Background Thre backgrou nd Tiro ballCounter ballSpeed bonu sBar bonusBarbrP onusRhles gqe bonus Tinner bonus Tintern bonuzsTitle bonusTtheDP
2. If we have a graphics device tell the screen to load content if isInitialized screen LoadContent screens Add screen RemoveScreen method is used to remove a screen from the screen manager public void RemoveScreen GameScreen screen If we have a graphics device tell the screen to unload content if isInitialized screen UnloadContent screens Remove screen screensToUpdate Remove screen The class that is the base class for all of the game screens is GameScreen cs A screen 1s a single layer that has update and draw logic and which can be combined with other layers to build a complex menu system Each of the game s screens inherits GameScreen cs UpdateTransition method is used as a helper for updating the screen transition position bool UpdateTransition GameTime gameTime TimeSpan time int direction How much should we move by float trensitionDel te if time TimeSpan Zero transitionDelta 1 else transitionDelta float gameTime ElapsedGameTime TotalMilliseconds time TotalMilliseconds Update the transition position transitionPosition transitionDelta direction lf Did we reach the end of the transition if direction lt 0 amp amp transitionPosition lt 0 direction gt 0 amp amp transitionPosition gt 1 transitionPosition MathHelper Clamp transitionPosition 1 return false Otherwise we a
3. Page 38 of 54 6 References 1 App Hub Microsoft Corporation 1 21 2011 lt http create msdn com en US gt 2 Microsoft Visual Studio Wikipedia 3 30 2011 lt http en wikipedia org wiki Microsoft_Visual_Studio_2008 Visual_Studio_2008 gt 3 Microsoft XNA Wikipedia 3 30 2011 lt http en wikipedia org wiki XNA_Framework gt 4 Xbox360 Wikipedia 3 30 2011 lt http en wikipedia org wiki Xbox_360 gt 5 Xbox 360 Media Server Setup Digital Trends 3 30 2011 lt http www digitaltrends com gaming xbox 360 media server setup gt 6 Xbox 360 Wireless Gaming Adapter Amazon com Xbox 360 Wireless Gaming Adapter Electronics Amazon com 3 30 2011 lt http www amazon com Xbox Wireless Gaming Adapter Playstation 3 dp B0032J4TFS refzsr 1 1 ie UTF8 amp s videogames amp gid 1301497590 amp sr 8 1 gt Page 39 of 54 7 Appendix a User Manual 1 Downloading and Installing Software onto Windows Based PC 1 a 1 1 Download and install Microsoft Visual Studio 2008 or Visual C 2008 Express Edition from www microsoft com 1 a 1 2 Download and install Microsoft XNA Game Studio 3 1 from www apphub com Opening ports for the XBox 360 1 a 2 1 Xbox LIVE requires the following ports to be open e Port 88 UDP e Port 3074 UDP and TCP e Port 53 UDP and TCP e Port 80 TCP 1 a 2 2 If you re connected to a network through your workplace or school ask the network administrator to open t
4. charselector content Alfio Hor enero ess ener ener EZ l lito nter ener Balls enero mter ex plos cnm font gantel hrer iride laser lfeBar lifeBarkbP life iri t life Title life TrELESP mao Balls max BonusPklessaqe Tine max Bonus Tinte max Enemie max Enemy Balls max Emrem M elccrey max Lite Points min Enemy eloc iby minH i Fat riecckb evel numME nen player player Balls PlayerH rt powrerUpRotation powrer Pp Pre ous Enemy Hei ht reared rn safe s r r sore Draw Pint me Sl bm sh pela hield Pionner sh reld Porwer DOF Shield T i zhieldTinmrenndax shreldTithe shrelhdTitheDP shipSpeed smoke spray Shot nx spriteBatch statusBar per yr Rec zap E Methods 000 Dirawu Drop Porwerer rp FireBall FireEnermy Balls Carrie play Sc reen Handlelnput L cmdcharacterzselecticr Load Content Losd AAR cou Hor Lo sdselecton Un load Content Update Update Balls WipdateEnenmnres WiedateEnenn Balls Wi edatePowerlLips LipedateShreld G arme urtorial L lass E GameSscreen El Fields E iii AMA ii 1i PROVE AAA AAA RO OR ERR RO ODER REE r E Methods analbogLimt background Fine bac kg round Pour backgroundne b c kgrou ndS ix background Three background Turno ball Counter ballSspeed bonus Bar bonusBarbrP Era she bonus Dinter bonus Tintern b
5. o dr Debug 86 z A double 53 9 mh e BI Program cs GameObject cs Start Page x Solution Explorer Solution SkeetShootersWin 1 proj 2 X laele gz El amp Z Solution SkeetShootersWin 1 project B H SkeetShooters SkeetShooters Program Y g Main string args 18 region File Description 2 3 Author Josh Yanai Ea Properties 4 Program cs H sj References 5i H T Content 6 Code was adapted from Microsoft s XNA game samples E Particles 7 E ScreenManager 8 Microsoft XNA Community Game Platform E Screens 9 Copyright C Microsoft Corporation All rights reserved e AudioManager cs f B Game ico i fendregion e GameObject cs GameThumbnail png using System Program cs i s QandA cs El namespace SkeetShooters e SkeetShooters cs N e E SkeetShooters TemporaryKey pfx t lt summary gt The main entry point for the application lt summary gt Static void Main string args t using SkeetShooters game new SkeetShooters t game Run P S q m m us ww m I l NNN N N N N N Ready Lni Coll Chi INS Q ux wwrrr rr Gas cae mnam ans ss Deploying an Xb ES Faultinjector ES SkeetShootersDocs Ni CNT 4104 s Te P2 wold 1 15pm 1 a 4 9 Pressing F5 will build and run the project assuming everything has been set up correctly 5 Playing the Skeet Shooters G
6. then the top most menu entry shall be highlighted 2 2 3 6 Pressing the A button Figure 2 11 shall select the currently highlighted menu entry 2 2 4 Menu Screen Main Menu Screen Figure 2 2 The main menu screen shall be automatically displayed at the start of the game 2 2 4 1 Selecting the Start Game menu entry shall display the character selection screen 2 2 4 2 Selecting the Options menu entry shall display the options menu screen 2 2 4 3 Selecting the Exit menu entry shall exit the game lt TT LJ T Y T SKE EsISSS ETO O sbBR EE MAIN MENU m wx z pam Si ir gt um A E m CA ee A T 25 x OPTIONS EXIT Figure 2 2 Main Menu Screen 2 2 5 Menu Screen Options Menu Screen Figure 2 3 The options menu screen shall be displayed when the Options menu entry 1s selected from the main menu screen Page 6 of 54 2 2 5 1 Selecting the Difficulty menu entry shall change the game difficulty and display the current difficulty setting 2 2 5 2 Selecting the Tutorial menu entry shall begin the interactive game tutorial 2 2 5 3 Selecting the Sound menu entry shall display the sound menu screen 2 2 5 4 Selecting the Back menu entry shall display the main menu screen e 3 N Fr w amp gt 1 F sd i L a y N k 6 Tr rc gt J lt J ml gt T J LIN na w We OPTIONS E
7. fpem gt i E s A 0 ES 2 do Ce e i A A Eel M ss cs E e art 7 mo e gt x lt A p TUTORIAL Figure 2 3 Options Menu Screen 2 2 6 Menu Screen Sound Menu Screen Figure 2 4 The sound menu screen shall be displayed when the Sound menu entry is selected from the options menu screen 2 2 6 1 Selecting the Music Volume menu entry shall display the music volume menu screen 2 2 6 2 Selecting the SFX Volume menu entry shall display the sound effects volume menu screen 2 2 6 3 Selecting the Next Song menu entry shall play the next song in the music queue 2 2 6 4 Selecting the Prev Song menu entry shall play the previous song in the music queue 2 2 6 5 Selecting the Back menu entry shall display the options menu screen Page 7 of 54 SFX VOLUME NEXT SONG PREV SONG BACK Figure 2 4 Sound Menu Screen 2 2 7 Menu Screen Music Volume Menu Screen Figure 2 5 The music volume menu screen shall be displayed when the Music Volume menu entry is selected from the sound menu screen 2 2 7 1 Selecting the Volume Up menu entry shall increase the music volume by 10 and display the current music volume 2 2 7 2 Maximum music volume shall be 100 2 2 7 3 Selecting the Volume Down menu entry shall decrease the music volume by 10 and display the current music volume 2 2 7 4 Minimum music volume sh
8. 1 3 The number 3 sometimes mistaken for a B also has no straight side on the left 1 a 3 3 4 5 1 4 The number 0 and the capital letter O are so similar that XNA Game Studio Connect treats these characters as the same Therefore the number 0 and the capital letter O are interchangeable 1 a 3 3 4 5 1 5 If the connection key is still too difficult to read press X on the Xbox 360 controller to generate a new connection key Page 45 of 54 1 a 3 3 4 6 Once you are sure that the two keys match click Next on the XNA Game Studio Devices dialog box 1 a 3 3 4 7 XNA Game Studio Device Center will test the connection with the Xbox 360 console 1 a 3 3 4 8 If the connection is successful the XNA Game Studio Device Center on the Windows based computer will display Successfully connected to the Xbox 360 console XNA Game Studio Connect on the Xbox 360 console will display Waiting for computer connection followed by the name you have chosen for your Xbox 360 console in the XNA Game Studio Device Center 1 a 3 3 4 9 If the XNA Game Studio Device Center fails to connect to the Xbox 360 console click Try again to edit the connection key and try again If the connection continues to fail make a careful note of the error message displayed at the bottom of the XNA Game Studio Devices dialog box This error message can help you or a technician diagnose the cause of the connection failure if it did not result from mismat
9. menu entry is selected from the options menu screen or the pause menu screen 3 3 8 MusicVolumeScreen cs The music volume menu screen class inherits MenuScreen cs and 1s displayed when the Music Volume menu entry is selected from the sound menu screen 3 3 9 SfxV olumeScreen cs The SFX volume menu screen class inherits MenuScreen cs and is displayed when the SFX Volume menu entry 1s selected from the sound menu screen 3 4 Game Screen Classes Figure 3 5 and 3 6 3 4 1 GameScreen cs The game screen class was added as a base class for every screen to inherit An instance of the GameScreen cs is a single layer that has update and draw logic and which can be combined with other layers to build up a complex menu system 3 4 2 BackgroundScreen cs The background screen sits behind all of the other menu screens It draws a background image that remains fixed in place regardless of whatever transitions the screens on top of it may be doing 3 4 3 LoadingScreen cs The loading screen coordinates transitions between the menu system and the game itself 3 4 4 MessageBoxScreen cs A popup message box screen used to display are you sure confirmation messages 3 4 5 GameTutorial cs This screen is displayed when the Tutorial menu entry is selected from the options menu screen This class contains all of the logic for running the interactive game tutorial Page 24 of 54 3 4 6 GameplayScreen cs This screen is displaye
10. origin particles playerHit random spriteBlendMode texture LL Q DD DDD DD 20202222 107 textureFilename Properties SF FreeParticleCount Ep Random E Methods AddParticles Draw Initialize initializeConstants InitializeParticle LoadContent ParticleSystem PickRandomDirection 4 RandomBetween Update Gm m m m o n e SES i u m u E E E E ee GORY SS a ag SDE OS PE YO Oe ExplosionSmokeParticleSystem ES Class ParticleSystem Methods chy ExplosionSmokeParticleSystem av InitializeConstants ExplosionParticleSystem 4 Class ParticleSystem El Fields E playerHit El Methods i ExplosionParticleSystem Phd InitializeConstants Y InitializeParticle Particle Class E Fields acceleration lifetime position rotation rotationSpeed scale timesincestart velocity Properties HT Active Methods 4 Initialize Update Figure 3 2 Particle System Classes Page 27 of 54 POD OA gt a a s A ra B D Bette T R AA e BackgroundScreen E GameplayScreen E MenuScreen Y GameTutorial y MessageBoxScreen E LoadingScreen E Class Class Abstract Class Class Class Class GameScreen GameScreen GameScreen GameScreen GameScreen Gamescreen WEN A J3 A SfxVolumeScreen y SkeeterScreen E MusicVolumeS
11. ve arrived at the All Games screen from either the Guide or NXE use the following procedure to download XNA Game Studio Connect 1 a 3 2 3 Downloading XNA Game Studio Connect from the All Games screen 1 a 3 2 3 1 From All Games browse to the Genre screen and select Other 1 a 3 2 3 2 Scroll to XNA Creators Club and press A Page 41 of 54 1 a 3 2 3 3 From the XNA Creators Club pane select All Downloads then XNA Game Studio Connect 1 a 3 2 3 4 Press the A controller button and select Confirm Download to begin downloading 1 a 3 3 Step 3 Connect Your Xbox 360 Console and Windows Based Computer 1 a 3 3 1 When you develop games for Xbox 360 you develop them on your Windows based computer then transfer them over your local network to your Xbox 360 console This requires that your Windows based computer and Xbox 360 console share the same subnet Most home networking layouts support this configuration If your console and computer share a router or hub it is likely that they share the same subnet 1 a 3 3 2 With your computer and console on the same subnet follow these steps to set up a connection between your computer and your console 1 a 3 3 3 Step 3A On Your Xbox 360 Console Generate a Connection Key 1 a 3 3 3 1 From the Xbox Dashboard go to My Xbox select Game Library and press the A controller button 1 a 3 3 3 2 Also you have the option of using the Xbox Guide select the Games tab then Game Library an
12. 7 30 00 Z Service Pack 1 is ready for download In this release we addressed some of the most requested features and top voted issues from customers 101 Async Samples in C and Visual Basic Mon 14 Feb 2011 05 55 00 Z Learn about the new Async features coming to C and Visual Basic by exploring the 101 Async samples online These features are available in the Visual Studio Async CTP Interview with Mads Torgersen on Async Thu 06 Jan 2011 09 10 00 Z Mark Miller from DevExpress interviews spec lead Mads Torgersen from Microsoft on Async a future C language feature Download Visual Studio 2010 Service Pack 1 Beta Thu 09 Dec 2010 18 20 00 Z Service Pack 1 Beta is ready for download Please try it out and let us know what you think Download Visual Studio Async CTP Thu 28 Oct 2010 19 45 00 Z Download the Visual Studio Async CTP with new syntax and APIs for asynchronous development with Visual C and Visual Basic Prism 4 0 Guidance for WPF Silverlight and Windows Phone 7 E Error List Output Ready Deploying an Ab 1 a 4 7 B SkeetShootersWin Microsoft Visual Studio y Faultinjector cN noa By SkeetshooterssRS O SkeetShootersWi NES BOLD we 1 09 PM The solution explorer contains all of the game s classes sounds music fonts and images Edit View Project Build Debug Data Tools Test Window Help H SkeetShootersXbox Gl SkeetShooters BurnNLearn F SilverlightBurnNLe
13. Device Center lets you manage and connect to multiple ANA Game Studio Ices els Add Device 1 a 3 3 4 3 Select the type of device you re adding In this case click Xbox 360 Choose the XNA Game Studio Device type you wish to add 1 a 3 3 4 4 Enter a name for this Xbox 360 console and click Next Give your Xbox 360 console a name Please choose a name for your Xbox 360 console This will be used to identify the Xbox 360 console In the ANA Game Studio Device Center box 360 Mame Page 44 of 54 1 a 3 3 4 4 1 This name serves only to identify your Xbox 360 console to XNA Game Studio The name does not need to correspond to any other computer or Xbox 360 name 1 a 3 3 4 5 Enter the connection key that is displayed in XNA Game Studio Connect on the Xbox 360 Type your Connection Key You can find the Connection Key displayed on the ANA Game Studio Connect screen on your Xbox 360 console The Connection Key looks similar to this Type your connection key dashes will be added automatically GCB63 ANCFR D2FJE 2UU 38 8C WB 1 a 3 3 4 5 1 The connection key might be somewhat hard to read on a standard television screen The following guide should help you identify specific letters and numbers 1 a 3 3 4 5 1 1 The number 1 has a small tick at its top left the capital letter I does not 1 a 3 3 4 5 1 2 The capital letter B has a straight line on the left the number 8 does not 1 a 3 3 4 5
14. SKEET SHOOTERS VIDEO GAMING SOFTWARE XBOX 360 VIDEO GAME CONSOLE Josh Yanai CEN 4935 Senior Software Engineering Project Janusz Zalewski Ph D Florida Gulf Coast University Spring 2011 PL d ge ler ger wes Table of Contents loire hi I CG Ner E C E HE 3 Problem Den min ouo aei os eoo E Pe Ses Eve quac a co ti 5 DESTA SOON li did thu busana usa 27 Irpl miettatiOD uya eges m e heey ert Ut dU ret 3l CONCIUSION e E 38 A uu xu OE 39 O A Tn ua ua header tie ate dereud coq e DU ME 40 Page 2 of 54 1 Introduction This project is a continuation of a video game project called Skeet Shooters that was developed in the Computer Graphics CAP 4730 course during the spring 2010 semester Skeet Shooters is a gaming program written in C and using Microsoft s XNA framework which runs on the Windows XP or later operating system The game is to be further developed and converted to run on the XBox 360 video game console Figure 1 1 The following hardware and software components necessary for completing this project are listed below 1 1 Hardware e Windows PC XP or later for game development and testing e XBox 360 video game console Figure 1 1 The XBox 360 video game console Is the second video game console produced by Microsoft and the successor to the XBox The XBox 360 competes with Sony s PlayStation 3 and Nintendo s Wii as part of the seventh generation of video game consoles 4 Figure 1 1 Xbox 360 vi
15. Volume Up increases the current sound effects volume level by 10 1 a 5 1 11 3 Selecting Volume Down decreases the current sound effects volume level by 10 1 a 5 1 11 4 Selecting Back displays the Sound Menu Screen 1 a 5 1 12 Game Tutorial Screen 1 a 5 1 12 1 Pressing the Start button displays the Pause Menu Screen Page 53 of 54 Page 54 of 54
16. Win v 55 Search p lu soss XM sln nr i 2 X oo m M E sWSMT Qo _ r ARA x Solution Explorer ae cd s LEHY PSA AEN mn Organize sss Views v f New Folder A r ake Name _ Date modified Type di Projects k E d SkeetShootersWin sIn i k Documents 1 0000 MIN o III III aaa Recent Places More gt pad keynotes and session Folders J SkeetShooters k bin k Content de obj 3 k Particles k Properties k publish k ScreenManager de Sereenc File name SkeetShootersWin sin v Al Project Files sln dsw v ic APIs for Windows n we addressed some of nd Visual Basic by Studio Async CTP bs ds Torgersen from Thu 09 Dec 2010 18 20 00 Z Service Pack 1 Beta is ready for download Please try it out and let us know what you think Download Visual Studio Async CTP Thu 28 Oct 2010 19 45 00 Z Download the Visual Studio Async CTP with new syntax and APIs for asynchronous development with Visual C and Visual Basic Prism 4 0 Guidance for WPF Silverlight and Windows Phone 7 Download Additional Content MSDN Forums Visual C Developer Center Extend Visual Studio Solution Explorer 73 Class Vi
17. Z Learn about the new Async features coming to C and Visual Basic by exploring the 101 Async samples online These features are available in the Visual Studio Async CTP Create Project Getting Started Interview with Mads Torgersen on Async Thu 06 Jan 2011 09 10 00 Z Mark Miller from DevExpress interviews spec lead Mads Torgersen from Microsoft on Async a future C language feature Download Visual Studio 2010 Service Pack 1 Beta Thu 09 Dec 2010 18 20 00 Z Service Pack 1 Beta is ready for download Please try it out and let us know what you think Download Visual Studio Async CTP Thu 28 Oct 2010 19 45 00 Z Download the Visual Studio Async CTP with new syntax and APIs for asynchronous development with Visual C and Visual Basic Prism 4 0 Guidance for WPF Silverlight and Windows Phone 7 What s new in Visual C Create Your First Application How Dol Learn Visual C Download Additional Content MSDN Forums Visual C Developer Center Extend Visual Studio Solution Explorer Z Class View B Error List s Output Ready Deploying an Xb BE Faultinjector U SkeetShootersDocs CNT 4104 DY SkeetShootersSRS 8 Start Page Micr IN lt BOJ wold 1 04PM 1 a 4 4 Locate the folder containing the XNA project solution B Start Page Microsoft Visual Studio y GA Open Project o A x J CEN4935 SkeetShooters
18. all be 0 2 2 7 5 Selecting the Back menu entry shall display the sound menu screen VOLUME 50 VOLUME DOWN BACK Figure 2 5 Music Volume Menu Screen Page 8 of 54 2 2 8 Menu Screen Sound Effects Volume Menu Screen Figure 2 6 The sound effects volume menu screen shall be displayed when the SFX Volume menu entry is selected from the sound menu screen 2 2 8 1 Selecting the Volume Up menu entry shall increase the sound effect volume by 10 and display the current sound effect volume 2 2 5 2 Maximum sound effect volume shall be 100 2 2 8 3 Selecting the Volume Down menu entry shall decrease the sound effect volume by 10 and display the current sound effect volume 2 2 8 4 Minimum sound effect volume shall be 0 2 2 8 5 Selecting the Back menu entry shall display the sound menu screen a a s OC Y ri p gt m Q D ISG balm LC CO IEE S Sera ps Om P SOUND FX a et rfe eg RI NEC _ e k A BUT e tz lt 2 Me Re Pre e gt A a UC CUN See p VOLUME 50 VOLUME Up Figure 2 6 Sound Effects Volume Menu Screen 2 2 9 Menu Screen Pause Menu Screen Figure 2 7 The pause menu screen shall be displayed when the START button Figure 2 11 is pressed anytime during actual game play 2 2 9 1 Selecting the Resume Game menu entry shall return the user to the currently running game 2 2 9 2 Selecting the Sound menu en
19. all gain the attribute of that power up 2 2 11 23 The power up names and their corresponding attributes shall be as follows e Life Up green o Intersecting a Life Up shall add one life point to the player s life points e Shield Up blue o Intersecting a Shield Up shall replenish the player s shield back to 10096 e Bonus Up red o Intersecting a Bonus Up shall give the player one of the following abilities K Bullet Speed Up e The velocity at which player s bullets move shall be incremented Points Up e The points earned per kill shall be incremented Spray Shot Up e The number of bullets shot when the A button is pressed shall be incremented 2 2 11 24 The collected Bonus Up ability shall be displayed for a few seconds at the position where the score 1s usually displayed 2 2 11 25 When the player intersects a Bonus Up the bonus gauge shall fill up 15 seconds total and the following shall happen e The bonus gauge time shall decrease every second for 15 seconds Page 13 of 54 e When another Bonus Up is intersected while the bonus gauge has time remaining the bonus gauge shall fill up and the Bonus Up ability shall be added on to any previously collected abilities e When the bonus gauge reaches zero all of the collected Bonus Up abilities shall be removed from the player 2 2 11 26 Pressing the START button Figure 2 11 while the game play screen is displayed shall display the pause menu screen F
20. ame AA Battery pack Xbox Guide button Back button Connect button net Left bumper a n HN Er Sart bultos _ Right trigger n h Right bumper L ft arizk Directional pad Xbox 360 Controller Layout 1 3 5 1 Menu Screens Page 51 of 54 1 a 5 1 1 Every menu screen contains a list of menu entries 1 a 5 1 2 Use the Left Stick or the Directional Pad to highlight a menu entry 1 a 5 1 3 Press the A button to select the highlighted menu entry 1 a 5 1 4 Main Menu Screen 1 a 5 1 4 1 Selecting Start Game displays the Skeeter Selection Screen where the user can select their character 1 a 5 1 4 2 Selecting Options displays the Options Menu Screen 1 a 5 1 4 3 Selecting Exit will terminate the program 1 a 5 1 5 Skeet Selection Screen 1 a 5 1 5 1 Selecting a character displays the Game Play Screen and begins a new game with the selected character 1 a 5 1 6 Game Play Screen 1 a 5 1 6 1 Use the Left Stick or Directional Pad to move your character a k a Skeeter 1 a 5 1 6 2 Pressing the A button shoots a bullet 1 a 5 1 6 3 Pressing the X button enables your shield 1 a 5 1 6 4 Pressing the Start button displays the Pause Menu Screen 1 a 5 1 7 Pause Menu Screen 1 a 5 1 7 1 Selecting Resume Game resumes the current game 1 a 5 1 7 2 Selecting Sound displays the Sound Menu Screen 1 a 5 1 7 3 Selecting Quit Game exits the current game and d
21. arn Open Project Create Project Getting Started What s new in Visual C Create Your First Application How Dol Learn Visual C Download Additional Content MSDN Forums Visual C Developer Center Extend Visual Studio El EJ S b X Ex AO C 4 5 p Debug x86 28 double gt RBA Start Page X solution Explorer Solutic k El Microsoft Z Solution SkeetShootersWin 1 project Visual Studio 2008 ddr H 54 Properties B a References Recent Projects MSDN Visual C Headlines B T Content A SkeetShootersWin Get Your MIX Fix Online a wass RN Faultinjector Wed 13 Apr 2011 19 05 00 Z Find out what you missed at MIX stream or download keynotes and session 6 Screens Visual Studio Async CTP SP1 Refresh Wed 13 Apr 2011 15 45 00 Z Download the Async CTP Refresh This CTP includes APIs for Windows B Game ico Phone 7 development is compatible with Visual Studio 2010 SP1 and has an updated EULA x ha e Download Visual Studio 2010 Service Pack 1 cl GameThumbnail png Wed 09 Mar 2011 17 30 00 Z Service Pack 1 is ready for download In this release we addressed some of i C Program cs 101 Async Samples in C and Visual Basic oon QandA cs Mon 14 Feb 2011 05 55 00 Z Learn about the new Async features coming to C and Visual Basic by ve ci SkeetShooters cs exploring the 101 Async samples online These features are available in the Visual Studio A
22. asses Figure 3 1 3 1 1 SreenManager cs A screen manager class was added to manage the transitioning between screens The screen manager is a component which manages one or more GameScreen cs instances It maintains a stack of screens calls their Update and Draw methods at the appropriate times and automatically routes input to the topmost active screen 3 1 2 AudioManager cs An audio manager class was added to manage the playback of the various game sounds and music 3 1 3 InputState cs An input state class was added to act as a helper for reading input from the XBox 360 controller This class tracks both the current and previous state of both input devices and implements query methods for high level input actions such as move up through the menu or pause the game 3 1 4 PlayerIndexEventArgs cs A player index event class was added to customize event argument to include the index of the player who triggered the event 3 1 5 Program cs The program class is the main entry point of the application 3 1 6 SkeetShooters cs The skeet shooters class initializes an instance of ScreenManager cs and AudioManager cs Page 22 of 54 3 2 Particle System Classes Figure 3 2 3 2 1 ParticleSystem cs ParticleSystem cs is an abstract class that provides the basic functionality to create a particle effect Different subclasses have different effects such as fire explosions and plumes of smoke 3 2 2 Particle cs Particles cs represen
23. ate e The bullet shall move at a velocity slightly faster than the player s current velocity 2 2 11 13 If an enemy is hit by one of the player s bullets the following shall happen e The enemy shall disappear e Explosion fire and smoke shall be displayed at the point where the enemy was hit e The player s score shall be increased 2 2 11 14 If a bullet flies off screen the bullet shall disappear 2 2 11 15 Holding the X button Figure 2 11 shall display a shield surrounding the player s character 2 2 11 16 If an enemy 1s hit by the shield the following shall happen e The enemy shall disappear e Explosion fire and smoke shall be displayed at the point where the enemy was hit e The player s score shall be increased e Shield power shall be decreased 2 2 11 17 If an enemy bullet hits the shield the following shall happen e Enemy bullet shall disappear e Shield power shall be decreased 2 2 11 18 Enemies shall randomly drop items called power ups Figure 2 12 when killed by the player s shield or by one of the player s bullets Page 12 of 54 2 2 11 19 The initial position of the power up shall be the same X Y coordinate as the enemy that dropped the power up 2 2 11 20 Once dropped the power up shall be displayed as falling from its initial position to a position off screen 2 2 11 21 If the power up falls off screen it shall disappear 2 2 11 22 When the player intersects a power up the player sh
24. aultinjector w SkeetShooterssKs lt EO gt We 1 03PM Deploying an Ab 1 a 4 3 Click Open and then Click Project Solution B Start Page Micr Page 48 of 54 B Start Page Microsoft Visual Studio File Edit View Tools Test Window Help l Ne Sele oe A las 958260 ee Open gt A Analysis Services Database X Solution Explorer Close i Project Solution Ctrl Shift O 7 Close Solution e Web Site Shift Alt O Al Save Selected Items Ctrl S File Ctrl O Save Selected Items As Convert il Save All Ctrl Shift S MSDN Visual C Headlines Export Template Get Your MIX Fix Online Wed 13 Apr 2011 19 05 00 Z Find out what you missed at MIX stream or download keynotes and session 1 content for free at live visitmix com 1 Page Setup 3 Print Ctrl P E Visual Studio Async CTP SP1 Refresh Recent Files E Wed 13 Apr 2011 15 45 00 Z Download the Async CTP Refresh This CTP includes APIs for Windows E Recent Projects gt Phone 7 development is compatible with Visual Studio 2010 SP1 and has an updated EULA Download Visual Studio 2010 Service Pack 1 Wed 09 Mar 2011 17 30 00 Z Service Pack 1 is ready for download In this release we addressed some of the most requested features and top voted issues from customers 101 Async Samples in C and Visual Basic Mon 14 Feb 2011 05 55 00
25. can be used to prevent enemies and their bullets from damaging the player e The message shall also prompt the user to press the B button to continue 2 2 12 20 Once the B button is pressed a message shall be displayed explaining where the player s shield power is displayed and how the shield power decreases each time the player s shield is hit by an enemy or enemy bullet e The message shall also prompt the user to press the B Button to continue 2 2 12 21 Once the B button is pressed a message shall be displayed prompting the user to hit an enemy with the shield activated 2 2 12 22 Once an enemy is hit by the shield the following shall happen e The enemy shall disappear e Explosion fire and smoke shall be displayed at the point where the enemy was hit e The player s score shall be increased e Shield power shall be decreased e A message shall be displayed explaining that the player s score increases when an enemy is hit by the player s shield Page 17 of 54 o The message shall also prompt the user to press the B button to continue 2 2 12 23 Once the B button is pressed a message shall be displayed prompting the user to hit another enemy with a bullet or the shield 2 2 12 24 When an enemy 1s hit in this way the following shall happen e A power up shall be displayed at the point where the enemy was killed e A message shall be displayed explaining that the dropped item is referred to as a power up o The messag
26. ched keys 1 a 3 3 4 10 Click Finish 1 a 3 3 4 10 1 The name you gave to your Xbox 360 console will be listed in the XNA Game Studio Device Center From now on your computer and your console can connect to each other easily 1 a 3 4 Step 4 Create and Deploy an Xbox 360 Project 1 a 3 4 1 Try out the Xbox 360 console by deploying a simple blank XNA Game Studio game to it 1 a 3 4 2 On your Windows based computer at the main Visual Studio screen select the File menu and then click New Project 1 a 3 4 3 From Project types expand the Visual C and click XNA Game Studio 3 1 1 a 3 4 4 In Templates select Xbox 360 Game 3 1 and then click OK Page 46 of 54 1 a 3 4 5 At this point you should bring up XNA Game Studio Connect to prepare the Xbox 360 console to receive content from the Windows based computer 1 a 3 4 6 From the Xbox Dashboard go to My Xbox select Game Library and press A on the controller 1 a 3 4 7 You can also use the Guide select the Games tab select Game Library and then press A 1 a 3 4 8 From the Game Library go to the Collections tab select Community Games and press A 1 a 3 4 9 Select XNA Game Studio Connect and press A 1 a 3 4 10 Select Launch and press A 1 a 3 4 11 The XNA Game Studio Connect screen appears ANA Game Studio Connect f Back Connect to Another Computer Reset All Connections 1 a 3 4 12 On your Windows based computer with your new proje
27. controller Figure 2 11 to shoot a bullet 2 2 12 7 Pressing the A button shall make the player s character shoot a bullet 2 2 12 8 When a bullet is shot the bullet shall start at the X Y position of the player s character and move as follows e The bullet shall move right along the X axis while keeping the same Y coordinate e The bullet shall move at a velocity slightly faster than the player s current velocity e Ifa bullet flies off screen the bullet shall disappear 2 2 12 9 Once the bullet has flown off screen a message shall be displayed prompting the user to shoot an enemy with a bullet 2 2 12 10 A maximum of two enemies shall be displayed on the screen at any given time during the rest of the tutorial 2 2 12 11 Enemies shall be displayed flying from right to left across the game play screen Page 15 of 54 2 2 12 12 Each time a new enemy is to be drawn a random velocity and flying height shall be given to that enemy 2 2 12 13 If an enemy runs into the player s character the following shall happen e The player s life shall be decreased by one unit o Ifthe player s life points reach zero then a message shall be displayed explaining to the user that they have run out of life points and prompting the user to press the B button to continue Pressing the B button shall do the following e Refill the player s life points e Continue with the tutorial e The enemy shall disappear e Explosion fire and smoke shal
28. creen Y SoundMenuScreen OptionsMenuScreen y MainMenuScreen Y PauseMenuScreen E Class Class Class Class Class Class Class MenuScreen MenuScreen MenuScreen MenuScreen MenuScreen MenuScreen MenuScreen Figure 3 3 Game and Menu Screen Classes Overview PauseMenuScreen MusicVolumeScreen B Class Class MenuScreen PRA EB MenuScreen Eo MenuScreen A E Methods Abstract Class E Fields MenuScreen e ConfirmQuitMessageBoxAccepted gt GameScreen ye musicVolumeMenuEntry 3 Fields 49 Draw E Fields i a volume g characters Y PauseMenuScreen i Sl Methods r w T uM g menuEntries 3 charMenuPoint QuitGameMenuEntrySelect di candle Draw 9 charSelector WC SE ee aP menuTitle i MusicVolumeScreen d content 2 menuTitlePoint E SetMenuEntryText y font ye selectedEntry a VolumeDownMenuEntrySelected 3 hpBar EUN E 8 Y VolumeUpMenuEntrySelected a selectionFade Class Properties T pm i Method orn MenuEntries i 7 1 E Fields pum RE andleInpu g sfxVolumeMenuEntry Y Draw i LoadContent Handlelnput a volume SkeeterScreen E Methods Cu PEE UnloadContent E OnCancel 1 overload Draw OnSelectEntry e SetMenuEntryText Q Update MenuEntry UpdateCharSelector SfxVolumeScreen lt A ME Class Y VolumeDownMenuEntrySelected e VolumeUpMenuEntrySelected Fields OptionsMenuScreen r n Class 3 selec
29. creen cs and is where the options menu screen logic is implemented Page 33 of 54 The class constructor initializes the menu entries and hooks up an event handler to each menu entry public OptionsMenuScreen base Options Create our menu entries difficultyMenuEntry new MenuEntry string Empty SetMenuEntryText MenuEntry tutorialMenuEntry new MenuEntry Tutorial MenuEntry soundMenuEntry new MenuEntry Sound MenuEntry backMenuEntry new MenuEntry Back Hook up menu event handlers difficultyMenuEntry Selected DifficultyMenuEntrySelected tutorialMenuEntry Selected TutorialMenuEntrySelected soundMenuEntry Selected SoundMenuEntrySelected backMenuEntry Selected OnCancel Add entries to the menu MenuEntries Add difficultyMenuEntry MenuEntries Add tutorialMenuEntry MenuEntries Add soundMenuEntry MenuEntries Add backMenuEntry SoundMenusScreen cs inherits MenuScreen cs and is where the sound menu screen logic is implemented The class constructor initializes the menu entries and hooks up an event handler to each menu entry public SoundMenuScreen bool isPopup base Sound IsPopup isPopup MenuEntry musicVolumeMenuEntry new MenuEntry Music Volume MenuEntry sfxVolumeDownMenuEntry new MenuEntry SFX Volume MenuEntry nextSongMenuEntry new MenuEntry Next Song MenuEntry prevSongMenuEntry new MenuEntry Prev Song MenuEntry backMenuEntr
30. ct open press the F5 key 1 a 3 4 12 1 The project will build deploy necessary files to the Xbox 360 console and run 1 a 3 4 12 2 At this point you should see a simple display on your console just a blue screen If you see this screen you have Page 47 of 54 1 a 3 4 13 4 1 a 4 1 1 a 4 2 successfully deployed a game to your Xbox 360 console You can now deploy and play any game you create on your console To stop the game and return to the main screen of XNA Game Studio Connect either press the BACK button on your Xbox 360 gamepad or press SHIFT F5 to stop debugging on your computer Opening an Existing XNA Project Run Microsoft Visual Studio 2008 Click on the File drop down menu B Start Page Microsoft Visual Studio Edit View Tools Test Window Help 2g id i X 3a A M Microsoft ee oe a ue e Start Page vx Visual Studio 2008 Recent Projects SkeetShootersXbox SkeetShootersWin SkeetShooters BurnNLearn U SilverlightBurnNLearn Open Create Project Project Getting Started What s new in Visual C Create Your First Application How Dol Learn Visual C Download Additional Content MSDN Forums Visual C Developer Center Extend Visual Studio MSDN Visual C Headlines Get Your MIX Fix Online Wed 13 Apr 2011 19 05 00 Z Find out what you missed at MIX stream or download keynotes and session 1 content for fre
31. d press the A controller button 1 a 3 3 3 3 From the Game Library go to the Collections tab select Community Games and press A 1 a 3 3 3 4 Select XNA Game Studio Connect and press A 1 a 3 3 3 5 Select Launch and press A 1 a 3 3 3 6 The XNA Game Studio Connect screen appears Page 42 of 54 XNA Game Studio Connect Back Connect to Another Computer Reset All Connections 1 a 3 3 3 7 If the XNA Game Studio Connect screen displays a connection key continue to step 3B 1 a 3 3 3 8 If the connection key does not appear you can generate a new key by pressing the X controller button 1 a 3 3 3 8 1 If the connection key does not appear the Xbox console could already be connected to this Windows based computer XNA Game Studio allows multiple connection keys for multiple users on multiple computers For more information see Using XN tudio nter To add a new connection key to the list of connection keys recognized by this Xbox 360 console press X To reset all connection keys and generate a new connection key to connect to this Xbox 360 console press Y 1 a 3 3 4 Step 3B On Your Windows Based Computer Enter the Connection Key and Initiate the Connection 1 a 3 3 4 1 From the Start menu select Programs select XNA Game Studio 3 1 and launch the XNA Game Studio Device Center Page 43 of 54 1 a 3 3 4 2 Click Add Device El XNA Game Studio Device Center llim 3 Game Studio Device Center ANA Game Studio
32. d when a Skeeter is selected from the skeet selection screen This class contains all of the logic for running the actual game play 3 4 7 GameObject cs An instance of this class represents a single game object in GameTutorial cs and GameplayScreen cs Page 25 of 54 m amam Gmm s m C mmm GO RS OR EO CU DO GENS m I Program amp Static Class E Methods 3 Main a SS sss usss o S m m z A SkeetShooters 2 InputState amp Class Game El Fields a audioManager g graphics a screenManager Properties e Graphics mm SpriteBatch E Methods e Draw e Initialize e LoadContent 4 SkeetShooters Class Fields CurrentGameP ad States CurrentKeyboardStates GamePadWasConnected LastGamePadStates LastKeyboardStates MaxInputs ethods be amp amp El InputState EMenuCancel EMenuDown MenuSelect IsMenuUp IsMewButtonHold leMNewButtonPress IsNewKeyHold IsNewKeyPress sPauseGame Update 0020202 RAR ScreenManager ES Class Drawablecametomporert zl Fields audio blankTexture difficulty font input isInitialized screens screensToUpdate spriteBatch thisSkeet traceEnabled ES m a roperties Audio BlankTexture Difficulty Font SafeArea SpriteBatch ThisSkeet TraceEnabled ethods AddScreen Draw FadeBackBufferToBlack GetScreens Initialize LoadContent RemoveScreen ij p yy yy ul ScreenManager T
33. deo game console 5 e Mad Catz wireless gaming adapter Figure 1 2 The Mad Catz wireless gaming adapter provides a wireless broadband Internet connection for the Xbox 360 The adapter connects to the Xbox 360 via Ethernet port and is compatible with 802 11 b g n wireless networks Page 3 of 54 Figure 1 2 Mad Catz wireless gaming adapter 6 1 2 Software Microsoft Visual Studio 2008 Microsoft Visual Studio is an integrated development environment IDE from Microsoft It can be used to develop console and graphical user interface applications along with Windows Forms applications web sites web applications and web services in both native code together with managed code for all platforms supported by Microsoft Windows Windows Mobile Windows CE NET Framework NET Compact Framework and Microsoft Silverlight 2 Microsoft XNA framework Microsoft XNA is a set of tools with a managed runtime environment provided by Microsoft that facilitates computer game development and management XNA attempts to free game developers from writing repetitive boilerplate code and to bring different aspects of game production into a single system 3 Page 4 of 54 2 Problem Description 2 1 Project Objective and Features The objective of this project is to port the Skeet Shooters gaming software to run on the XBox 360 gaming system Other additions to the game include e Adding smooth and visually appealing screen transitions
34. e Changing the main menu screen Figure 2 2 e Adding an options menu screen Figure 2 3 e Adding difficulty level selection beginner intermediate expert Figure 2 3 e Adding an interactive game tutorial Figure 2 10 e Adding a sound menu screen Figure 2 4 e Adding a music volume menu screen Figure 2 5 e Adding a sound effects volume menu screen Figure 2 6 e Adding a pause menu screen Figure 2 7 e Adding amore game sounds and music e Making minor graphical adjustments changes e Making minor game play adjustments changes XBOX 360 Device XBOX 360 Controller XBOX Live Server Skeet Shooter Video Game User Input Figure 2 1 Context Diagram 2 2 Functional Requirements 2 2 1 The video game shall run on the Xbox 360 video game console 2 2 2 The video game shall have multiple menu screens Page 5 of 54 2 2 3 Each menu screen shall have multiple menu entries 2 2 3 1 The top most menu entry of a menu screen shall be highlighted initially 2 2 3 2 Pressing UP on the Directional Pad Figure 2 11 shall highlight the menu entry above the currently highlight entry 2 2 3 3 If the currently highlighted menu entry is the top most menu entry then the bottom most menu entry shall be highlighted 2 2 3 4 Pressing DOWN on the Directional Pad Figure 2 11 shall highlight the menu entry below the currently highlight entry 2 2 3 5 If the currently highlighted menu entry is the bottom most menu entry
35. e at live visitmix com Visual Studio Async CTP SP1 Refresh Wed 13 Apr 2011 15 45 00 Z Download the Async CTP Refresh This CTP includes APIs for Windows Phone 7 development is compatible with Visual Studio 2010 SP1 and has an updated EULA Download Visual Studio 2010 Service Pack 1 Wed 09 Mar 2011 17 30 00 Z Service Pack 1 is ready for download In this release we addressed some of the most requested features and top voted issues from customers 101 Async Samples in C and Visual Basic Mon 14 Feb 2011 05 55 00 Z Learn about the new Async features coming to C and Visual Basic by exploring the 101 Async samples online These features are available in the Visual Studio Async CTP Interview with Mads Torgersen on Async Thu 06 Jan 2011 09 10 00 Z Mark Miller from DevExpress interviews spec lead Mads Torgersen from Microsoft on Async a future C language feature Download Visual Studio 2010 Service Pack 1 Beta Thu 09 Dec 2010 18 20 00 Z Service Pack 1 Beta is ready for download Please try it out and let us know what you think Download Visual Studio Async CTP Thu 28 Oct 2010 19 45 00 Z Download the Visual Studio Async CTP with new syntax and APIs for asynchronous development with Visual C and Visual Basic Prism 4 0 Guidance for WPF Silverlight and Windows Phone 7 Moe e Bl n Solution Explorer ES n c Solution Explorer ZZ Class View E Error List Z Output Ready E F
36. e shall also prompt the user to press the B button to continue 2 2 12 25 Once the B button is pressed a message shall be displayed explaining that power ups are randomly dropped by enemies when killed e The message shall also prompt the user to press the B button to continue 2 2 12 26 Once the B button is pressed the following shall happen e A life up green orb shall be displayed e A message shall be displayed explaining that this power up is called a life up o The message shall also explain that this power up adds one life point to the player s current life points o The message shall also prompt the user to press the B button to continue 2 2 12 27 Once the B buton is pressed the following shall happen e Ashield up blue orb shall be displayed e A message shall be displayed explaining that this power up is called a shield up o The message shall also explain that this power up replenishes the player s shield power back to 100 o The message shall also prompt the user to press the B button to continue 2 2 12 28 Once the B button is pressed the following shall happen Page 18 of 54 e A bonus up red orb shall be displayed e A message shall be displayed explaining that this power up is called a bonus up e The message shall also explain that this power up will give the player one of three abilities o Bullet Speed Up The velocity at which player s bullets move shall be incremented o Points Up The points earned per
37. elected backMenuEntry Selected OnCancel Add entries to the menu MenuEntries Add musicVolumeMenuEntry MenuEntries Add volumeUpMenuEntry MenuEntries Add volumeDownMenuEntry MenuEntries Add backMenuEntry Sfx VolumeScreen cs inherits MenuScreen cs and is where the sound effects volume menu screen logic is implemented The class constructor initializes the menu entries and hooks up an event handler to each menu entry public SfxVolumeScreen float sfxVolume bool isPopup Page 35 of 54 base Sound FX IsPopup isPopup Create our menu entries sfxVolumeMenuEntry new MenuEntry string Empty convert volume to percent volume int sfxVolume 100 if volume 10 0 volume 10 volume 10 volume SetMenuEntryText MenuEntry volumeUpMenuEntry new MenuEntry Volume Up MenuEntry volumeDownMenuEntry new MenuEntry Volume Down MenuEntry backMenuEntry new MenuEntry Back Hook up menu event handlers volumeUpMenuEntry Selected VolumeUpMenuEntrySelected volumeDownMenuEntry Selected VolumeDownMenuEntrySelected backMenuEntry Selected OnCancel Add entries to the menu MenuEntries Add sfxVolumeMenuEntry MenuEntries Add volumeUpMenuEntry MenuEntries Add volumeDownMenuEntry MenuEntries Add backMenuEntry PauseMenusScreen cs inherits MenuScreen cs and is where the pause menu screen logic is implemented The class constructor initializes the me
38. enemy runs into the player s character the following shall happen e The player s life shall be decreased by one unit e The enemy shall disappear e Explosion fire and smoke shall be displayed at the point where the enemy was 2 2 11 5 If an enemy flies off screen the enemy shall disappear 2 2 11 6 Enemies shall randomly shoot bullets 2 2 11 7 When an enemy bullet is shot the bullet shall start at the X Y position of the enemy that shot it and move as follows e The enemy bullet shall move left along the X axis while keeping the same Y coordinate e The enemy bullet shall move at a velocity slightly faster than the enemy that shot it 2 2 11 8 If an enemy bullet hits the player s character the player s life shall be decreased by one unit and the following shall happen e The enemy bullet shall disappear e A small explosion fire shall be displayed at the point where the enemy bullet hit the player s character Page 11 of 54 2 2 11 9 If an enemy bullet flies off screen the bullet shall disappear 2 2 11 10 Moving the Left Stick Figure 2 11 up down left or right shall move the player s character accordingly 2 2 11 11 Pressing the A button Figure 2 11 shall make the player s character shoot a bullet 2 2 11 12 When a player bullet is shot the bullet shall start at the X Y position of the player s character and move as follows e The bullet shall move right along the X axis while keeping the same Y coordin
39. ew B Error List s Output Deploying an Xb BE Faultinjector BE SkeetShootersDocs E CNT 4104 EJ SkeetShootersSRS 8 Start Page Micr IN lt BOD Wm 1 05PM 1 a 4 5 Click on the solution and then Click Open 1 a 4 6 Open the solution explorer by clicking the solution explorer icon Page 49 of 54 B SkeetShootersWin Microsoft Visual Studio Edit View Project Build Debug Data Tools Test Window Help 0 3 2 ld d X 5a A1907 G Sl b Debug x86 Microsoft z Z double 93 2 B F1 Solution Explorer Ctrl W S Visual Studio 2008 Recent Projects P SkeetShootersWin FaultInjector SkeetShootersXbox SkeetShooters BurnNLearn 2 SilverlightBurnNLearn Open Project Create Project Getting Started What s new in Visual C Create Your First Application How DoI Learn Visual C Download Additional Content MSDN Forums Visual C Developer Center Extend Visual Studio MSDN Visual C Headlines Get Your MIX Fix Online Wed 13 Apr 2011 19 05 00 Z Find out what you missed at MIX stream or download keynotes and session content for free at live visitmix com Visual Studio Async CTP SP1 Refresh Wed 13 Apr 2011 15 45 00 Z Download the Async CTP Refresh This CTP includes APIs for Windows Phone 7 development is compatible with Visual Studio 2010 SP1 and has an updated EULA Download Visual Studio 2010 Service Pack 1 Wed 09 Mar 2011 1
40. he above ports used by Xbox LIVE Connecting to Xbox 360 console using XNA Game Studio 3 1 This section was taken from an MSDN tutorial found here lt http msdn microsoft com en us library bb975643 v XNAGameStudio 31 aspx gt 1 a 3 1 Step 1 Sign In to Xbox LIVE 1 a 3 1 1 Turn on your Xbox 360 console and sign in to Xbox LIVE At the very least you will need a Silver Xbox LIVE membership an XNA Creators Club premium membership and a hard drive for your Xbox 360 console to be able to develop games for Xbox 360 using XNA Game Studio While you are in XNA Game Studio Connect or playing an XNA Game Studio game you need to be connected to Xbox LIVE 1 a 3 1 2 Connections between your Xbox 360 console and XNA Game Studio require a premium membership in XNA Creators Club To sign up visit the XNA Creators Club Web site 1 a 3 2 Step 2 Download XNA Game Studio Connect Page 40 of 54 1 a 3 2 1 You must download XNA Game Studio Connect from Xbox LIVE Marketplace and install it on the Xbox 360 console Go to the Xbox LIVE Marketplace to find XNA Game Studio Connect To download XNA Game Studio Connect choose one of the following options 1 a 3 2 2 Browsing to All Games using the Guide 1 a 3 2 2 1 From the Guide navigate to the Marketplace blade 1 a 3 2 2 2 Select Game Marketplace then All Games This brings you to the All Games screen ALL Games Title Select Back f Marketplace 1 a 3 2 2 3 Once you
41. igure 2 9 Game Play Screen 2 2 12 Game Tutorial Screen Figure 2 10 The game tutorial screen shall be displayed when the Tutorial menu entry is selected from the options menu screen 2 2 12 1 The player s status bar Figure 2 10 bottom of image shall display the following e Player s life points o One green orb one life point e Percentage of shield power remaining e Amount of bonus time remaining in the bonus gauge o One red orb one second e Player s score Page 14 of 54 2 2 12 2 An introduction message Figure 2 10 shall be displayed introducing the user to the game tutorial and prompting the user to press the B button on the Xbox 360 controller Figure 2 11 to continue 2 2 12 3 Once the B button is pressed a message shall be displayed explaining to the user that moving the Left Stick on the Xbox 360 controller Figure 2 11 moves the player accordingly e The message shall continue being displayed until the Left stick 1s moved 2 2 12 4 Once the Left stick is moved the player shall be moved in the corresponding direction until the Left stick 1s released e Moving the Left stick UP DOWN LEFT or RIGHT shall move the player s character accordingly 2 2 12 5 The tutorial shall wait a few second after the initial movement of the Left st ck before displaying the next message 2 2 12 6 Once a few seconds have passed a message shall be displayed prompting the user to press the A button on the Xbox 360
42. isplays the Main Menu Screen 1 a 5 1 8 Options Menu Screen 1 a 5 1 8 1 Selecting Difficulty changes the difficulty level 1 a 5 1 8 2 Selecting Tutorial displays the Game Tutorial Screen 1 a 5 1 8 3 Selecting Sound displays the Sound Menu Screen 1 a 5 1 8 4 Selecting Back displays the Main Menu Screen 1 a 5 1 9 Sound Menu Screen 1 a 5 1 9 1 Selecting Music Volume displays the Music Volume Screen Page 52 of 54 1 a 5 1 9 2 Selecting SFX Volume displays the Sound Effects Volume Screen 1 a 5 1 9 3 Selecting Next Song stops the currently playing song and plays the next song in the music queue 1 a 5 1 9 4 Selecting Prev Song stops the currently playing song and plays the previous song in the music queue 1 a 5 1 9 5 Selecting Back displays the Options Menu Screen 1 a 5 1 9 6 Selecting Next Song stops the currently playing song and plays the next song in the music queue 1 a 5 1 10 Music Volume Screen 1 a 5 1 10 1 The top menu entry displays the current music volume level 1 a 5 1 10 2 Selecting Volume Up increases the current music volume level by 10 1 a 5 1 10 3 Selecting Volume Down decreases the current music volume level by 10 1 a 5 1 10 4 Selecting Back displays the Sound Menu Screen 1 a 5 1 11 SFX Volume Screen 1 a 5 1 11 1 The top menu entry displays the current sound effects volume level 1 a 5 1 11 2 Selecting
43. kill shall be incremented o Spray Shot Up The number of bullets shot when the A button is pressed shall be incremented e The message shall also prompt the user to press the B button to continue 2 2 12 29 Once the B button is pressed a message shall be displayed explaining where the bonus gauge is displayed e The message shall also prompt the user to press the B button to continue 2 2 12 30 Once the B button is pressed a message shall be displayed explaining that whenever the player intersects a bonus up and the correct answer is selected the player s bonus gauge will fill e The message shall also prompt the user to press the B button to continue 2 2 12 31 Once the B button is pressed a message shall be displayed explaining where the collected bonus up effect is displayed e The message shall also prompt the user to press the B button to continue 2 2 12 32 Once the B button is pressed a message shall be displayed explaining that the player s bonus gauge decreases over time e The message shall also prompt the user to press the B button to continue Page 19 of 54 2 2 12 33 Once the B button is pressed a message shall be displayed explaining that when the bonus gauge runs out the player will lose all bonus effects that have been collected so far e The message shall also prompt the user to press the B button to continue 2 2 12 34 Once the B button is pressed a message shall be displayed explaining that it is possib
44. l be displayed at the point where the enemy was 2 2 12 14 If an enemy flies off screen the enemy shall disappear and a new enemy shall be drawn 2 2 12 15 Once an enemy is hit by one of the player s bullets the following shall happen e The enemy shall disappear e Explosion fire and smoke shall be displayed at the point where the enemy was hit e The player s score shall be increased e A message shall be displayed explaining where the player s score is displayed and how to increase the player s score o The message shall prompt the user to press the B button to continue 2 2 12 16 Once the B button has been pressed a message shall be displayed explaining where the player s life points are displayed e The message shall also prompt the user to press the B button to continue Page 16 of 54 2 2 12 17 Once the B button has been pressed a message shall be displayed explaining that when the player gets hit by an enemy or enemy bullet the players life points shall decrease by one unit e The message shall also prompt the user to press the B button to continue 2 2 12 18 Once the B button has been pressed a message shall be displayed prompting the user to hold the X button on the Xbox 360 controller Figure 2 11 to activate their player s shield e Holding the X button shall display a shield surrounding the player s character 2 2 12 19 Once the B button is pressed a message shall be displayed explaining that the shield
45. le to collect multiple bonus effects by keeping the bonus gauge active e The message shall also prompt the user to press the B button to continue 2 2 12 35 Once the B button is pressed a message shall be displayed explaining that multiple bonus effects can be collected by collecting another bonus up before the bonus gauge becomes empty e The message shall also prompt the user to press the B button to continue 2 2 12 36 Once the B button is pressed a message shall be displayed ending the tutorial e The message shall also prompt the user to press the B button to continue SKEET SHOOTERS TUTORIAL B BUTTON CONTINUE Figure 2 10 Game Tutorial Screen Page 20 of 54 AA battery parh Xbox Guide button Back button Lett trigger Start Suttos Right tigger Left bumper E ml E L NR G a Figure 2 12 Power Up Images Page 21 of 54 3 Design Solution The XBox 360 along with the testing computer running Microsoft Visual Studio 2008 and Game Studio 3 1 is used to complete this project The XBox 360 must be connected to a video display device for testing purposes and must be on the same network as the testing computer A Madcatz wireless adapter is used to connect the XBox 360 to the same wireless network in which the testing computer is connected The game program is written using C and XNA framework with the above mentioned editing software All major classes are described below 3 1 Miscellaneous Cl
46. nu entries and hooks up an event handler to each menu entry public PauseMenuScreen base Paused Flag that there is no need for the game to transition off when the pause menu is on top of it LSPODUD True I4 Create our menu entries MenuEntry resumeGameMenuEntry new MenuEntry Resume Game MenuEntry soundMenuEntry new MenuEntry Sound MenuEntry quitGameMenuEntry new MenuEntry Quit Game Hook up menu event handlers resumeGameMenuEntry Selected OnCancel soundMenuEntry Selected SoundMenuEntrySelected quitGameMenuEntry Selected QuitGameMenuEntrySelected Page 36 of 54 Add entries to the menu MenuEntries Add resumeGameMenuEntry MenuEntries Add soundMenuEntry MenuEntries Add quitGameMenuEntry Page 37 of 54 5 Conclusion The Skeet Shooters Windows game was successfully ported to run on the XBox 360 video game console Playing the game on the XBox 360 requires that it and the Windows PC be connected to the same network with access to the Internet The XBox 360 requires a number of network ports to be open in order to access the Internet see user manual Testing the game on the XBox 360 in the computer science lab proved to be quite difficult because many of the needed ports have been closed throughout the entire campus Further extensions to the game may include gt High scores screen to display the top scores gt More selectable characters and backgrounds
47. onus Title bonus TrtlheDP box content dialog diabod Pont dialogPositioen cou Hey draw Dialog Box enemies Ene mir enemy Bal toa nter enemy Balls enemy cunter entertontinus ex poe cr font h P zd I ra cd ex introPondt laser lifeBar hiteBarDbP lfePoint lifeTitle lifeTileGP mao Balls max EocnuspmdeseeageTinrve max Bonus Tinte rre Enemies mao Enenn Balls rra E noe roe bcc Fn max Lite PRP omets min Emenn elec rey riim 3 eint mest cel Pause player plasyerEalls player rt poner Jp eres icocusEnemyr Height rando rnm safeArea Sore score Draw Point soo me Bu be shred sh reld Poicweer shreldPowerDP shreldT ime shreldTimelhtlac shreldT itle shreldTitlheDP shiepspeed rm ke sprite Batch statusbar textsize EnShot tutoriallndex Ter Deere portec Pad Addon put ext Draws Drep P oer Pp FireBall Game Tutorral RHhandleln put Load Content Load LD ca lty Lo dSelection SetDialeg SetScoreDialeg Un load entent Update UpdateBalls UpdateEnemies LI p datebces werlps LIp datethield Figure 3 6 Game Play and Game Tutorial Classes GameD0bject Class E Fields a l r s center oe add ran s positron s sprite velocity E Methods U GamelDbject Page 30 of 54 4 Implementation The main entry point for the game application is in Program cs This class creates an instance of the SkeetShooters cs class and then calls the R
48. raceScreens UnloadContent Update PlayerIndexEventArgs amp Class EventArgs E Fields a playerlndex Properties EM Playerindex E Methods PlayerIndexEventArgs Figure 3 1 Miscellaneous Classes AudioManager A Class GameComponert E Fields p ee Q o SSS i SQ Q Q Q Q content currentSong currentSongMum fadeEffect isFading isMusicPaused maxSounds playingSounds prev MediaState songAssetLocation songMames songs soundAssetl ocation soundNames sounds Properties dp dp ke ke ke CurrentSong IsSongActive IsSongPaused MusicVolume SoundVolume E Methods ili dbi ili dli i ih ih l ih l i il ih il ih Bai Bai dio dh ili GGCESCCCEECECESCECEECE SSE 2 e AudioManager 1 overload CancelFade FadeSong Get vallablescundindex ssoundPlaying LoadSong LoadSongs LoadSound LoadSounds OnEnabledChanged Pausesong PlayMextSong PlayPrevSong PlaySong 1 overload PlaySound 2 overloads Resumesong StopAllSounds StopSong StopSound UnloadContent Update Nested Types Page 26 of 54 ParticleSystem z Abstract Class DrawableGametomponent 3l Fields AdditiveDrawOrder AlphaBlendDrawOrder freeParticles game how ManyEffects maxAcceleration maxInitialSpeed max Lifetime maxMumbParticles maxRotationspeed maxscale minAcceleration mindnitialSpeed minLifetime minMumbParticles minRotationSpeed minScale
49. re still busy transitioning Page 32 of 54 return true The class that is the base class for all game screens containing a menu of options is MenuScreen cs Each of the game s menu screens inherits MenuScreen cs The Update method updates the menu screen and its menu entries public override void Update GameTime gameTime bool otherScreenHasFocus bool coveredByOtherScreen base Update gameTime otherScreenHasFocus coveredByOtherScreen Update each nested MenuEntry object for int i 0 i lt menuEntries Count i bool isSelected IsActive amp amp i selectedEntry menuEntries i Update this isSelected gameTime MainMenuScreen cs inherits MenuScreen cs and is where the main menu screen logic is implemented The class constructor initializes the menu entries and hooks up an event handler to each menu entry public MainMenuScreen base Main Menu Create our menu entries MenuEntry playGameMenuEntry new MenuEntry Start Game MenuEntry optionsMenuEntry new MenuEntry Options MenuEntry exitMenuEntry new MenuEntry Exit Hook up menu event handlers playGameMenuEntry Selected PlayGameMenuEntrySelected optionsMenuEntry Selected OptionsMenuEntrySelected exitMenuEntry Selected OnCancel Add entries to the menu MenuEntries Add playGameMenuEntry MenuEntries Add optionsMenuEntry MenuEntries Add exitMenuEntry OptionsMenuScreen cs inherits MenuS
50. sync CTP i E SkeetShooters_TemporaryKey pfx AudioManager cs Interview with Mads Torgersen on Async Thu 06 Jan 2011 09 10 00 Z Mark Miller from DevExpress interviews spec lead Mads Torgersen from Download Visual Studio 2010 Service Pack 1 Beta Thu 09 Dec 2010 18 20 00 Z Service Pack 1 Beta is ready for download Please try it out and let us know Download Visual Studio Async CTP Thu 28 Oct 2010 19 45 00 Z Download the Visual Studio Async CTP with new syntax and APIs for Prism 4 0 Guidance for WPF Silverlight and Windows Phone 7 Fri 12 Nov 2010 23 05 00 Z Prism provides guidance designed to help you more easily design and build rich flexible and easy to maintain Windows Presentation Foundation WPF desktop applications and Concurrent Collections in the NET Framework 4 Mon 25 Oct 2010 17 05 00 Z Bill Wagner discusses new concurrent collections that make it easier to write E Error itis Output Ready gt Deploying an Ab Y Faultinjector y SkeetShootersDocs Ej CNT 4104 B SkeetShootersWi EN gt Wilcs4 ko SkeetShootersSRS 1 14 PM Page 50 of 54 1 a 4 8 Double clicking on one of the C class icons in the solution explorer will open the respective class s code B SkeetShootersWin Microsoft Visual Studio File Edit View Refactor Project Build Debug Data Tools Test Window Help A Ae S 3 as 3 E D EJ 22 dd d l X a A 2
51. tionFade screen g text Properties i Fields HT Text a currentDifficulty E Methods a difficulty MainMenuScreen SoundMenuScreen Class Class MenuScreen MenuScreen E E Draw a difficultyMenuEntry Y GetHeight Methods Y ConfirmExitMessageBoxAccepted Draw I y MenuEntry 3 DifficultyMenuEntrySelected a HighScoresMenuEntrySelected a MusicVolumeMenuEntrySelected E Y OnSelectEntry Y OptionsMenuScreen 9 MainMenuScreen Y NextSongMenuEntrySelected B dis EPOCA Y OnCancel Y PrevSongMenuEntrySelected sana X sa Fases a ye OptionsMenuEntrySelected e SfxVolumeDownMenuEntrySelected Events p Lippi dani E 3 PlayGameMenuEntrySelected Y SoundMenuScreen 9 Selected Figure 3 4 Menu Screen Classes Page 28 of 54 p A Abstract Class El Fields ul a m w ome a U Ma M M QA m H a A e SAA iy lids ids Lis lids id Lis Lis ids ji CG e controllingPlayer IsExiting isPopup otherScreenHasFocus screenManager screenstate transitionOff Time transitionOn Time transitionPosition roperties ControllingPlayer IsActive IsExiting IsPopup ScreenManager ScreenState TransitionAlpha TransitionOffTime TransitionOnTime TransitionPosition Aethods Draw ExitScreen Handlelnput LoadContent UnloadContent Update UpdateTransition d Bape EE AE EEE ESE EA y E D A E a See eee eee sama
52. try shall display the sound menu screen 2 2 9 3 Selecting the Quit Game menu entry shall exit the currently running game and display the main menu screen Page 9 of 54 PAUSED SOUND QuIT GAME Figure 2 7 Pause Menu Screen 2 2 10 Menu Screen Character Selection Screen Figure 2 8 The character selection screen shall be displayed when the Start Game menu entry is selected from the main menu screen 2 2 10 1 Selecting a character shall display the game play screen and begin a new game with the selected character 2 2 10 2 Pressing the BACK button Figure 2 11 shall display the main menu screen E Esl FLO OI IE RS SKEETERS Figure 2 8 Character Selection Screen 2 2 11 Game Play Screen Figure 2 9 The game play screen shall be displayed once a character 1s selected from the character selection screen Page 10 of 54 2 2 11 1 The player s status bar Figure 2 9 bottom of image shall display the following e Player s life points o One green orb one life point o When no life points remain the game shall be over e Percentage of shield power remaining e Amount of bonus time remaining in the bonus gauge o One red orb one second e Player s score 2 2 11 2 Enemies shall be displayed flying from right to left across the game play screen 2 2 11 3 Each time a new enemy is to be drawn on the game play screen a random velocity and flying height shall be given to that enemy 2 2 11 4 If an
53. ts a single particle used to create an effect Each effect is comprised of many of these particles Particles have basic physical properties such as position velocity acceleration and rotation 3 2 3 ExplosionParticleSystem cs ExplosionParticleSystem cs is a specialization of ParticleSystem cs that creates a fiery explosion 3 2 4 ExplosionSmokeParticleSystem cs ExplosionSmokeParticleSystem cs is a specialization of ParticleSystem cs that creates a circular pattern of smoke 3 3 Menu Screen Classes Figure 3 4 3 3 1 MenuScreen cs The menu screen class was added as a base class for all screen classes that contain a menu of options 3 3 2 MenuEntry cs The menu entry class represents a single entry in a menu screen 3 3 3 MainMenuScreen cs The main menu screen class inherits MenuScreen cs and is displayed initially at the beginning of the game 3 3 4 OptionsMenuScreen cs The option menu screen class inherits MenuScreen cs and is displayed when the Options menu entry is selected from the main menu screen 3 3 5 PauseMenuScreen cs The pause menu screen class inherits MenuScreen cs and 1s displayed whenever the game is paused 3 3 6 SkeetScreen cs Page 23 of 54 The skeeter selection screen class inherits MenuScreen cs and is displayed when the Start Game menu entry is selected from the main menu screen 3 3 7 SoundMenuScreen cs The sound menu screen class inherits MenuScreen cs and is displayed when the Sound
54. un method on the created instance as shown below static void Main stringl l args using SkeetShooters game new SkeetShooters game Run The main class for the game application is SkeetShooters cs This class creates an instance of AudioManager cs and ScreenManager cs and then adds a new instance of the MainMenuScreen cs to the ScreenManager cs instance as shown below public SkeetShooters initialize graphics device graphics new GraphicsDeviceManager this Content RootDirectory Content initialize audio manager component audioManager new AudioManager this Components Add audioManager add component initialize screen manager component screenManager new ScreenManager this audioManager II activate the first screens screenManager AddScreen new BackgroundScreen null screenManager AddScreen new MainMenuScreen null Components Add screenManager add component The class that manages one or more GameScreen cs instances is ScreenManager cs It maintains a stack of screens calls their Update and Draw methods at the appropriate time and automatically routes input to the topmost active screen AddScreen method is used to add a new screen to the screen manager public void AddScreen GameScreen screen PlayerIndex controllingPlayer screen ControllingPlayer controllingPlayer screen ScreenManager this screen IsExiting false Page 31 of 54
55. y new MenuEntry Back Hook up menu event handlers musicVolumeMenuEntry Selected MusicVolumeMenuEntrySelected sfxVolumeDownMenuEntry Selected SfxVolumeDownMenuEntrySelected nextSongMenuEntry Selected NextSongMenuEntrySelected prevSongMenuEntry Selected PrevSongMenuEntrySelected backMenuEntry Selected OnCancel Page 34 of 54 Add entries to the menu MenuEntries Add musicVolumeMenuEntry MenuEntries Add sfxVolumeDownMenuEntry MenuEntries Add nextSongMenuEntry MenuEntries Add prevSongMenuEntry MenuEntries Add backMenuEntry Music VolumeScreen cs inherits MenuScreen cs and is where the music volume menu screen logic is implemented The class constructor initializes the menu entries and hooks up an event handler to each menu entry public MusicVolumeScreen float musicVolume bool isPopup base Music IsPopup isPopup Create our menu entries musicVolumeMenuEntry new MenuEntry string Empty convert volume to percent this volume int musicVolume 100 if volume 10 0 volume 10 volume 10 volume SetMenuEntryText MenuEntry volumeUpMenuEntry new MenuEntry Volume Up MenuEntry volumeDownMenuEntry new MenuEntry Volume Down MenuEntry backMenuEntry new MenuEntry Back Hook up menu event handlers volumeUpMenuEntry Selected VolumeUpMenuEntrySelected volumeDownMenuEntry Selected VolumeDownMenuEntryS
Download Pdf Manuals
Related Search
Related Contents
LIFE-BASE light XS - WEINMANN Emergency Bedienungsanleitung orden de 27 de abril de 1999 por la que se actualiza la relación de MANUAL DEL OPERADOR VersaMax Ethernet NIU IC200EBI001-AD, GFK ÉVALUATION NATIONALE DES ACQUIS DES ÉLÈVES ブルーフィルター - IRT Corporation 事業所用PHS HI-D7PS Guía de instalación de proyectores InFocus para TV Copyright © All rights reserved.
Failed to retrieve file