Top Banner
Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle Coders Group Presentation – 2 nd August 2009
15

Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Dec 24, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Developing games and applications for Xbox 360 using XNA*

*XNA is XNA’s Not Acronymed

An Introduction by Peter MessengerSenior Developer at QMASTOR

Newcastle Coders Group Presentation – 2nd August 2009

http://www.petermessenger.com

Page 2: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Developing Games Using XNA

• XNA is a set of tools that facilitates computer game development and management.– Simplifies Graphics, Audio, Input, Networking and Storage

• Can develop games for Windows, Xbox 360 and Zune– It attempts to promote code re-use across target platforms

• First preview Mar 2006, released Dec 2006– Version 2.0 Dec 2007, 3.0 Oct 2008. 3.1 Current

Page 3: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Why Use XNA?

• Could develop games in Flash, Silverlight/WPF or Iphone but…..– XNA technology built from the ground up to

• Enable code reuse and reduce repetitive development• Facilitate rapid and simple development for games

– Large user base• 30 million units sold• 20 million Xbox Live users• 26 Countries

– Tutorials for all aspects of development– Microsoft provide all the hosting and distribution

Page 4: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

XNA Example Game

• Many example games available online with full source code.

Page 5: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

How I Learnt about XNA

• Saw a demonstration at Microsoft Tech Ed in September 2008– Interested as it was already using platform that I

was experienced with– Could see applications outside of game

development – simple training tools• Developed my first application in Mar 2009 – Based on exercise website for people with spinal

cord injury for Sydney Hospitals

Page 6: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Game Development

• XNA Game Studio 3.1 released March 2009• Runs as part of Visual Studio 2008 or free

Visual C# 2008 Express Edition• Based on NET Compact framework 2.0• Supports C#, LINQ• Downloadable from the XNA Creators Club

website• http://creators.xna.com

Page 7: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

XNA Creators Club

Page 8: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

XNA Creators Club

• Download software, tutorials, forums and the like• Post your creations have them peer reviewed

and approved for Xbox Live.– Over 400 games developed to date.– Requires licence $US 99 per year for Xbox 360

distribution– Can sell games for 200, 400 or 800 points – developer

gets 70% of total revenue (about $2.30 - $9.20 per sale)

– Windows applications incur no licence fee

Page 9: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Developing Your GameApplication Consists of Methods• Initialization – Allows the game to perform any initialization it needs to before starting to run. This is

where it can query for any required services and load any non-graphic related content.

• Load Content– LoadContent will be called once per game and is the place to load all of your content

• Unload Content– UnloadContent will be called once per game and is the place to unload all content.

• Update– Allows game to run logic such as updating world, checking for collisions, gathering input

and playing audio

• Draw– This is called when the game should draw itself.

Page 10: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Developing Your Game

• Content such as XML, fonts, images, sounds and music get converted in binary XNB files– Requires writing code to encode/decode XML,

convert images into spritesheets etc– Examples of this can be found in tutorials on

creators club• While there is no “canvas” like in web

applications and Silverlight, there is many example code bases that get you started

Page 11: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Developing Your Game

• Can link into Xbox Live and network between users

• Use keyboard, mouse or controller• Interfaces for keyboard, game saving and

loading built in via GamerServices module• Can debug/publish on Windows/Xbox 360 much

like any other Visual Studio application• Once complete, Windows applications can be

distributed using Click Once technology via a website if desired

Page 12: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Demonstration

Show example of XNA application

Discuss code

Page 13: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Using Xbox 360 for Applications

• Many issues make this difficult– Cannot network to outside servers– Lack of “standard” keyboard can make design

challenging – Limited interface for data entry• Many developers have built their own XNA open source

data entry frameworks to get around this.• Best example of this is xWinForms• http://sourceforge.net/projects/xwinforms/

Page 14: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

xWinForms

Page 15: Developing games and applications for Xbox 360 using XNA* *XNA is XNA’s Not Acronymed An Introduction by Peter Messenger Senior Developer at QMASTOR Newcastle.

Conclusion

• XNA is worthwhile investigating if you are a gaming enthusiast or want to be an independent developer

• Application development probably better handled using Silverlight/WPF – Very much depends on your business objectives– Silverlight likely to be available on Xbox 360 in the future

Questions and answers?