22
May
08

Game Developers Conference 2008 Presentations

Over the past few days, I’ve been going over some of the presentations that were given at GDC 2008, which you can download here. The presentations are in PowerPoint 2007 format, but if you have an older version you should be able to find a compatibility pack somewhere, and if you don’t have it at all, you should be able to find a free viewer. Each presentation also comes with a WMA recording of the actual talk given.

All in all, the presentations that I’ve listened to have been very interesting. There’s a handful that I haven’t paid much attention to, just for general lack of interest, but there’s a lot of good stuff there. Here’s some comments about some of what I’ve listened to:

“CLR Performance” and “Understanding XNA Framework Performance” are both somewhat technical in nature, but certainly interesting information to keep in mind while programming. Of course, any performance issues are going to be more of an issue in a larger project, rather than a smaller one, it’s always good to get into good habits.

“The Evolving Windows Game Platform” does not address XNA specifically, but rather Windows game programming in general. Still, it’s got some good thoughts to keep in mind, especially since I’d like to move to DirectX in C++ at some point… As far as I can tell, that’s still the industry standard.

“Getting More from Multicore” is a bit above what I’m ready for, given my extremely limited parallel programming experience (all of one semester), but I’m definitely holding on to this one for reference later. After I’ve tackled a few game projects, I will ideally move to a project where multi-threading really makes sense, due to size, and have a chance to put some of the methodology presented here in place.

“Advanced Debugging with Managed Code” was a real treat to find. Since I’m very much self taught, and the programming I’ve been doing in school has been almost entirely in a Unix environment, I’ve missed a lot of what Windows based tools have to offer. I have a copy of Visual Studio 2008 Professional (free, from Dreamspark. The joys of being a student…), but this presentation gave a good primerĀ  in some of the Visual Studio debugging tools available to me. Hopefully, when I actually sit down and write some more code, this will make things a bit more efficient.

Tomorrow, I’m hoping to actually finalize a plan on paper, and get to coding SDH v2.

18
May
08

So where do I go from here?

Now that I’ve gotten the initial version of Space Defense Hero cleaned up a bit, the next logical question is what exactly I do now. So, I’d like to take a moment to determine future plans for projects.

Space Defense Hero, v2.0

At the top of the list is a new release of Space Defense Hero. The overall code design is rather lacking, in my opinion, and there are too many things that got cut due to time or difficulty issues towards the end of the semester.

  • More accurate collision detection. Right now, the system uses two scale values to convert the automatically generated BoundingSphere into something small enough that it doesn’t (usually) look like you’re hitting empty space and damaging the target, yet large enough that you can reasonably hit the target. As a result, this is extremely inaccurate, and in places just looks bad. What I’d like to do is at least move to a BoundingBox method for most objects, which should fit better than a sphere. Lasers, the player ship, and the basic enemy ships are good examples of this. Eventually, I should be able to go as far as piecing together multiple bounding areas to more accurate describe a boss.
  • Additional enemy types. I’m not terribly concerned about creating amazing looking models, since I am not very talented in that regard, but simply having enemies that do something a bit different that are easily distinguishable would be amazing. For appearance, even a simple recolor is plenty. As far as what could be different, anything like movement pattern/speed, firing pattern/speed/power, health, etc. would be nice. The main goal is to make it so that every level doesn’t seem exactly the same until the boss.
  • Level Editor. On a related note, it’d be nice to have a level editor, so I could move away from the random level generation. While random is nice in some ways (no two levels will be exactly the same, from a practical standpoint), it makes it difficult to effectively ramp up the difficulty. Also, it’d be really cool do have a setup where enemies appear to fly in a set formation. As long as things are random, that can’t happen. Of course, this opens up other issues, as well. Unless I decide I’m content to have everything be in the same place for every play through, there will need to be enough different possibilities for each level that it’s unique for each game.

Of course, all of those things are secondary issues compared to reorganizing the code to more effectively let me implement those things. Enemy types, in particular, are extremely annoying/difficult to deal with in the current incarnation.

Side-scrolling Platform Game

Once I get SDH in a state that I’m pretty happy with, I’d like to take some time to design and implement a platform game, like the old Mario games. Of course, I haven’t started any design for it yet, so I don’t have a clue where it might take me, but the style seems like a natural next step from a side-scrolling space shooter. It gives me the opportunity to start working with physics and terrain (and the collision detection involved).

Tile-based Role Playing Game

