Some of you may not know that Game Developers Conference is happening now, and we are super excited about it! The XNA GS team is making two very very cool announcements: Zune is a new platform for game development and the ability to publish your games online for consumption through Xbox Live marketplace! This is so exciting, I am lost for words! Let me try though. Let me walk you through the two major announcements.
Zune
We have been working for a while on getting the Zune music player as a supported platform for XNA GS. Actually, if you remember from reading Yuichi Ito’s interview, this is the “secret” stuff he’s been working on for a while now! This will allow you guys to write your own games using the familiar XNA Framework and run them on a Zune device. All Zune devices are supported, old and new. You can read the FAQ that was posted in the forums about it. But I can tell you that I have used it (got it working on my Zune) and it is awesome! I was truly impressed by the work that was done so far, and it’s not even done!
Community Publishing
Ah… you’ve been asking for this since we released the first betas of XNA GS: “Can we publish our games on Xbox Live???”. Finally we have an answer that is good! Soon you will be able to upload a game you’ve written to the new http://creators.xna.com site (still in development but already looks HAWT!) and once it’s “approved”, people are going to be able to download it on their Xboxes through Xbox Live market place! So start making those games!!!! There are a lot of details regarding the publishing system that I am sure we’ll talk about more in the coming months. But trust me, this is very cool stuff. The guys working on this feature are incredibly cool and good at what they do.
XNA Games for download!
Yep, for a short while you are able to download 8 games that were built by XNA GS on Live Marketplace! Samurai Dishwasher is one of them! Go check out what people have done using XNA GS and have fun playing them. They are really cool games.
Now go have fun and I’ll get back to getting my lazy butt to continue my game series. I got some nice posts coming up… I just need to write them ;)
Hey everyone! I am back again with yet another interview with a member of the XNA GS team. Today I bring our very own Aaron Nonis! This dude is actually responsible for me being on this team in the first place! My wife worked with him in his previous team and through him I moved to the XNA GS team. Anyway, I’ll save that for another post! I am really excited to bring you Mr.Aaron NONIS!
Who are you and what do you do at XNA GS team?
Hello, I’m Aaron Nonis aka Ajonis Jackson aka SideBiter. I’m a developer lead on the XNA Game Studio team. In general I lead the tools effort, as opposed to the framework/API effort. I’ve also chipped in some code here and there for each release. I’m also in charge of the internal build system used by the developers.
What did you work on before joining XNA GS team?
I’ve been in the software industry for a little over 11 years. Immediately before joining the original XNA team, I worked in the Small Business Server (SBS) team at Microsoft. There I was in charge of the admin tools, mostly MMC snap-ins and wizards. Before that I worked at a smaller contract studio (Microcrafts which became Vanteon). There I was a contract developer on multiple projects such as the stationery and landscape products for Sierra.
How did you join the XNA GS team? Tell the story!
It’s a pretty funny story, really, on how I became the first developer on the original XNA team. I have always been a passionate UI developer, and so I was prodded into interviewing for the Xbox LIVE UI team by a friend. They were working on the alpha Xbox 360 at the time, and Boyd Multerer was the Dev Manager for the Xbox LIVE team. So I was first in line to interview for a very popular job position. I got told a week and a half later that someone with more experience narrowly beat me out. I resigned myself to another 2-3 years with Small Business Server while I waited for more Xbox positions to open. Well, it just so happened that Boyd was moving on to become the Product Unit Manager for this new upstart team, XNA. He called me up and offered me the first developer job, which I promptly took!
What features did you work on for XNA GS 1.0 and 2.0?
As a manager, I mostly work behind the scenes, arranging schedules, making sure that the developers are happy and making good progress. I did, however, implement some of the networking layer that allows the Windows PC to talk with the Xbox 360 console in XNA Game Studio Express. I also implemented the new out-of-VS (Visual Studio) XNA Game Studio Device Center application and wizard for managing multiple Xbox 360 consoles. (Ed: I tested that feature for him!)
What were some of the problems faced when developing your feature?
There were a few! Trying to achieve the Vista look-and-feel in our application while still supporting XP turned out to be much more difficult than I had imagined. We scaled that back a little in order to give a more consistent XNA Game Studio feel. Also, the Big Endian nature of the Xbox 360 console and the Little Endian nature of the Windows PCs made some of the networking layer particularly tricky.
What’s your favorite part of XNA Game Studio, and why?
This is pretty tough to pin down, but I’ll be completely honest: My favorite part isn’t a part of the product itself, it is what the product means to the industry. I am excited to come to work every day because I know that we are truly making an impact on game development throughout the whole industry; be it professional developers that use XNA Game Studio to prototype their games, or amateur enthusiasts (like myself) that have always had a barrier with DirectX and the Win32 Game Loop to making their games.
If I had to choose a particular feature in XNA Game Studio, it would be the templates, starter kits, and tutorials that we put out that make it really easy to get your feet wet. They provide a fantastic bread-crumb trail to lead you towards that game you always wanted to make but never had the time to figure out the details.
What is your favorite Xbox 360 game?
My favorite Xbox 360 game, currently, is Rock Band. I am a music nut, and the completeness of the band experience in this game is incredible and incredibly fun!
Share some tips and tricks for using XNA GS
Did you know that you can connect both a desktop PC and a laptop to the same Xbox 360? On the Xbox 360, you can select “Connect to Another Computer”. This will issue a new 25 character key for your second Windows PC. However, once the second Windows PC has successfully added the Xbox 360 console, both the first and second Windows PC can communicate with XNA Game Studio Connect. This can make it convenient to develop your game on the laptop while you are in the living room, but also use your desktop to download others’ games and deploy them from another room.
Last words?
If you’ve ever wanted to make a game… ever… You owe it to yourself to download XNA Game Studio 2.0. It is a free kit with free tutorials, free sample code, and free forums that can allow you to freely develop your game programming skills. It is amazing to see the games that have been made, and I look forward to those that are still twinkling in the eye of budding game developers.
Yep! Yet another team interview is done! Today I bring you Eli Tayrien, the dude that drove me NUTS with his choice of music (we shared an office for a while). I guess I drove him nuts with mine too… he’s not into Metal (pfft). Eli is a super fun person to work with and I am very happy you guys will get to know him a little more. On with the interview!
I’m Eli Tayrien, a developer for XNA Game Studio. I focus mostly on the framework and content pipeline areas of things. I’ve also worked on some of the educational content found on creators.xna.com. Hmmm.. what else do I do at XNA? Try to drive Nazeeh and Klucher as crazy as possible with weird music.
What did you work on before joining XNA?
I was hired by the XNA team directly out of college. I went to school at the Rochester Institute of Technology, where I got a B.S. in computer science. I spent a lot of my time in the IT department’s area, working on games in the lab. ( shameless plug! http://games.rit.edu/ ) I did two internships with the IT department. The first was at RIT, working on a shooter called Wings of Megaira. For the second, I worked on M.U.P.P.E.T.S, which is a really cool experimental 3d multi user programming environment.
How did you join the XNA team? Tell the story!
Pretty standard fare, I guess. After I graduated I applied for a job at Xbox. Boyd told me what his goals for the project were, and we had a fit. I still get a really big kick out of seeing my product help students and hobbyists just like me.
What features did you work on for XNA 1.0 and 2.0?
For 1.0, I worked on the content pipeline with Shawn and Klucher. I focused on the importers, mostly. For 1.0 refresh I worked on the SpriteFont code. For 2.0 Stephen and I worked on the processor parameters feature, and Shawn and I worked on gamer services.
What were some of the problems faced when developing your feature?
The hardest thing for me for so far has been knowing when to say when. There’s always more work we can do, and more features we can implement, and knowing where to make the cuts is difficult for me. Also, it was difficult to get fonts to 100%. There’s so many edge cases that can cause letters to be off by just one pixel or two, you testers are just so thorough!
What’s their favorite bit of XNA, and why?
My favorite bit? 1, probably. I’ve always been a fan of that one.
What is your favorite Xbox game?
That’s a hard one. I tend to play more casual games lately, but I played through Gears of War twice. I just beat half life 2 for the second time. That’s a great game – the levels are paced perfectly! Just when I start to get bored of one thing, they completely change it up. I’ve been playing a bunch of rock band with my friends, too. I’m a really big fan of making a lot of noise, so singing and drums are right up my alley. My roommate and I have just gotten re-addicted to Lego Star Wars, too. I love how you can jump into and out of that game as often as you want.
Share some tips and tricks for using XNA
Keep it simple. This isn’t an XNA framework thing specifically, but more general advice for students and hobbyists: making a game takes a lot of time. When you think about what kind of game you’re going to make, start small! In my opinion, you’re better off having a really polished small game than you are having a kludgy big game, with lots of half-done features.
When in doubt, check the creator’s club website! The community in the forums is really helpful, and we’ve got a lot of samples covering a variety of topics.
Learn your trig and vector math. This is true even for 2D games! It’s not nearly as hard as you think, and dot products will become your best friend J
Last words?
Thanks for your support. I’ve got a pretty cool job, and you guys make it possible.
In my last post in this series, I talked about the GameStateManagement sample. I got a few comments asking that I upgrade it to include the newly threaded Loading.cs that was introduced in the Networking version of the same sample. So, I did that and bundled the whole thing in a template so you can always have it to start new projects with.
The new version of the Game State Management sample now includes a threaded Loading screen that allows you to animate something on the loading portion while your content is loading. I also followed Stephen’s blog post about creating a project template for XNA GS 2.0 to convert it into a usable template (very good read by the way!).
Hey everyone! Just a super quick post that I have added a list of links to all the XNA GS team member blogs I could find. You can find the list on my front page on the right side column towards the bottom. I will be updating it with any other blogs I know of.
Today we will talk about the next step in my project “Odyssey” game series. We have already talked about why we need to design a game, and then I attempted to design my own game which I call “Odyssey”. Now that we know what we’re trying to build, it’s time to prepare our “workbench” with the tools we need! One of the coolest samples we have released is the Game State Management sample. This sample gives you a working template you can use to create game menus, options, pop up messages, etc. I will be using this sample in project “Odyssey” to handle all the menus and game options. Trust me, this is saving me a whole lot of time! Let’s see how this sample works.
So what does the Game State Management (GSM) sample do exactly? I am going to steal the description text from the sample page on creators.xna.com:
The sample implements a simple game flow with a main menu, an options screen, some actual gameplay, and a pause menu. It displays a loading screen in between the menus and gameplay, and uses a popup message box to confirm whether the user really wants to quit.
I am going to do even better! Here’s a video of what the sample actually looks like, it will give you a much clearer picture of how it works:
See how it works? The sample has all the boiler plate code required to give your game menus, options, pause screen, etc. You just need to figure out how to use it and where to place your game code as well as any customizations to the interface.
GSM Sample Code Structure
The sample is structured in a very object oriented way so that you can just plug into it and get up and running quickly. To start things off, here’s the class diagram of the sample (Click on it to see the full thing):
Alright, keep this diagram opened in a window since we’ll refer to it quite often.
How does it work?
The basic principle behind the sample is that it manages screens. A screen is a renderable entity in your game. You break down your game into screens and let the ScreenManager manage them for you by bringing them into view and out based on what the player does. Best way to understand how the screens idea works is to go through a scenario step by step.
Let’s go through the scenario of the player booting up the game, they get a Menu screen that has a Play option. They click on that and they see a loading screen and then they see the actual game play. They play a bit and then they hit Esc to quit and are presented with a “Are you sure you want to quit?” message. They say Yes and the game quits back to the main menu. This would require you to break up your scenario into a bunch of screens like this:
So the flow would be:
Menu -> Play game -> Loading Game -> Game play -> Pause Game -> Quit Game option -> Confirm quit -> Back to main menu
The would break up to the following screens:
Main Menu Screen: This is the screen that renders the Menu. Here you would have all the code that draws the options, moves selections up and down, etc:
Loading Screen: This is the screen that renders while the game is loading it’s content. In the sample, it looks like this: (very creative as you can see)
Gameplay Screen: This is the screen that contains all your game play. So if this was say SpaceWar, this would be the screen where the ships fight each other for instance. In the sample, we see this screen:
Pause Screen: When you hit the Esc button, you get to the pause screen which is a screen that renders on top of another one (i.e. Popup). This means that unlike the other screens we saw so far, it doesn’t remove the previous screen but instead dims it and renders over it:
Quit Game Screen: This is the confirmation screen for when you choose the “Quit Game” option. Again, this is a popup screen that renders on top of all the other screens dimming them under it.
There you go! When you confirm that you do indeed want to quit the game, you go back to the Main Menu screen and you are back at square one :)
Looking at the source
Alright, so now that we somewhat understand how this whole screens thing works, let’s take a closer look at the code. First we’ll start with that layout of the code in source explorer:
As you can see, the code is split into two main folders, the ScreenManager and Screens.
ScreenManager folder contains the classes that are instrumental in how the template works:
GameScreen.cs: This is the base GameScreen class that all your screens will inherit from. The class has a lot of interesting methods and properties, let’s take a closer look at some of them:
bool isPopup: You want to set this to true if you want to have your screen be drawn on top of the current screen. Otherwise, it will be transitioned in as the previous screen is transitioned away. Screens like Pause, confirmation boxes, etc will want this to be true. Screens like the loading screen, game screen, etc will want it false.
Timespan transitionOnTime and transitionOffTime: This is how you can control how fast this screen will transition in and out. You want to set this using something like:
this.transitionOffTime = TimeSpan.FromSeconds(2);
ExitScreen(): This is the function you want to call when your screen is exiting. This will have it transition off the correct way and get removed from the list of screens to be managed.
LoadContent(): Override this function and add code to load any content you will be using in this screen. Do the same for UnloadContent() of course.
HandleInput(): You want to override this function in your class and do all the input handling here. Why not do it in the Update? Well, this function will be called when your screen is Active and is in focus. This way the right screen gets to handle the input at the right time.
Draw(): Override this function and add your rendering code.
InputState.cs: Helper for reading input from keyboard and gamepad. This class tracks both the current and previous state of both input devices, and implements query properties for high level input actions such as “move up through the menu” or “pause the game”.
This class is really helpful and is the one that you should extend to handle your own input as well. The class exposes methods that translate the gamePad input to more appropriate game actions. For instance, things like IsMenuSelect method can be used in the Menu screen to detect if the user clicked on the A button or Enter key to make a selection. Here, check out how it is used in the code for the menus in the sample:
See how it is very easy to handle input in a meaningful to the game way? No need to do code that directly checks for the A button press, instead, it is wrapped in the InputState class and the action for Menu Select is defined as a check for the A button press. My game will extend this class to handle things like input.MoveShipLeft for instance. Read the source for InputState.cs to get a better idea for how it’s used. Very well commented.
ScreenManager.cs: Ah, we come to the mother of all classes! This class right here is theheart of how this sample works! The screen manager is the component which manages one or more GameScreen instances. It maintains a stack of screens, calls their Update and Draw methods at the appropriate times, and automatically routes input to the topmost active screen (text shameless stolen directly from the source).
So how does it work? Simple. You create your GameScreen drived screens (Menu, game play, pause, etc) and use the AddScreen method to add them to the ScreenManager. The ScreenManager simply iterates over all the screens it had, calls update on each one, calls InputHandle to the top most one and finally renders them all with the top most one rendered last.
So if you add a GamePlay screen followed by a Pause screen and then a Quit Confirmation screen, you’ll get all three screens rendered with the top most one (Confirmation one) in “focus” and the only one handling the input. You RemoveScreen (which you do by calling the ExitScreen() method) the confirmation screen and the Pause screen is now the top most one and is receiving input.
See how it all works now? It’s a stack of screens that are basically layers. Top most layer gets input and the rest don’t. Brilliant!
Every GameScreen has a ScreenManager property on it pointing to the one and only ScreenManager that was created at the start of the game. This way you can add/remove screens to it from any screen in the game.
Tip: Notice the SpriteBatch property on the ScreenManager? That is put there for convenience. Makes is easy to share one SpriteBatch across your game. You won’t need to create a new one in your screen to draw something. Just use this one instead!
Now we move on to the Screens folder to see what’s in there. This folder contains the actual implementation of the sample around the template mechanics we discussed above. As you can see, there are a few screens here. There are a few that are specially interesting to us:
GamePlayScreen.cs: This is the screen that the sample uses to render the “game play” portion. So if you want to instantly use this sample for your game, just move your game code in this file and hook it up appropriately. It will just work and all you need to do is customize the menus and stuff and you’re done!
LoadingScreen.cs: Alright, this one is very important and needs you to pay attention to how it works because it’s a bit different than the others. The purpose of the LoadingScreen is to handle transitions between the game and the menu system. That does not include the menus that popup during the game play though. Let me explain further. When you start the sample, you start by adding a Background screen and then a Main Menu screen. Once you are ready to start the game, you technically can just add the GamePlay screen to the ScreenManager and it will work. But this will mean that you will have both the background and menu screens sitting in memory for no reason. So instead, you use the LoadingScreen as follows:
LoadingScreen.Load(ScreenManager, true, new GameplayScreen());
What this will do is the following: It will first clear all the screens that are in the ScreenManager because we don’t need to worry about them anymore. It then will render a Loading screen image as the GamePlayScreen is loading its content. You don’t have to do anything special for that. The Loading screen will keep the Loading text or image you specify up on the screen until your content is loaded. Very nifty. If your GamePlayScreen’s content loading is very fast, you can disable the rendering of a Loading text by setting the second argument in the Load method to false.
Now, once your game is ready to go back to the main menu screen, you will realize that that screen is no longer there! We cleared it when we loaded the game. So to go back to that screen, the sample uses the LoadingScreen again to transition us back to the Menu system like this:
LoadingScreen.Load(ScreenManager, false, new BackgroundScreen(), new MainMenuScreen());
See how that worked? We are telling the LoadingScreen to clear the current ScreenManager (it does that in the Load method) and then load it up with the BackgroundScreen followed by the MainMenuScreen. We use false for the second argument since we know that our MainMenuScreen loads pretty fast.
So as you can see, the LoadingScreen is instrumental as it sits in between your Main Menu and the game. You use it to transition from one to the other and back. You don’t have to use it and can just stack screens in the ScreenManager, but then if you have a particularly beefy Main Menu screen, you’ll have those resources in memory for no reason. Use it!
As for the rest of the classes up there, take a look at MessageBoxScreen for instance to see how it uses the this.isPopup = true to indicate that it is a pop up window that will not transition the ones below it.
Oh, you should check out MainMenuScreen.cs and OptionMenuScreen.cs to see how they use MenuEntry class to implement the actual menu items. It uses events to detect when a menu was clicked. It’s simple enough to understand from the code.
Final words and next steps
Phew! That was a loooong post eh? Sorry about that but I really felt like I needed to make sure that this sample is fully explained before we can proceed. I myself haven’t really used it in depth, so this was a good exercise for me too. Once you go through how it works and look at the code a little bit, it totally makes sense very quickly and becomes trivial to use. It is intimidating at first but hopefully my explanation will help remove that.
Going forward we’ll start thinking about how to implement and structure project “Odyssey” in preparation for the implementation phase! Looks like I will have to actually code up this game! Should be fun and educational too!
In the meantime, go ahead and download the game state sample now and start playing with it. Get a sample game or even a moving texture integrated in it (Tip: Put the code you already have in the GamePlayScreen.cs file for starters). You will learn to love this sample quickly.
For today’s team member interview, I am very happy to give you guys Stephen Styrchak! When it comes to Visual Studio, no one on the team knows half as much as Stephen does. I mean, this dude REALLY knows Visual Studio inside out. I asked Stephen if he would agree to being interviewed for my series, he very kindly agreed and got back to me with the answers pretty quickly. I hope you all enjoy reading the interview as much as I did! Without futher ado: I give you Stephen Styrchak!
My name is Stephen Styrchak, and I’m an XNA Game Studio developer. I try to make the process of game development easier.
What did you work on before joining XNA?
I’ve worked at Microsoft for 8 out of the last 9 years, working on various developer tools (the 1 other year I was back in Canada finishing school). I’ve worked on compilers, debuggers, script engines, script hosts, code generators, visual designers, project systems, and both sides of developer tools extensibility – customizing and making things customizable.
Basically, I’ve been building programs that let other people more easily build programs, customize existing programs, or make their own programs customizable.
How did you join the XNA team? Tell the story!
Toward the end of the Visual Studio 2005 development cycle, a friend of mine on the XNA team, Christina Storm, called me up and asked me to talk to Frank Savage about a team he was assembling to work on a hush-hush project. I thought, “Christina Storm? Frank Savage? This must be the secret Microsoft league of American Gladiators!” So I put on my Spandex tights and here I am!
What features did you work on for XNA 1.0 and 2.0?
“XNA” is not a product… You must mean Game Studio! :-P
For XGSE 1.0, I worked on parts of the XNA Game Launcher on Xbox 360, and parts of the project system in Visual C# Express. Mostly, though, I worked on everything in between (build, deploy, remote debugging, etc).
For XGS 2.0, I redesigned the project system to simplify a number of development scenarios that were difficult in 1.0, and laid the groundwork for some cool new things in the future. Content projects, Content Pipeline improvements, and cross-platform development were the big ticket items. The last was adding extensibility for some new things on the way.
What were some of the problems faced when developing your feature?
I really wanted to have XGS 2.0 support VS 2008. Joe and I fought hard for it, but it wasn’t in the cards. After all is said and done, I think we (as a team) made the right choice at the time. Other than that, the two biggest problems I had to deal with were: 1) not enough time, and 2) not enough people.
In XNA CGP (Community Game Platform), there’s like fifteen people – total – and everybody is booked for every minute. The only way to put more people on one feature is to cut another.
Because of the restrictions, I have to be careful to design features that can be implemented incrementally. We never have enough resources to deliver everything we want; usually that means doing fewer features, but sometimes it means doing partial features. As an example, today you can only have one nested content project. You should be able to have as many as you like, and re-use them in other game projects. You should be able to download starter kits for content and add them to your existing projects! That was the idea behind the design, but we didn’t have enough time to do it all. The functionality in 2.0 is pretty close to what you had in 1.0, but it’s halfway to something a lot more interesting!
Moving from a giant team (in Developers Division - aka DevDiv) to a small team (XNA CGP) feels like when I first moved out of my parents’ house. Nothing is free. Suddenly I am vividly aware of costs, and I have to choose carefully the things I want because I most certainly cannot afford them all.
What’s your favorite bit of XNA, and why?
I really enjoy seeing the cool games that people have made. When I was a kid, I started programming because I wanted to make my own video games. Nowadays, I don’t make games, but I think it’s cool that XNA is providing the opportunity to others to do it.
What is your favorite Xbox game?
I really enjoyed Oblivion. I definitely spent the most hours playing that game (literally hundreds of hours). LEGO Star Wars 2 was loads of fun, and I thought BioShock was terrific (even though I usually don’t like FPS games).
I’m going to say BioShock, since I finished it most recently. It had an awesome style and compelling storyline.
Share some tips and tricks for using XNA
I’ve just started sharing tips through my blog. I’m still trying to get my head around the idea of blogging. The problem for me is that Game Studio users want to read about making games, and I know less about that than they do. I know about making tools to make games.
Last words?
People usually don’t think about their tools unless they fail or reach their limitations. I think the most limiting factor today is complexity. It’s too hard for people to get the most out of their tools, so they feel more limited than they are. That’s something for me to work on. Eventually, when I do things right, nobody will know I did anything at all.
Interview Comments
I just wanted to take a minute to thank Stephen for answering all my questions. If you guys have any other questions you want to ask him, go ahead and I am sure he’ll answer them pretty quickly.