DOC PREVIEW
GT ECE 4893 - Lecture 16: Introduction to XNA

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1 Lecture 16: Introduction to XNAProf. Aaron LantermanSchool of Electrical and Computer EngineeringGeorgia Institute of Technology2Dungeon Quest• Developed in 4 days at the 2007 GDC at the XNAcontest• By Benjamin Nitschke and Christoph Rienaecker Screenshot from exdream.no-ip.info/blog/2007/07/31/DungeonQuestUpdatedWithSourceCodeNow.aspx3Installing XNA Game Studio Express• Go to creators.xna.com, click on “Education” then“Getting Started”• XNA only works with the Express Edition ofMicrosoft Visual C#– Various versions of Visual Studio seem to coexist OK• Follow instructions under “Setting Up XNA GameStudio Express”– Don’t skip the “Visual Studio 2005 Service 2005 Express Editions ServicePack 1” step– Be sure to get the “Refresh” version of XNA Game Studio Express• Many things described here may change whenVersion 2.0 comes out4Careful if you’re on Windows x64• XNA normally targets “AnyCPU”• Will break when you try to run on x64machines, since x64 versions XNAframework ,dlls don’t exist (yet)• Workaround: Change PlatformTarget ofapp to x86– Use a text editor to add this line to each PropertyGroupitem of your csproj file in a text editor:!– <PlatformTarget>x86</PlatformTarget>Info from Benjamin Nitsche’s blog, “Getting XNA to work inWindows XP x64,” Sunday, August 27, 2006, exdream.no-ip.info/blog/PermaLink.aspx?guid=8962e9a7-3185-438d-882a-e8e919771dc225Paradigm shift• XNA is built on top of DirectX 9– Not built on MDX or Managed DirectX• DirectX 9 has a fixed function pipeline,but XNA doesn’t!– Everything done with shadersFrom XNA Team Blog, “What is the XNA Framework,”blogs.msdn.com/xna/archive/2006/08/25/724607.aspx6Why no fixed-function pipeline?• Programmable pipeline is the future– Neither Direct3D 10 or Xbox 360 have fixed-function pipeline• Early adopters and customers said cross-platform goalmore important than fixed-function pipeline• Fear is someone would start and finish their game usingthe fixed-function APIs, and then get dozens of errorswhen they tried to compile it on the Xbo 360• Better to know your code works on both right from thebeginningFrom XNA Team Blog, “What is the XNA Framework,”blogs.msdn.com/xna/archive/2006/08/25/724607.aspxIn Microsoft’s own words (paraphrased):7Some convenient things about XNA• Don’t need to mess with Win32-ishboilerplate (opening a window, etc.)• Easy interfacing with the Xbox 360controller (for both Windows and Xbox 360)• Storage (“saved games”) unified betweenWindows and Xbox 360– On Xbox 360, have to associate data with auser profile, put on hard drive or memory card,etc.– XNA “emulates” this on windowsFrom XNA Team Blog, “What is the XNA Framework,”blogs.msdn.com/xna/archive/2006/08/25/724607.aspx8Hello Bluescreenpublic class SampleGame : Game {!!! private GraphicsComponent graphics;!!!!! public SampleGame() {!!!!!!! this.graphics = new GraphicsComponent();!!!!!!! this.GameComponents.Add(graphics);!!! }!!!!! protected override void Update() { }!!!!! protected override void Draw() {!!!!!!! this.graphics.GraphicsDevice.Clear(Color.Blue);!!!!!!! this.graphics.GraphicsDevice.Present();!!! }!!!!! static void Main(string[] args) {!!!!!!! using (SampleGame game = new SampleGame()) {!!!!!!!!!!! game.Run();!!!!!!! }!! }From XNA Team Blog, “What is the XNA Framework,”blogs.msdn.com/xna/archive/2006/08/25/724607.aspx39XNA strengths & weaknesses: audio• Uses XACT, Microsoft’s Audio Creation Tool• Nice for modifying sound effects directly in XACTuntil you like them• No support for .mp3 or .wma - all you can plug inare uncompressed wave files– 10M game can turn into 100M• Xbox 360 has XMA, and Windows has ADPCM,but game still 3-5 bigger than it might otherwisebeInfo from Alistair Wallis, “Microsoft XNA: A Primer,” interview with Benjamin Nitschkewww.gamecareerguide.com/features/328/microsofts_xna_a_.php?page=410Benjamin Nitschke’s Rocket CommanderScreenshot & info from www.gamecareerguide.com/features/328/microsofts_xna_a_.php?page=4Original 10M, XNA version 50M due to larger audio files11Caveats about Xbox 360 development• Many TVs cutoff 5-10% of thepixels around the edge– Keep text & important info away fromthere• Xbox 360 handles post processingand render targets a littledifferently than the PCInfo from Alistair Wallis, “Microsoft XNA: A Primer,” interview with Benjamin


View Full Document

GT ECE 4893 - Lecture 16: Introduction to XNA

Documents in this Course
Load more
Download Lecture 16: Introduction to XNA
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 16: Introduction to XNA and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 16: Introduction to XNA 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?