Microsoft XNA And The 3DUI Framework

2y ago
24 Views
2 Downloads
247.92 KB
17 Pages
Last View : 14d ago
Last Download : 3m ago
Upload by : Julia Hutchens
Transcription

Microsoft XNA and the 3DUIFrameworkLecture #3: XNASpring 2008Paul VarcholikJoseph J. LaViola Jr.Spring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Introductions Paul Varcholik: pvarchol@ist.ucf.eduTechnology Blog:www.bespokesoftware.orgSpring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

Software Visual Studio 2005 (Standard or Professional)or Visual C# Express 2005Visual Studio 2005 Service Pack 1XNA Game Studio 2.0Visual Studio 2008 does not interoperate withXNA Game Studio 2.0Spring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Online Resources XNA Developer Centerhttp://msdn.microsoft.com/xnaXNA Team Bloghttp://blogs.msdn.com/xna/XNA Creators Clubhttp://creators.xna.com/Spring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

What is XNA? Graphics and Game Development FrameworkAnnounced: Aug 20061.0: Dec 20061.0 Refresh: April 20072.0: Dec 20082D and 3DManaged DirectXWindows and Xbox 360Content PipelineXNA’NA’s Not AcronymedCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Why Use XNA? Extremely ComprehensiveFreeEasy to Use (though game programming is, ingeneral, quite challenging)Development and Real-time Debugging on aRetail Xbox 360Casual GamesGame PrototypingAccess to the .NET Framework Class LibrariesCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

XNA Microsoft.Xna na.Framework Classes/Structs ntDrawableGameComponentCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.XNA (cont.) Microsoft.Xna.Framework Classes/Structs Texture2DSpriteFontCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

XNA (cont.) Game Class aw()Components Separate out a generic/reusable class libraryCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Bespoke 3D UI Framework Organization: Source CodeFramework Samples Spring bedExecutablesDocumentationCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

Bespoke 3D UI Framework Namespaces: Spring 2008Bespoke.CommonGeneral Utilities (not game/XNA specific)Bespoke.Games.FrameworkXNA utility librariesBespoke.Games.Framework.ContentCustom XNA Content ProcessorsCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Bespoke.Commom Assert (static)CommandLineParserLibrary (static)LogManagerNode T / NodeCollection T ProgressIndicatorXmlHelperSpring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

Bespoke.Common .Data.LinearAlgebra.TrackIR – Requires OptiTrack software.Video – Uses DirectShow.NET (wrapperfor unmanaged DirectShow).Wiimote – Brian Peek’s Wiimote Libraryfrom Coding4Fun.comSpring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Bespoke.Games.Framework.Content inDataWriterThese classes provide a content pipelinefor using a heightmap for terrain. This isused in conjunction with theTerrainComponent.Spring 2008CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

Bespoke.Games.Framework rocessorScreenCapture Spring onentSoundManagerTerrainComponentCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.Bespoke.Games.Framework r .UI .Input Spring lButtonXML ConfigurationCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

How To: Render a 2D TextureDraw TextView the Game’Game’s FramerateCollect Input Spring 2008KeyboardMouseGamepad Initialize a 3D cameraDraw a Reference GridRender a 3D ModelPlay SoundRender a SkyBoxRender TerrainCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.How To:Render a 2D Texture1.Include the texture in the Content project. Supported formats: 2.bmp, .dds.dds,, .dib, .hdr.hdr,, .jpg, .pfm.pfm,, .png.png,, .ppm.ppm,, and .tga.tgaInitialize the SpriteManager class within the LoadContent()LoadContent() orInitialize() r.Initialize(this);3.Create data member to store texture:private Texture2D mTexture;mTexture;4.Load the texture in the LoadContent()LoadContent() method:mTexture Content.Load Texture2D (@"ContentContent.Load Texture2D ;5.Render the texture in the Draw() method:SpriteManager.DrawTexture2D(mTexture, Vector2.Zero, Color.White);Color.White);CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

How To:Draw Text1.2.Initialize the SpriteManager class as required before anycalls can be made to the SpriteManager.SpriteManager.Add a call to SpriteManager.DrawString in the Draw()method:SpriteManager.DrawString("Hello World", 40.0f, 40.0f, Color.White);Color.White); Variety of overloads to the DrawString method: Change the fontThe blend colorRotationSortingCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.How To:View the Game’s Framerate1.Add the following statements to the GameGame-derivedconstructor, LoadConent(),LoadConent(), or Initialize() method:FpsComponent fps new FpsComponent(this);FpsComponent(this);fps.Location ents.Add(fps); FpsComponent display locations: 938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

