Gamecraft

This blog is all about the craft of making games, and in particular, computer games. Gamecraft involves a broad range of topics, including design, development, quality control, packaging, marketing, management, and life experience.

Name: Gregg Seelhoff
Location: East Lansing, Michigan, United States

Monday, March 19, 2007

Development Paradox

This is a contradiction within management of game development.

I have been engrossed in a frenzy of game programming lately. (Note that "engrossed" is just another way of saying "crunch mode" that I willingly accepted.) Despite managing myself, I am struggling with an issue that affects the development of many games and applications, a contradiction in goals.

On the one hand, good development management practice suggests that one deal with the unknowns early in the process. These unknowns, tasks which are the most difficult to estimate correctly, especially those involving partial information, have a natural tendency to be the longer (and often more tedious) tasks to complete. Another important goal is to get the fundamental foundation of the project (e.g., libraries and elemental routines) as solid and complete, and tested, as possible.

On the other hand, unless one is totally isolated and/or committed, it is important to be able to show tangible progress on a project in terms of visuals or notable features (or perhaps of number of tasks completed). Even if one is completely on his own, it helps morale and provides motivation to get a measurable degree of advancement, rather than updating "50% done" to "90% done" (especially since most such numbers are completely arbitrary anyway).

My current major project has many unknowns (due to the new platform), and loads of opportunities for choosing between minimal implementation of a base class, merely to support a specific task, and a complete and proper implementation, with testing, to handle all anticipated needs. Specifically, when porting a solid library of routines from Windows, I have the choice whether or not to port routines that may not be used in this particular game, but will definitely be needed down the road.

The approach that I have been taking is... well, I will just leave this as an enigma for now.

(As this post runs from "paradox" to "enigma", I must end with a decisive quote.)

"War! What is it good for? Absolutely NOTHING!
... War can't give life; it can only take it away."
-- Edwin Starr

Thursday, March 15, 2007

Formula One 2007

I am excited for the start of a new season of F1 racing.

Tonight (a.k.a., tomorrow morning, Australian time), the first round of practice for the Australian Grand Prix gets underway in Melbourne. This is the first race of the 2007 season for Formula One, after about five months without direct competition. There are lots of changes that could make this a very interesting year.

I could write pages about the upcoming season, but in order to get enough work done before the race starts, I will stick to the main headlines. After 16 seasons, seven-time World Champion Michael Schumacher has retired. Reigning back-to-back World Champion Fernando Alonzo moved from Renault to McLaren, replacing Kimi Raikkonen, who is now at Ferrari with Felipe Massa, fastest in winter testing. American Scott Speed finally regained his ride at Toro Rosso and, in his only test, went faster than the more experienced drivers at their lead team, Red Bull. (Note: Scuderia Toro Rosso means Team Red Bull in Italian.) All teams are on the same tires this year, and each is required to use both available tire compounds during the race, which could lead to both more strategy and more passing.

One of the most interesting stories is the rookie class this year. Lewis Hamilton, 2006 GP2 Champion, and Heikki Kovalainen, 2006 F1 test driver and 2005 GP2 series runner-up, are both going to top teams (McLaren and Renault, respectively), while the highly rated German driver, Adrian Sutil, will be at Spyker. Sutil will have a chance to shine if he can wring extraordinary performance out of his car, which is expected to be toward the rear of the field. Kovalainen is the first Finnish driver with a perceptible personality and could outshine (or at least pressure) his much more experienced teammate. Hamilton is an impressive driver, in one of the top two teams, paired with the reigning F1 World Champion, and he stands an excellent chance of winning in his rookie season. (This Brit also happens to be the first black driver in F1, so if he performs well, expect lots of comparisons with Tiger Woods.)

So what does all of this have to with game development? In the official McLaren preview of the Australian Grand Prix, the following quote is attributed to Lewis Hamilton (in the first paragraph):

"My brother and I have always been playing Formula 1 games on the computer, and now I am going to be one of the cars in those games!"

Very cool, indeed.

Monday, March 12, 2007

New development platform

I have had a beneficial break from Windows lately.

Over the past few weeks, our development efforts have shifted toward a new platform, and I have to admit that I have been enjoying the relatively Vista-free existence. Being less accustomed to the new tools and libraries, there is more for me to learn. Ironically, though, it feels like I am being more productive, due to actually writing original code that is not (and cannot be) copied from other projects. Of course, there is plenty of porting, too, but the system independent stuff actually works with minimal modification.

During the month or so prior to this change, my days were spent doing lots of quality assurance on pieces of code for Windows Vista and then applying the tested alterations to each of our shipping products. The one new product was a replacement for a piece of software (from another company) that broke under Vista and was not expected to be updated. It was fulfilling to get each of those products completed and out the door, but I had also gotten my fill of dealing with Vista idiosyncrasies.

