{"id":21,"date":"2010-10-24T10:00:35","date_gmt":"2010-10-24T10:00:35","guid":{"rendered":"http:\/\/www.deadcodersociety.org\/?p=21"},"modified":"2010-10-27T13:40:34","modified_gmt":"2010-10-27T17:40:34","slug":"xna-game-development-brian-okeefe","status":"publish","type":"post","link":"http:\/\/www.deadcodersociety.org\/blog\/xna-game-development-brian-okeefe\/","title":{"rendered":"XNA Game Development: Brian O&#8217;Keefe"},"content":{"rendered":"<p>Brian O&#8217;Keefe gave the first Dead Coder Society presentation on his experience developing games using XNA and releasing on the Xbox 360. His first release is &#8220;<a title=\"Flipside\" href=\"http:\/\/marketplace.xbox.com\/en-US\/Product\/FlipSide\/66acd000-77fe-1000-9115-d8025855048a\" target=\"_blank\">Flipside<\/a>&#8220;, and he&#8217;s working on another game right now. You can follow his recent developments at his website, <a title=\"BokStuff\" href=\"http:\/\/www.bokstuff.com\" target=\"_blank\">Bokstuff.com<\/a>. Feel free to read the collected notes from his presentation below:<\/p>\n<p><strong>XNA &#8211; Review and testing<\/strong><br \/>\nMicrosoft XNA is a set of development  tools for developing on Xbox 360 (as well as for Windows, and Zune.)  Visual Studio Express (the IDE) and XNA are free downloads. It&#8217;s easy to  port and simple to hook up to debug on Xbox. The starter version of XNA  only works for PC; pro version is ~$100\/year (or free with MSDNAA,  available through Stockton.) You can debug directly on Xbox360 via  Ethernet cable. $1\/$2.50\/$5.00 are price-points for released indie  <!--more-->games. You receive 70% of revenue (~67% after taxes. 30% goes to  Microsoft.)<\/p>\n<p>Once game is posted, there\u2019s a peer-review process (no  Microsoft employees, done through a forum.) If you release on Xbox Live,  you can still release the PC version via other means (Steam). XNA redistributable package exists for Windows release.<\/p>\n<p><strong>Forums<\/strong><br \/>\nThere  are two forums for testing on<a href=\"http:\/\/forums.xna.com\"> forums.xna.com<\/a>: Playtest Feedback forum  is just a general purpose feedback forum. Peer Review forum is  specifically for game review prior to release. If you are going to test  or peer review a game, you need to install a program onto your Xbox360  called XNA Game Studio Connect.<br \/>\nPeer review is primarily for  crashes, not for \u201cthis isn\u2019t fun\u201d etc. A few people need to review it.  If you have crashes, you cannot re-submit your game for a week, and when  you do finally re-upload it, it goes to the end of the peer-review  queue.<\/p>\n<p><strong>Gotchas to look out for in 360 development:<\/strong><br \/>\nIf  you\u2019re running the game and someone yanks the memory card out, things  like that can\u2019t cause a crash. If someone hits the \u201cguide\u201d button  (button in the middle of the controller), the game should pause in the  background. All controllers should work, etc. Must account for  controller \u201cdead zones\u201d on analog sticks \u2013 the amount of throw the  controller has when it gets old.<br \/>\nSo-called \u201cEvil checklist\u201d for game  acceptance (game needs to have these working), and \u201cnot-so-evil  checklist\u201d (not a release killer; left to the discretion of the testers  (e.g. the text doesn\u2019t render clearly on certain monitors)). If you  fail, you need to wait a week to resubmit your game for retesting, but  you can test as many times as you want. Incentive for the game-testers  include a free game (release candidate, but still,) and you can get your  game to the top of the queue. An interesting side note, Brian&#8217;s passed  on the first try!<\/p>\n<p>You can patch your games \u2013 it goes through the  acceptance queue again. All existing customers get prompted for the new  patched release.<\/p>\n<p><strong>XNA Framework and Game Development<\/strong><br \/>\nBasic  libraries for creating a game on Xbox: rendering, input from  controller, sounds and networking. There&#8217;s no gamestate management and  no particle effects. Another note: people develop libraries on top of  XNA for network play and other things (p2p high score list was  discussed.) No collision Detection built in to XNA default package.<\/p>\n<p>Basic  methods created when you create a new project:<br \/>\nInitialize, Load\/Unload Content, Update, Draw For every frame, it calls  Update, then Draw.<br \/>\nBrian\u2019s State Management system:<br \/>\nLoading State, How to Play State, GamePlay State, etc\u2026 States for all  major sections of gameplay, all being controlled by a State Manager  class.<\/p>\n<p><strong>Programming for XBOX specific notes:<\/strong><\/p>\n<ul>\n<li>Apparently, branching logic  in a shader is terrible for performance as it\u2019s done by the video card.  The inversion for the second half of the screen is a shader-inversion  hack.<\/li>\n<li>LoadContent handles everything \u2013 graphics, sounds, fonts,  etc. On compilation, it compiles it into some arbitrary Microsoft  format. You have sort of a resource file. You can create your own  content types (e.g. maps)<\/li>\n<li>You can have threads (up to 3 for three  cores) if you need to separate some processing-intensive logic.  Flipside didn&#8217;t use them, but could have.<\/li>\n<li>Flipside was finished  in five weeks total. It was powered through the whole time. Completed in  march.<\/li>\n<li>Made a particle manager that a state can have.<\/li>\n<li>The  &#8220;Foreach&#8221; for loop is a little more intensive than a regular for.<\/li>\n<li>During  development, it\u2019s better to check the stuff in the checklist than doing  everything at the end (i.e. pulling the memory card during a save and  check for crash).<\/li>\n<li>Trial allows you to play the game for 8  minutes. XNA handles this. You can create special modes of game play  specifically for these 8 minutes. They specifically request for you to  make the trial mode different.<\/li>\n<li>Input Manager uses current  controller state and saves previous controller state to detect compound  actions (user presses button and releases, etc).<\/li>\n<li>Sprite batches  can do rotation and zoom, but if you want to do a transformation matrix,  you have to actually open up the spritebatch which is costly in terms  of performance.<\/li>\n<li>Lastly, Brian is the best at his own game.<\/li>\n<\/ul>\n<p>You  can go to Brian&#8217;s site at <a href=\"http:\/\/www.bokstuff.com\/\" target=\"_blank\">BokStuff<\/a> or Google his game Flipside. He showed us a  Demo of his new game, Run Dead, and it&#8217;s looks fantastic!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Brian O&#8217;Keefe gave the first Dead Coder Society presentation on his experience developing games using XNA and releasing on the Xbox 360. His first release is &#8220;Flipside&#8220;, and he&#8217;s working on another game right now. You can follow his recent developments at his website, Bokstuff.com. Feel free to read the collected notes from his presentation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":7,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":54,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/posts\/21\/revisions\/54"}],"wp:attachment":[{"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.deadcodersociety.org\/blog\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}