As my senior project in high school, I wrote up the design for a game, titled High School RPG. The basic premise was a RPG that used the stereotypes of high school, like the jocks, nerds, etc., rather than your typical classes. Of course, they’d all have rough counterparts, but the flavor would be something different that I haven’t seen before. I still have the design information around here somewhere, and would like to go back and actually implement the game, just to say I finished it.

After finishing up some 2D projects, I’ll probably try to get something fully 3D done. But that’s probably a long way off.

17
May
08

Blog-reading for the busy person: Google Reader

Today I started thinking about all of the great resources I’d found about XNA recently. As I’m sure someone else thought some time ago, “Wouldn’t it be great if I had some way to keep up with all of this in a single, central locations, so I didn’t have to check 20 sites? … Hey, what was that RSS thing I remember hearing about?”

Yeah, so once again, I’m a bit behind the times, technologically. That makes me a bit sad, being a computer science major, but hey, I’m getting there.

For any that may not know, RSS is a way to subscribe to websites, and receive updates in something resembling an email inbox. Rather than having to go out to all of the sites you’re interested in, you check the one place, and see everything new. Overall, it’s a really cool concept. I subscribed to the blogs of all of the Microsoft developers on the XNA team, as well as a number of others I found via XNA Wiki.

Granted, I haven’t tried any other tool for this, but Google Reader has been a pleasant experience so far. It’s web based, just like GMail, so I can access it anywhere I have a browser and an internet connection. It took a little browsing in the help to figure out how to sort everything into folders, but that’s worked out well. I’ve got a folder for Microsoft Devs in general, the XNA team, general XNA blogs, general game development blogs, and I went ahead and threw in two World of Warcraft news sites so I had a little less to keep up with every day.

If you haven’t given Google Reader a try, I highly recommend it. Of course, I’ll keep my eyes open for anything better, but at the moment I see no real reason to change.

More importantly though, if you haven’t tried RSS at all, you really should. Remember, just because you can get by with things now doesn’t make it useless. I think most people would agree that adding extra time to the day would be useful. While Google can’t help you do that (yet), you can get the same effect by taking the things you already do and being more efficient. Or, if you’re like me, and don’t pay attention to blogs, perhaps it’d be a good time to start. Once you see how easy it is and how much useful information you can have sent directly to you, I nearly guarantee you’ll find plenty of ways to use it. :)

17
May
08

Space Defense Hero, v1.5

So, apparently every file hosting place in existence either costs money or limits files to be under a certain size (which I could not fit v1.0 in, even after compression). This was in large part entirely because of the requirements in XNA 2.0 to use WAV files for sound and music. So, I spent an hour or so this evening converting the project to XNA 3.0, to take advantage of the introduction of using MP3s for music. That’s really the only change made. It cut the RAR file to about 25% of what it was, though, so yay.

Remember that if you want to beat the third boss, you’re pretty much going to need to use a Wiimote as your controller.

If you’re interested in downloading…

Source (23.7mb)
Note that compiling this will require Visual Studio 2008, with XNA Game Studio 3.0 CTP installed.

Binaries (21.4mb)
At the moment, I’m not even sure it’s possible to run XNA 3.0 stuff without having the full development installation, but if anyone finds a way to make it work without a full blown installation, please leave a comment.

15
May
08

A look over the design of SDH v1

The initial version of Space Defense Hero served as my introduction to the XNA Framework. As such, the actual design and use of technology is rather atrocious. Since the conclusion of the semester, I have done some work towards refactoring and redesigning, but I think it’s important to go over the initial “release” of the game first.

High Level Overview

The concept is exceedingly simple. You are an unnamed hero who flies through 2-dimensional, side-scrolling levels of increasing difficulty, shooting any asteroids or enemy ships you find in your path. At the end of each level is a boss, which you must defeat to proceed. Each level is randomly generated, choosing locations for asteroids and enemies at run time. The initial position of the boss, however, is set, so each level is the same length.

There is no “winning” in this release. Game play continues, cycling through all of the boss models every third level, until the player has died enough times to run out of lives. As level increases, both the damage taken from getting hit and the score for making kills scale upwards. Theoretically, you could eventually get to a high enough level that requires you to avoid getting hit at all, because any one shot could kill you. As a practical matter, however, it is unlikely that anyone will get past level 6, except perhaps on easy difficulty.

The reasoning for this is simple. Since the class was “Sensor Enabled Game Design,” we hooked up a Wiimote to the computer, via Bluetooth, as the primary method of controls. The general lack of precision this introduces (since we did not have time to involve the sensor bar for a “point where you want to move” control scheme) makes it very difficult to accurately dodge anything. The real goal becomes dodging as much as you can, without making an sudden jerks that may slam you into more than you were trying to dodge initially.