All of my primary communication software (and most of my development tools) are on Windows, but when programming for [the new platform], I do not need to use Windows at all. Last week, I only modified three (!) files on my main development hard drive (making backup almost pointless). On the other hand, I am also physically separated from my email, newsgroups (including the ASP and AISIP), and preferred browser. This means that I can be more productive in terms of programming, but at the cost of being more disconnected. This is why the frequency of blog posts here has fallen (and will stay depressed for a while).

As I started writing this, I realized that my two primary associations with the word "vista" are "horizon" and "sunset". I guess that what Microsoft is subtly indicating is that Vista heralds the sunset of Windows dominance and we should now be looking for new horizons. I am there.

Sunday, March 11, 2007

QB Grand Championship

This entire post is a spoiler; do not read it.

QuizBusters in NeonThe week before last, my son, James, played in the Green Division Championship for QuizBusters. He was one of four players competing for East Lansing High School, the #1 seed in the tournament, and their opponents were from Hartland High School, which was (unsurprisingly) the #2 seed. It definitely looked like this would be the strongest team they had faced yet, and this turned out to be true.

In the initial, 'Quick 10', round of the game, it looked like East Lansing could be on their way to another rout, taking nine of the ten questions and jumping to a 90-10 lead right away. However, that was misleading, as Hartland started a comeback with the 'Toss Up' questions, during which James answered a tough question ("The 16th Amendment") but his team uncharacteristically failed to get the first bonus question (about The Will Rogers Follies on Broadway), earning only 10 of a possible 50 points. After the first 'Pop Quiz' round, the score was tied at 170, and we were getting nervous.

Fortunately, East Lansing finally hit their stride and managed to earn some sweeps, taking the next 170 points to double Hartland's score, and from there the game never got close again. East Lansing won the Championship by a final score of 540-290, which was the closest game all season. In fact, East Lansing did not have twice Hartland's final score, and this was the only QB game this season where they did not at least triple the opponent. The victory came complete with $5000 scholarship offers from Michigan State University, where James has already been accepted. Nice.

This past week, East Lansing faced the White Division Champions, Kent City, in the QuizBusters Grand Championship. Watching the weekly games on television, it is clear that the Green Division teams, from the bigger schools, tend to be better than the White Division teams. This game played out to form, and it really was not much of a game, East Lansing winning 530-90. However, they did complete one of their side goals for the season, sweeping all ten of the 'Quick 10' questions (to take an initial 100-0 lead). Of course, winning the game also added a one year book scholarship for each player, so that will help James even more.

For those interested in watching the games, the Division Quarterfinals, versus Okemos, will be aired on April 1st (no fooling), the Division Semifinals, versus Howell, will air on April 29th, the Green Division Championship will show May 13th, and finally, the Grand Championship will be shown on May 20th. All of the games are (reputedly) viewable online after they air on WKAR, and the web site also lists the full broadcast schedule for all games.

Grand ChampionsThe varsity QuizBusters team before the Division Championship.

East Lansing The East Lansing team celebrates the Grand Championship.

Friday, March 02, 2007

Vista gotchas

Watch out for some programming issues in Vista.

Now that I have Windows Vista installed and running, albeit only as a test platform, I have discovered some programming pitfalls that are not among the major issues reported. So, as a service to my readers, here are two unexpected issues that my affect the operation of some programs under Vista.

First, the standard C function, tmpfile(), does not function correctly in the more restrictive LUA (Limited User Account) of Vista, nor probably of XP. The tmpfile() function is (supposed to be) a portable routine for creating a temporary file. Unfortunately, the Visual C++ 6 implementation (at least) attempts to create the file in the program directory, to which a program no longer has write access, as opposed to a temporary directory elsewhere. The result is, simply, that the function fails. Honestly, this is not a very common function in most code, but this problem does affect some cross-platform libraries, such as certain builds of the (commonly used) JPEG library from the Independent JPEG Group, rendering some (but not all) JPEG files unreadable.

The other undocumented issue is with the Win32 API function, ShellExecute(), which is commonly used (and the recommended way) to launch document and executable files, including external web pages, from within another program. The behavior of the Vista implementation of ShellExecute() does not match that of Windows XP or earlier versions of Windows, in that it no longer recognizes a slash (/) as a directory separator. In other words, attempting to launch a file named "game/setup.exe" will work in XP and fail in Vista, whereas "game\setup.exe" (or, rather, "game\\setup.exe", as a C string constant) will function correctly in both situations. Of course, the obvious workaround is to simply replace slashes with backslashes, but that does not help the applications that are already shipped and installed, and now broken by Vista.

I will acknowledge that this sort of problem creeps in with any operating system change by pointing out that I recently found a nice crash bug in Windows 98. If you create a dialog box with no controls, intended as a container, and then explicitly create a control with the dialog box as a parent (i.e., add a control), the program will crash in USER32 as soon the dialog box is displayed. The workaround is simply to add a hidden control to the container dialog box template, but trying to figure out why a simple call to ShowWindow() would crash a program is more than a little frustrating.

Now you all know how I spent the last couple of weeks.