XNAResources.com - XNA/GSE News and Information http://www.xnaresources.com Latest Files en-us XNA 4.0 Game Development by Example - Visual Basic Edition My newest book, XNA 4.0 Game Development by Example : Beginners Guide - Visual Basic Edition is now available from Packt Publishing or on Amazon. The latest refresh of XNA 4.0 now supports Visual Basic as a development language for XNA, and this updated version of my original C# book includes tips on interpreting C# web examples for Visual Basic developers and all of the games covered in the C# version of the book: - Flood Control - Pipe-based puzzle game - Asteroid Belt Assault - Overhead space shooter - Robot Rampage - Multi-axis tank shooter with A* pathfinding - Gemstone Hunter - Side Scrolling platform game http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=221 Tue, 27 Dec 2011 15:52:12 EST Minor Forum Rollback Due to a change in web servers, it looks like the forum database was rolled back by about a week. There may be a handful of missing posts. On another note, I'm wrapping up my current XNA-based project, and have been brainstorming plans for a new tutorial series, so I should have more to post "soon" :) http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=209 Sat, 15 Oct 2011 12:57:47 EST Tile Engine Tutorial Series : Character on Iso Map - Part 2 Part 9 of the Tile Engine Tutorial Series is now available. This installment finishes up adding a player-controlled character to the Isometric engine, accounting for slopes associated with map tiles and for setting which tiles on the map the character can walk on. We finish up this installment by sorting out the draw depth for our character so he appears appropriately within the world. The installment can be found on the Tutorials Page or via Direct Link. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=189 Tue, 14 Jun 2011 18:15:43 EST Tile Engine Tutorial Series : Character on Iso Map - Part 1 I have just uploaded Part 8 of the Tile Engine Tutorial Series to the site. In this installment, we add a player-controlled character to our Isometric map, allowing the character to explore the map, scrolling the screen around as the edges are reached. Finally, we take the elevation of the terrain tiles into account and offset the character's draw location based on what he is walking on. As normal, this tutorial can be found on the Tutorials Page or via Direct Link. In the upcoming Part 9, we will look at restricting where on the map the character can walk, and smoothly transitioning the character between elevations on the map. NOTE: The Isometric Picking tutorial was updated to include some extensive modifications to the Camera class that are utilized by this tutorial. If you followed Part 7 prior to 6/7/2011, please go back and take a look at it again, as those updates will be needed for this installment. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=187 Wed, 8 Jun 2011 11:31:18 EST Isometric Picking Tutorial Updated As reader AlexPGilbert pointed out in the comments for the Isometric Picking Tutorial, the tutorial code contains a bug that shows up when the camera is offset vertically by an odd amount. I have updated the tutorial with extensive changes to the Camera class (That I had planned to include in Part 8 but actually fix the problem with the misplaced hilight). The download Zip file has also been updated. There may still be one issue with the code, but I'm working that out as I finish up on Part 8. :)It is fixed in the version that is online now. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=186 Tue, 7 Jun 2011 19:51:00 EST Tile Engine Tutorial Series : Isometric Picking I've been wrapped up in some Windows Phone 7 development for a while now (and really still am) but I wanted to go ahead and post the next installment of the Tile Engine Tutorial series as it has been mostly finished for a while. This time around, we look at converting an X/Y coordinate (in screen terms) into a tile coordinate on the map. This tutorial looks at using the mouse to select tiles on an isometric map. The same technique applies to hexagonal maps as well. The next installment will look at putting an animated character on the map, and relies on the code developed here to properly position the image as the character moves around the map. That installment should be arriving in the near future, but no absolute promises! :) Check out the tutorial on the Tutorials Page or via the direct link. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=180 Sun, 10 Apr 2011 08:49:25 EST 3D Graphics with XNA Game Studio 4.0 As I indicated a few weeks ago, I recently received a copy of 3D Graphics with XNA Game Studio 4.0 by Sean James of Innovative Games. I've now had the opportunity to read through the book and try out the code samples. The book begins, as you might expect, with a brief discussion of the XNA system, and introduces the implementation specifics of things like coordinate systems, projections, and transforms. By the end of the first chapter, Sean has laid out the fundamentals of loading models and setting up different types of 3D cameras. Next, Sean turns to a discussion of HLSL (High Level Shader Language), a topic which will, in one form or another, touch almost everything else that the book covers. The remainder of the book is a rapid-fire implementation of a variety of different 3D effects, covering lighting, shadows, billboarding, environmental effects, model animations, and more. Sean hits the highlights in the explanatory text for each of the techniques introduced, though 3D beginners may feel a bit overwhelmed at first. The book is aimed at an intermediate level, and familiarity with C# and some aspects of XNA will be definate pluses. The sheer volume of interesting techniques presented is excellent, and will be particularly useful if you have a grasp of 3D concepts from working in other languages/frameworks and want to move those skills to XNA. Current XNA developers looking to make the jump to 3D will find a wealth of HLSL and XNA code here to be exploited in their own games and engines. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=174 Mon, 21 Feb 2011 17:01:52 EST Tile Engine Tutorial Series : Side Topic : Automatic Transitions A few weeks ago, reader Alexander Weiß sent me an implementation of the Automatic Transition technique that was mentioned in Part 2 of the Tile Engine series. With his permission, I typed up information he sent me, and am posting it as the second "Side Topic" in the Tile Engine series. With very little code, this implementation automatically generates transition tiles between terrain types when the map is defined, so you don't need to hand place transitions between different regions on the map. Check out the tutorial on the Tutorials Page or via the direct link. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=172 Mon, 7 Feb 2011 19:26:11 EST Tile Engine Tutorial Series : Side Topic : Fog of War and Light Auras In response to a forum post by Sando asking about create a "Fog of War" effect with the tile engine, I've posted a quick "Side Topic" tutorial on creating a basic fog of war, and then adapting the code to create an aura of visible area around the player. As normal, you can find the tutorial listed on the Tutorials Page or via direct link. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=165 Mon, 17 Jan 2011 17:39:56 EST Tile Engine Tutorial Series : Isometric Maps It is finally here! I know some folks have been waiting quite a while for this installment of the Tile Engine Tutorial Series, and it is now up and available. In part 4, we cover Isometric tile maps, with a great tileset from OpenGameArt.org. We will look at basic terrain tiles and the move on to "3D-ish" stacking tiles. Check out the new installment on the Tutorials, or jump right to Part 4. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=161 Fri, 14 Jan 2011 19:53:41 EST Upcoming Review : 3D Graphics with XNA Game Studio 4.0 I have a copy of the soon-to-be released book by Sean James entitled 3D Graphics with XNA Game Studio 4.0 on the way, and when it arrives I'll be reading through and reviewing it. This is the second XNA book released by Packt Publishing, the company that published my own XNA book last year. There is a sample chapter from the book available here, which covers things like building 3D terrain from a heightmap, applying multi-texturing to the terrain, and adding billboarded objects. I'm looking forward to reading the rest of the book, so look for the full review in a few weeks. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=159 Mon, 10 Jan 2011 06:34:49 EST Flood Control for Windows Phone 7 Jason and I have put together our first game for the Windows Phone 7 marketplace: an enhanced version of Flood Control from XNA 4.0 Game Development by Example: Beginner's Guide. Besides being adapted for the Phone platform, Flood Control for WP7 includes new types of playing pieces, and is built using components like the sound and particle systems from later chapters in the book. You can find the game on the WP7 Marketplace at this link. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=158 Tue, 4 Jan 2011 17:53:05 EST New Tile Engine Tutorial Series - Parts 2 and 3 Note: I've updated Part 3 because I realized I forgot to include the image and explanation for how we arrive at the offset values and spacing for the hexagonal tiles. That information is now integrated into the tutorial. I've just posted the second and third installments of the new Tile Engine Tutorial Series. In Part 2, we cover using larger tile sets, and creating layered effects by building stacks of tiles on an individual map square. In Part 3, we look at our first alternate-shaped map tile, the Hexagon. The series will continue in Part 4, where we will adapt our engine to support Isometric tiles. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=155 Mon, 13 Dec 2010 18:23:11 EST Tile Engine Tutorial Series Returns Happy Thanksgiving, everyone. I've uploaded the first installment of the new Tile Engine Tutorial Series. In this first installment, we cover the basics of putting together a tile map, separating our code into logical classes. We define tiles, create a map, display it on the screen and implement camera-based smooth scrolling. Future installments of the Tile Engine series are underway, and will cover iso/hex maps, multiple tile layers, and other goodies. You can find the tutorial on the Tutorials page. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=153 Thu, 25 Nov 2010 07:38:31 EST Color Key Map Tutorial Updated and Re-posted I have completed the update/reposting of the Color Key Map tutorial. I had forgotten just how long ago that was written... It was back when LoadContent was called LoadGraphicsContent, and the default SpriteBatch wasn't created as part of the skeleton XNA project. The revised tutorial is listed on the Tutorials page, and can be found directly here. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=151 Wed, 10 Nov 2010 19:53:44 EST Welcome to the (partially) new XNAResources with Updated Tutorials For several years now, I've been using a blogging platform that, while great when I started with it, has showed some issues over the years. It has been very difficulty to revise existing content because it doesn't handle embedded code very well (less than and greater than signs really mess it up). In order to update my content for XNA 4.0, I decided that I first needed to update the backend of XNAResources, so this is that new site. I know it doesn't look very different right now... a visual makeover is on the way as well, but isn't completed yet. Here is a rundown if the major changes right now: Updated Backend - While mostly invisible, the updated backend makes it much easier to work on new and updated content. Message Forum - As part of the new back end, there is now a MegaBBS forum attached to the site. I haven't done a lot of skinning on the forum as of yet, as I am waiting for the new visual design of the main site to be completed before skinning the forum to match. I have create a few discussion areas, and I will try to answer as many questions as possible related to content on XNAResources. Links Area Removed - The old Links section (which was managed by the blogging platform indicated above) has been removed for now, and replaced by the forums link. I will work on building a list of links to good XNA and game development resources to replace the previous links page. Placeholder Pages - A few of the buttons at the top of the page lead to placeholder pages for now, as I work on deciding what direction to go with them. For example, the On-Screen Keyboard component which was on the components pages was written for pre-1.0 XNA, and isn't needed any longer since the Guide class provides an on-screen keyboard for you. RSS Feed - The RSS feed is currently down, but I will be writing a replacement RSS generator in the next day or so, so it will be back shortly. Comments - I wrote a C# program to transfer all of the news articles over from the old site, but I didn't get a chance to transfer the comments. The new comments are based on forum responses to news posts, so there wasn't an easy way to transfer them to the new site. The Star Defense and Sprite Engine tutorials have been updated for XNA 4.0, and a new (revamped) Tile Engine Tutorial series is in the works (I have a few parts finished and will link them in the near future). Other pieces of the old content (color key picking, and the Zune tutorials) will be brought back/updated over the next few weeks. Update: The problem that was preventing the tutorials from displaying properly has been fixed... Spelling plus Cut 'n Paste will get you every time! http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=147 Tue, 9 Nov 2010 07:27:00 EST My XNA Game Development Book Update: Packt Publishing has put up a sample chapter from the book which can be found at https://www.packtpub.com/sites/default/files/0669-chapter-02-flood-control-underwater-puzzling.pdf. Additionally, the book is now available on Amazon as well as other book sites. Over the past several months, I've mentioned a couple of times a "special project" that I have been working on. Late last week, that was all wrapped up, and I'm happy to announce that my first book has officially been published by Packt Publishing. XNA 4.0 Game Development by Example : Beginner's Guide is now available, and you can find more details about the book here. Those who have worked through the Star Defense tutorial series will find the approach of the book familiar. I look at building four different 2D games throughout the course of the book, covering topics such as sprite animation, sound effects, drawing text, path finding with A*, platform physics, particle-based explosions, integrating XNA with Windows Forms, and more. The four games covered in the book are (Click on the images for full sized screenshots): Flood Control - A puzzle style game, where users race against the ever-increasing water level to build continuous trails of pipes from the left side of the board to the right. In addition to basic sprite animation (rotation, movement, and alpha-based fading), Flood Control looks at recursive logic and game structure, building increasingly difficult levels into the game, and the basics of drawing text. Asteroid Belt Assault - A space shooter which places the player into a chaotic asteroid field, fighting waves of enemy ships which fly through the game area along a set of way points. Asteroid Belt Assault introduces frame-based sprite animation, elastic collisions, sound effects, and particle-based explosions. Robot Rampage - Play as a tank with either the XBox controller or the keyboard as you fight enemy tanks intent on your destruction. Two different weapon upgrades are available to the player as you try to survive while disabling the computer terminals that spawn the enemy robots. Levels are generated automatically, and both level object placement and enemy AI utilizes the A* path finding algorithm. Gemstone Hunter - A classic style platform game, utilizing a multi-layered tile engine in which the player gathers gem stones while attempting to either avoid or crush zombies. In addition to building the game, the Gemstone Hunter project also introduces creating a Game Library project to isolate the tile engine from the game code, and using that library to build a Windows Forms based map editor in which to create levels for the game. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=136 Mon, 27 Sep 2010 00:00:00 EST XNA 4.0 and Windows Phone Tools Released The RTM version of the Windows Phone Development Tools package was released yesterday, including XNA 4.0. Over the next couple of weeks, I'll be updating the tutorials on the site for XNA 4.0 (I've been working with the beta quite a bit). Also, I really will get the square/iso/hex tile engine system uploaded "soon"... I've been working on a project for a number of months that has occupied most of my free time. That should all be wrapped up this weekend. Jason and I are looking at doing Windows Phone 7 development as well, and have begun working on a couple of simple apps to experiment with the system. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=135 Fri, 17 Sep 2010 00:00:00 EST XNA Game Studio 4.0 hits Beta XNA 4.0, along with the rest of the Windows Phone Deveopment Tools, has reached the Beta stage. You can download the installation package here: http://creators.xna.com/en-US/launchcenter http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=134 Tue, 13 Jul 2010 00:00:00 EST Games by Lance Zimmerman in XNA - Star Defense Spinoff It is always nice to see someone pick up one of our tutorials and share their own work with the community, and Lance Zimmerman contacted me last week to share a project called Base Defender that he has been working on using the XNA Resources Star Defense tutorial as a basis for an extended game. He has added a radar at the bottom of the screen, terrain features and buildings, new enemies, and is working on different kinds of enemy AI behavior. The source code for Lance's evolving project, as well as his project page, is up at https://sites.google.com/site/gamesbylancezimmermaninxna/ Have a look! http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=133 Sun, 21 Mar 2010 00:00:00 EST What I've Been Up To... Ok, so the Steam Holiday Sale (http://www.steampowered.com) hit my free time pretty hard :) I picked up a number of games, and have been enjoying Dragon Age, Borderlands and The Witcher quite a bit since the holidays. That said, I haven't been completely idle on the XNA front. I've got another mini tutorial almost ready to go, and I've been working on a brand spankin' new Tile Engine that supports square, hex, and isometric tile maps. No real timeframe on that, as I still have the upcoming Mass Effect 2 to deal with :) http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=132 Mon, 25 Jan 2010 00:00:00 EST Zune Text File Viewer Tutorial Better late than never! :) This has actually been hanging around on my hard drive for quite a while, but with upgrading my PC to Windows 7 and other various things that have cropped up over the last few months, I haven't had time to get it properly formatted and posted up as a tutorial. But now here it is. This is the second of my "mini tutorials", and covers a quick project I put together to experiment with both my Text Handling class, and doing things on the Zune. Fair warning: There isn't much of a practical use to this project as is. The tutorial takes you through building an app for the Zune (works on Windows as well... and no real reason it wouldn't work on the XBox) that lets you browse through text files on your Zune device. Due to the restrictions associated with the Zune, however, the only way to get text files on the device is to include them as content objects in your project. That said, there are some useful things covered here, including building a Visual Studio solution that contains a project for both Windows (for testing purposes) and a project for the Zune (for deployment purposes). We do things like add a scroll bar to indicate how far along in the text we are, and save the location we were last at in a file so we can come back to it later using Storage Containers. You can find the tutorial here. On a side note, I've gotten a couple of e-mail questions about tile engines and the like. I do have some newer material on this front, and hope to put some of it together in the near future. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=131 Sat, 12 Dec 2009 00:00:00 EST Zune and New Tutorial On the Way I finally decided to pick up a Zune, and grabbed the Zune 120, with 3.2in screen and 120gb hard drive. I've been playing around with transfering some of my XNA projects to the Zune, and it's kinda fun to see my games running on the portable device. Jason and I have been playing around with a few different projects, including a 3D conversion of Star Defense (which won't run on the Zune, as the Zune supports 2D graphics only) and a tile-based RPG engine that I've been playing with as a PC project. I added a few lines to resize the display and compiled the project for the Zune and it works fine without further changes. I've also been putting together a small new tutorial on building a class to make handling text with XNA a bit easier. The class and tutorial write-up are finished, I just need to reformat the Word document to the format the site uses, so expect it to show up in the next few days. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=130 Sun, 12 Jul 2009 00:00:00 EST XNA 3.0 TextHandler Class I noted in my entry earlier today that a new tutorial was in the works, and I had some time this evening to do the formatting, so it is up faster than I had expected! :) This code comes from a project I have been working on, for which I decided that I needed a simpler way to handle text output, and especially needed a way to change the font/color of text being output at arbitrary points in the string without using a bunch of different calls to SpriteBatch.Draw(). This tutorial walks through building a C# static class to automate some of the work in drawing text to the screen in XNA, and includes a couple of nifty features like rudimentary formatting codes, a "console"-type printing mode, word wrapping, and automatic font loading. You can find the link on the Tutorials page, or jump there directly. This class should work on Windows, the XBox 360, and the Zune without changes, and is really just the basics of what this class could be expanded to do. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=129 Sun, 12 Jul 2009 00:00:00 EST Good Read : Learning XNA 3.0 by Aaron Reed Recently I decided that I really wanted to delve into 3D with XNA, so I started looking for reading material on the subject. There are a number of good XNA books out there now, but I've had trouble following many of them when trying to work with 3D graphics because they jump right in and start talking about Quaternions and such before giving a good introduction to the concepts involved. (Maybe I'm just dense, but the whole 3D math thing has always made my head hurt). Not so with Learning XNA 3.0 by Aaron Reed. The author teaches game programming using XNA, and the book itself is set up much like a class you would take to learn how to develop games using XNA. There is a measured, built up approach to the concepts that I found very easy to follow while demystifying the arcana of 3D graphics programming. The book starts out covering the basics of 2D rendering with SpriteBatch (ok, I'll admit I skipped those chapters) and then moves on to develop a 3D game throughout most of the chapters. The game includes moving 3D models, a 3D camera, particle explosions, sound effects and music, and combining 3D with 2D overlays and text display. Overall, I found the book to be a great introduction to 3D game programming. So much so that I have started reworking a certain 2D game that appears as a 12 part tutorial on this site in to a 3D game, using 3D models for the objects and particles for the special effects. If you are looking to get your feet wet with 3D graphics in XNA, Learning XNA 3.0 is a great place to start. http://www.xnaresources.com/megabbs/forums/thread-view.asp?tid=128 Mon, 22 Jun 2009 00:00:00 EST