However, this also adds the gimmick of the game: movement in and out of the screen. By tilting to the Nunchuk 90 degrees to the left or right, the player’s ship will dodge in or out of the screen, and then slowly return to the plane that all of the other enemies are on. As a result, the player can dodge laser fire and ships/asteroids. Of course, your lasers won’t hit anything either, while you’re dodging. To prevent abuse, this ability is usable every three seconds.

Of course, every gimmick must have a counter gimmick to encourage use. In this case, it’s the idea of “special weapons” on bosses. Every boss has a standard attack that fires a single shot in a random direction in front of it. The second boss model adds a secondary weapon, which shoots a sustained burst of weaker lasers in the direction of the player every once and a while. Taking one or two of the lasers from this burst will not hurt much, but on higher difficulty levels, taking the entire burst is enough to kill a player.

The third boss model adds another weapon, which is only used once the boss is under 50% health. This ability creates a wall of lasers, from top to bottom, all of which do significantly more damage than an average laser. Dodging this attack is crucial, as it will do a very large amount of damage. However, without the dodge gimmick, the only way to actually void it is to hope that there happens to be an asteroid between the player and the boss. This gamble is foolish at best, and at worst a failing strategy.

Each object has a base score. The score actually received depends on both the current level and the difficulty setting. Player max health, health regeneration rate, starting lives, and damage output all scale downwards with difficulty level. Enemy damage and health remain constant, but from the perspective of the player, who does not see the raw numbers, they appear to gain more health and hit harder.

As would be expected, sounds play when things blow up and lasers are fired. In addition, there are two pieces of music — one for levels, and one for boss fights. For a bit of eye candy, there are particle effects for explosions.

Code Structure

The game is based primarily on the GameStateManagement example. Modifications were made the the InputState class to allow Wiimote handling, as well as some basic additions to give a level completion screen. The bulk of the code, however, has just been thrown into the GameplayScreen object. It’s a fairly simple setup, involving lists of all of the objects we’re interested in, but with few functions. The code itself is pretty unwieldy here. Particle effects were implemented using an adaptation of the Particle sample. Essentially, we brute forced it into the GameStateManagement code. Audio was pulled from the internet (music from Overclocked Remix), converted to WAVs, and pulled in through XACT. The audio content makes up the bulk of the program size.

There are remnants in the code of an attempt to use Steffan Palleson’s Poly-perfect collision detection work, though we were never able to get it working properly. There were some issues trying to explain to our modeler what exactly we wanted in terms of low-poly physics models, so it is quite possibly just an issue of using models that are too complex.

Our object hierarchy could have been better designed, but it worked for the sake of getting an A in the class. Basically, we have a top level GameObject class, and several (Player, EnemyShip, Laser, Asteroid) classes that derive from that. Bosses are simply an extension of EnemyShips. A large amount of relevant data, such as the model and scale, must still be passed in on the constructor, however. Also, there is no really easy way to add additional types of enemies.

Our camera does not move, but rather the player moves within certain bounds, and all objects have been given velocities that will eventually move them into view. Lasers are destroyed once they get off screen, and objects are destroyed once they go off the left side of the screen.

Reflections

A lot of this was brute forced. By the end, encapsulation hardly existed. The concept is sound, and we were able to follow through to enough of an extent to achieve the short term goal of an A, but the code is in no real state to be expanded or improved upon.

To that end, my next project is to reimplement SDH, paying closer attention to design details and planning, then improving the game to fit more closely with the original vision.

15
May
08

Well, it’s gotta start somewhere.

A bit late, to be sure, but I suppose it was inevitable that I’d become a part of the blogging craze.

At any rate, a bit about my intentions and expectations for this blog. While random game related topics will surely find their way in from time to time (I am a gamer, after all), the main purpose is to have a place to discuss what I’m doing in software development. My main interest is game design, and I’ve somewhat recently been introduced to the joy that is Microsoft’s XNA Framework.

My current project is one that I started during this past semester of college: Space Defense Hero. While there’s about a billion 2D side-scrolling space shooters, it seems like a good starting point. Indeed, I’m fairly sure that the reason that there are so many of these is the relative ease. The only physics involved is collision detection, so none of the pain of gravity, etc.

Soon I’ll write up a post on the state of the game as of the end of the semester, and then another to explain what I’ve been doing since then. After that, the focus will be what I’m doing to improve and polish it.