How To:Collect Keyboard Input1.2.Add a using statement for the Bespoke.Games.Framework.Inputnamespace;(Optional) Create a data member to store the keyboard component:private KeyboardComponent mKeyboardComponent;mKeyboardComponent;3.Add the following statements to the GameGame-derived constructor,LoadConent(),LoadConent(), or Initialize() method:mKeyboardComponent new eyboardComponent);4.Add keyboard queries to the Update() method:if eys.Escape)){Exit();}CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.How To:Initialize a 3D Camera1.Add the following statements to the GameGame-derivedconstructor, LoadConent(),LoadConent(), or Initialize() method:mCamera new typeof(ICamera), ts.Add(mCamera);mCamera.KeyboardComponent PadComponent on new Vector3(0.0f, 20.0f, 200.0f);mCamera.Orientation Vector3.Up;mCamera.Direction Vector3.Forward;mCamera.LookAtOffset Vector3.Forward;mCamera.NearPlaneDistance 1.0f;mCamera.FarPlaneDistance 100000.0f;mCamera.FieldOfView MathHelper.PiOver4;mCamera.AspectRatio dth a.UpdateProjectionMatrix();CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

How To:Draw a Reference Grid1.2.Initialize a cameraAdd the following statements to the GameGame-derivedconstructor, dComponent grid new .Add(grid);Components.Add(grid); You can modify the size (number of cells), scale (spacingbetween each line) and the color of the gridCAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.How To:Render a 3D Model1.Include the model in your Content project (this is typically a subsub-project within your Game project) Supported Formats: 2.fbx (Autodesk).x (DirectX Surface)Be certain that associated textures reside in the proper locations.locations.Add the following statements to the GameGame-derived LoadConent(),LoadConent(),or Initialize() method:Model tankModel Content.Load Model (@"ContentContent.Load Model (@"Content\\Models\Models\Tank");Actor tankActor new DynamicActor(this,DynamicActor(this, "Tank", Vector3.Zero, Vector3.Up, 0.05f, 1.0f,tankModel,tankModel, .Initialize();3.Add tankActor.Update()tankActor.Update() and tankActor.Draw()tankActor.Draw() calls to the correspondingGameGame-derived Update() and Draw() methods.CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.

How To:Play Sound1.2.3.Build your sound project using XACT.Include your sound project (.xap(.xap)) into your Content project.Initialize the SoundManager static class in the LoadContent()LoadContent() or oundProject.xgs",SoundProject.xgs", .xwb", @"Content\@"Content\Audio\Audio\Sound Bank.xsb");Bank.xsb");4.Play sounds with SoundManager.Play():SoundManager.Play():5.Call SoundManager.Update()SoundManager.Update() within the main Update() loop.CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr.How To:Render a Skybox2.Create your skybox textures (Terragen(Terragen)) and import them into your Contentproject (front, back, left, right, top)Create a SkyBoxComponent data member.3.Add the following code to your Initialize() or LoadContent()LoadContent() method:1.private SkyBoxComponent mSkyBox;mSkyBox;Texture2D front Content.Load Texture2D (@"ContentContent.Load Texture2D );Texture2D back Content.Load Texture2D (@"ContentContent.Load Texture2D ;Texture2D left Content.Load Texture2D (@"ContentContent.Load Texture2D ;Texture2D right Content.Load Texture2D (@"ContentContent.Load Texture2D );Texture2D top Content.Load Texture2D (@"ContentContent.Load Texture2D mSkyBox new SkyBoxComponent(this,", front, back, left, right, top, 1000.0f,SkyBoxComponent(this, ze();mSkyBox.Initialize();4.Call mSkyBox.Draw()mSkyBox.

Visual Studio 2005 (Standard or Professional) or Visual C# Express 2005 Visual Studio 2005 Service Pack 1 XNA Game Studio 2.0 Visual Studio 2008 does not interoperate with XNA Game Studio 2.0 CAP6938 – 3D User Interfaces for Games and Virtual Reality Joseph J. LaViola Jr. Online Resources XNA Developer Center

Related Documents:

XNA framework and the XNA game studio integrated development environment. A.3 Microsoft XNA Game Studio 2.0 . XNA, short for “XNA’s Not Acronymed”, is a collection of tools developed specifically for hobbyists and novice game developers. XNA Game Studio currently caters for the development of both Xbox 360 and Microsoft Windows games .

If you have developed by using Microsoft XNA Game Studio, you should be familiar with the template-generated code because of its similarities to the XNA Game Studio-generated code. (All XNA Game Studio-generated methods are included in the Microsoft Surface XNA template-generated code). The Microsoft Surface XNA main type (App1) derives from .

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

ANIMAL NUTRITION Tele-webconference, 27 November, 10 and 11 December 2020 (Agreed on 17 December 2020) Participants Working Group Members:1 Vasileios Bampidis (Chair), Noël Dierick, Jürgen Gropp, Maryline Kouba, Marta López-Alonso, Secundino López Puente, Giovanna Martelli, Alena Pechová, Mariana Petkova and Guido Rychen Hearing Experts: Not Applicable European Commission and/or Member .