On running, goals, and software

by Seanba on January 26, 2010

Zombieland Rule #1: Cardio

This past November I decided to run a half-marathon with a friend. I was never really much of a runner (I could barely handle 3 miles on the treadmill) and had previously found that kind of exercise so incredibly boring. But still, it bothered me knowing I could never survive the zombie apocalypse. So I registered, thereby assigning myself a new goal: In 10 weeks I’ll be able to run 13.1 miles.

Well, the run was held yesterday morning and I wasn’t there.

For the first 7 weeks of training I was feeling great about my progress. I did notice my knees acting up at times (a new sensation for me) but I was right on track to meet my goal. I was going to make it and it was going to be awesome. I was even planning to write about it here and how important it is to challenge yourself and realize your goals and blah, blah, blah.

And then 3 weeks ago I foolishly decided to push through the pain (said in my father’s voice) while reaching for a new milestone of 8 miles. Stupid. Stupid. Stupid. Now one day after the race I’m finally able to run a measly 3 miles again.

Programmers like me are natural cynics so my first thought was to chalk this up as just one more thing in life that I suck at. I tried and I failed. Film at 11.

But on second thought, why am I still running?

Truth be told when I first made the decision to run I figured I’d just do what it takes to achieve that goal and then move on with my life, all smug and stuff. But something much better happened. I actually really like running. A lot.

And now I’m a bit smarter about it. I’ve got special shoes to help absorb the impact on my knees and I’m carefully working my mileage back up. And I’ll run that bastard of a race next time.

Conquest: Frontier Wars

Now maybe I think about my job too much but I can’t help but to take everything I learn in life and somehow apply it to the career I love. When I started my life in game development the goal was simple: I was going to make a really kickass game. Metal Gear Solid and Quake 3 and Age of Kings better watch out, I have arrived.

Ten years and three shipped titles later that goal is still not achieved. That does get me down if I allow it – but I’ve done work I’m really proud of, with some crazy smart people, and have shipped 3 games that were just shy of being great.

Plus I learned, much more than I thought I would, that I really do love programming. It’s not just about having a career somehow tied to video games anymore.  I get a real kick out of doing my day-to-day job well and learning how to do it better.

And I’ll ship that bastard of a triple-A game next time. :)

It’s kind of like that old saying about the journey and the destination. There is great value to be found in your attempt to meet an important goal, even if you fail.

{ 0 comments }

My take on Zack & Wiki sales

by Seanba on January 17, 2010

Zack & Wiki: Quest For Barbaros’ Treasure, is one of my favorite games for the Wii platform, as best expressed (as many things are) through a Venn diagram:

venn_zackwiki

These kind of games are pretty hard to come by, especially considering my children are young girls, so I’m quick to sing their praises when they come around. In this case, Zack & Wiki is to be rewarded for doing something new and doing it well for all audiences. It’s exactly the kind of game I want to see more of.

Which, for this series, may never happen again due to absolutely dismal sales. As a developer, this breaks my heart. It’s tough enough to make any game, much less a very good one, and that accomplishment should always be awarded with a strong showing at retail.

So what the hell happened? Capcom offers that it’s impossible to tell who the Wii audience is, that it’s a tough market to crack. But I don’t find that justification satisfying, especially given their record-breaking success with Resident Evil 4 Wii Edition.

Now granted, I could never be mistaken for a marketing guru, but I think I can help crack this one. Standard caveats of talking out of one’s arse apply.

1) I didn’t know Zack & Wiki existed

As noted above, I’m always on the lookout for great games I can enjoy with my girls. Plus, I’m absolutely surrounded by video game enthusiasts. If a game is suited to my tastes and it isn’t on my radar than there’s a problem. How did I not know about this? Was there even a marketing push for the game?

It wasn’t until a full year after Zack & Wiki’s release that a friend told me about it, which brings me to my next point …

2) I’ve got this game named Zack & Wiki: Quest For Barbaros’ Treasure

Look, I know it’s tough to come up with a name that sounds cool and tells us a bit about your product, but for some reason Capcom went with the Joey Joe Joe Junior Shabadoo of video game names.

When someone finally told me about this game I had a hard time believing it would be up my alley because the name sounded so ridiculous to me.

3) Did you see the 2007 Christmas lineup?

I remember the Christmas season of 2007 (during which Zack & Wiki was released) as the time when I just gave up trying to keep up with all the high quality games being released in such short order:

That list is just stunning. And some of those games were not just good, but completely revolutionary. I don’t care what the marketing guys say about Christmas dollars, you’d have be totally nuts to go up against that lineup.

And more to the point for Zack & Wiki, you’ve got Metroid, Zelda, and Mario (the most successful franchise of all time) in one season? And you’re going to ship against that? Insanity.

(Actually, come to think of it, maybe Capcom did have a competent marketing presence for this game in place but it just got lost in all the noise.)

What’s tragic for the Zack & Wiki guys is that there was a real dearth of top quality games on the Wii about six months later, once Super Smash Bros. Brawl and Mario Kart Wii had shipped, that lasted for far too long. These devs at Capcom no doubt worked like mad to meet the Christmas market deadline but, ironically, probably would have faired much better had they just pushed it out until the summer of 2008. I was definitely itching for something new on my Wii (that sounds so wrong) by then.

zack-wiki

Oh well, who knows what really would have pushed this game into the limelight that it deserved. I just hope the developers are proud of the great work they did and that Capcom hasn’t totally given up on a sequel. Me and my kids would be thrilled to see one.

PS: When I think about what went wrong with Tabula Rasa, points 2 and 3 from above are definite standouts. I won’t blame anyone for saying Tabula Rasa is an even worse name than Zack & Wiki and our release date in late October 2007 was every bit as foolish.

{ 0 comments }

I recently discovered a listing of free graphic programming books via GameRendering.com. A couple are a bit dated but are still good resources on graphic hardware programming and the mathematical concepts behind (advanced) lighting and shadowing techniques.

(The first book is actually pretty new and covers DirectX 10. It is free while the authors work out a publishing deal. They would appreciate you purchase a print version when available.)

By the way, why Nvidia put some bald dude’s ugly head on the cover of their latest GPU Gems book instead of one of those pretty little fairies they’re famous for is beyond me.

GPU Gems 3

GPU Gems 3 has a chapter on the deferred shading solution used in Tabula Rasa, the last published game I both shipped and said good-bye to. The article was written by our client lead, and one of my mentors, Rusty Koonce. He was gracious enough to give me a prop in that book:

I would like to thank all of the contributors to this chapter, including a few at NCsoft Austin who also have helped make our rendering engine possible: Sean Barton, Tom Gambill, Aaron Otstott, John Styes, and Quoc Tran.

That’s nice, but make no mistake, Rusty was the real brains behind it. Well, and maybe John too. ;)

Incidentally, Aaron is working on Star Wars: The Old Republic, John is on DC Universe Online, and Quoc and I are with the Disney Epic Mickey team. Did I ever mention how cool this industry is?

{ 0 comments }

It seems like every holiday break I prove to myself just how badly I need a career in order to keep myself alive and functional.

I’m reminded of an old Spirit of the West song, titled Home for a Rest, which is well known to my fellow Canadian ex-pats:

You’ll have to excuse me, I’m not at my best
I’ve been gone for a week, I’ve been drunk since I left
These so-called vacations will soon be my death
I’m so sick from the drink, I need home for a rest.

Except in my case I haven’t been drinking myself stupid, but I did play the living hell out of some great video games. And now I’ve trained myself to sleep between 4am and 12pm plus I’ve got a throbbing headache at the back of my skull that is starting to outsmart ibuprofen.

Bob Dob paints Mario and Donkey Kong drinking

Ironically, I can’t keep this up much longer. I need to get into the office for a rest.

Like every single game developer on planet Earth I dream of someday developing one of the games I’ve been thinking of for decades now. That may happen in some fashion in the future, but I guess I need to learn to manage my free time just a little bit better first.

Or maybe I just deserved a break – and there are certainly worse ways for a video game developer to pass the time than by playing (and enjoying!), you know, video games.

Perfect Knight: 100% Complete

Oh well. I’ll strike the right balance some day, but at least I finally managed to unlock every single achievement in Batman: Arkham Asylum.

{ 0 comments }

I barely ever watch broadcast television, much less enjoy it, so it was a nice surprise to accidently come across The Kennedy Center Honors the other evening just long enough to notice that Bruce Springsteen (amongst others) was being inducted.

2009 Kennedy Center inductees

I’ve always liked the man Springsteen, from what little I can really know about the person, but it takes the speech crafting of someone as talented as Jon Stewart (who honored Springsteen that evening) to explain why:

Whenever I see Bruce Springsteen do anything he empties the tank … every time.

Yep, that’s it. I just can’t help but be drawn to someone who has such passion for what they do.

I know it’s a stretch to tie this into the kind of message I want for my blog about making better video game software, but we’re all back at the office in a couple of days after a nice break and I’m thinking of what motivation to bring with me in order to launch the year strong.

Here it is: First, I want to make sure I’m always in the right direction and working on something of good value to me, my team, and our game. And second, once that direction is secured … empty the tank.

There, that’s about the closest I can ever come to a New Year’s resolution. Happy 2010.

{ 0 comments }

1,099 retail games in 2009

by Seanba on December 29, 2009

According to a report cited by Gamasutra, there was a staggering 1,099 console video games released to retail this past year.

And of course half of them were either Rock Band or Guitar Hero properties, am I right? :)

Anyway, today I took stock of the retail games that I purchased or were gifted to me in 2009 …

  • 12 Xbox 360 games
  • 4 Nintendo DS games
  • 2 Nintendo GBA games
  • 1 Wii game*

Spirit Tracks box

Nineteen games? I would have figured a number much smaller than that. Hey, I’m an enthusiastic gamer and all, but we developers have a large network of gamers to borrow from and free access to a large library of titles at work. So look at me being a good American consumer anyway. During a recession, no less. Capitalism!

I don’t know exactly how many games your average console owner buys, but it is certainly a much smaller number. When I worked for Microsoft I remember our marketing guys claiming consumers buy, on average, 9 retail-priced games for each console they own – during the lifetime of the platform. Incidentally, this is how Nintendo** and Microsoft and Sony make money on their consoles, through the license fees of a meager 10 or so new (i.e. not from the used rack or bargain bin) video games over a 5 year run. Sony would do well to remember that before releasing another $600 console.

Modern Warfare 2 box art

To me, with your average console owner buying maybe 4 new games annually*** in a year with 1,099 titles to chose from, there’s a very sad truth to be found: There’s a lot of game developers taking a severe pounding out there. And this is only for the developers that actually ship a product and have to compete with Modern Warfare 2 for shelf space.

There might have been a day where you could wander aimlessly with a schedule and some money and a room full of gaming geeks to release a game to market and hope for the best … but that day has long gone by. This is serious business.

I truly believe that rule number one for our business is that we must find fun in our work (really, why even bother with it otherwise?) … but it’s also a tough industry that requires us to be a little bit grown up about it too.

Good luck in 2010 to all my developer buddies.

* Looking back, I’m a bit surprised the Wii games didn’t compete better for my dollars. But then again, it was a relatively weak year, with respect to the games I prefer, for that platform. 
** Yeah, I know. Nintendo actually turns a profit on console hardware sales alone. Sony and Microsoft take note. 
*** I’m being generous here because that statistic is a bit old and many homes have more than one console.

{ 0 comments }

Fun programming exercises with Project Euler

by Seanba on December 23, 2009

Leonhard Euler

I don’t know about programmers in the real world but as a video game programmer I often worry about my coding skills getting a little bit stagnant due to our near-universal reliance on C++. And that problem is even worse if you work at one of those places where fancy stuff like templates, the STL, and smart pointers are discouraged (because “they’re slow”, or something) and especially so if inheritance gone wild is encouraged.

Yes, again with that Pragmatic Programmer book

People that know me are well aware of my love for The Pragmatic Programmer. I don’t enjoy going around telling people what to do, nor do I pretend to have the authority to do so, but I think it’s one of those books that should be read by anyone who enthusiastically writes code for a living.

A very popular bit of advice from that book is to learn a new programming language every year. I actually only manage to learn a new language every couple of years, but it’s still valuable advice. Learning C#, for instance, was one of the better moves for me as I’ve found more and more game studios are using C# for their tools development.

Lately, I’ve been looking for a good scripting language to add to my repertoire. And by good I mean not Python or Perl (tongue firmly implanted in cheek, btw). I actually have extensive experience with Python (most of Tabula Rasa was written in Python) but I can’t stand the whitespace syntax. And Perl? Well, let’s just say that when it comes to a programming language that I am a very shallow man – and a good personality just isn’t enough.

Autobots and Decepticons fight

So I’ve decided to give this Ruby thing a try, for no other reason than because everyone seems to be talking about it. Besides, it was invented in Japan. I mean, come on, this is the nation that gave us Sushi, The Transformers, and Nintendo – so you know Ruby has to be awesome. ‘Nuff said. Case closed. Q.E.D.

But learning a new language can be kind of boring

I find the hardest part of teaching yourself a new programming language is that you need practice – and those first few exercises, on the order of Hello World, just aren’t that exciting. It’s kind of like sitting down with a piano teacher and going over the C major scale. Screw that, I want to play Für Elise already. But I guess you have to go through that boring stuff before you can accomplish something meaningful.

Project Euler provides cool exercises for programmers

Through Math-Blog, I have recently discovered a totally cool site for mathematicians and programmers, Project Euler:

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

And here’s the money quote from Math-Blog’s Antonio Cangiano explaining how this relates to us folks in search for exciting ways to self-teach a new computer language:

Finally, if you are a programmer who’s scoping out a new programming language, be it Python, Ruby, Scala, Haskell or Erlang, you’ll find a great ally in Project Euler. Having to write hundreds of programs in a given language, will naturally increase your familiarity with that language. And again, comparing your newcomer coding style with those of more experience participants, will no doubt contribute to your advancement within the given language you’re focusing on.

Right on. For my own part, I just finished my first solution to Problem #9:

A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,

a2 + b2 = c2

For example, 32 + 42 = 9 + 16 = 25 = 52.

There exists exactly one Pythagorean triplet for which a + b + c = 1000.
Find the product abc.

Project Euler frowns upon just giving out answers on the internet, but I don’t mind saying that a quick look at Wikipedia for Pythagorean triple generating functions helped me get to a solution that wasn’t entirely brute force, and I learned just a little bit more Ruby in doing so.

Pythagorean Theorem

+1 Math and +1 Ruby? Nice.

 

And what I found really awesome was, after entering the answer key on Project Euler’s website, I was granted access to a special forum for that solution, and was rather, um, humbled by the much more elegant solutions that existed, both in terms of mathematical knowledge and mastery of a given language. This is very cool stuff for learning.

269 bottles of math on the wall

There are currently 269 problems up in Project Euler to solve but I doubt I’ll ever do more than a dozen or so over time. I have a ton of other projects on the go and I just want an interesting problem or two to work on as I grasp a new programming language, though if I’m really tempted, I just might do enough to become a Level 1 Eulerian. :)

As an enthusiast of both programming and mathematics, Project Euler has my highest recommendation. Check them out.

{ 0 comments }

Image tag hell and the power of programming

by Seanba on December 20, 2009

I don’t fancy myself any type of graphic designer or anything but I have at least studied some of the concepts and I know what CRAP stands for. I try my best to bring what little experience or talent (yeah, right) I have in this arena to make everything I write just a little bit less sucky. Ever ask for a spec from a co-worker only to receive an email of text diarrhea? Well, I don’t do that.

Hmmm … crap and diarrhea in the first paragraph? Great starter, no?

Anyway, even though I’m a complete neophyte to owning and maintaining a blog or website or domain or anything intertubes-based, I do try to layout my writing in a fun way that keeps my non-existent readers reading, and breaking up content with a contextual image or two is a good way to do that.

frak

But one thing I wasn’t prepared for is how much of a clusterfrak this can be. And by the way, isn’t Battlestar Galactica absolutely wonderful for giving us a new form of profanity that isn’t (yet) profane?

First off, WordPress is a wonderful blogging platform (or so says the new guy) but I just can’t bring myself to use their online editor to do anything, particularly importing and placing images. Programmers like to flow, and that just isn’t going to happen with any kind of web tool.

A better option: Windows Live Writer

Thankfully, Microsoft provides Windows Live Writer, a free WYSIWYG editor that has made my blog life a lot easier*. It supports all popular blogging platforms and allows me to place my text and images and links, using the styles and themes employed by my blog and, get this, it even uploads all my images to my site automagically. No more clumsy importing into WordPress multimedia libraries just to see if an image works for my post.

Sounds good … but then I looked at the HTML it produces for my image tags (I formatted the HTML to look at least passably readable):

<img

  style="border-right-width: 0px;

         display: inline;

         border-top-width: 0px;

         border-bottom-width: 0px;

         margin-left: 0px;

         border-left-width: 0px;

         margin-right: 0px"

  title="my image title"

  border="0"

  alt="my image title"

  align="right"

  src="path/to/image-file.jpg"

  width="256"

  height="128"

/>

What the frak? I’m a complete noob at this but even I can see at least 3 problems:

  • It uses deprecated attributes (align and border).
  • The title and alt attribute values are the same.
  • Look at all that hideous inline styling! Dude, that’s what my CSS files are for.

Don’t get me wrong, Live Writer is pretty cool, but now I was forced to go into the source HTML and edit the <img> tags by hand to get rid of the old junk, use title and alt as intended, and reference my CSS class. That’s not too horrible, I guess, but it messes with my flow, you know?

So here I am thinking I’m a standards-compliant big shot, bragging to, like, the only subscriber of this blog so far about my improved mad skillz and then he brings up my blog on Google Reader:

Missing align tag for feed readers

Great. Did you know that feed readers like Google Reader couldn’t give a frak** about your style sheets? Being a total knob I was so preoccupied with the look and feel of my site in a browser that I didn’t even bother to check.

So I could go back to using inline styling, even though that feels a bit icky, but I found that doesn’t work well for mobile feed readers, like on my iPhone:

Still looks bad with align tags

Yuck. In cases like this I’d rather just have my images be treated as inline with no attempt at alignment. And miracle of miracles, despite what the perils of programming has taught me to expect, that is actually pretty easy to accomplish:

To get them to display properly in a feed reader, all you have to do is set up your img reference in a separate paragraph in your post editor, but you also need to make sure that it appears directly before the text that you want it to sit next to.

Many thanks go to Chris Pearsons for that elegant solution to my problem. Now I can go ahead and edit my <img> tags as I want, and further, by wrapping them (or their parent <a> link tags) in an enclosing <p> tag I can have them appear exactly as I’d like on my website yet inline when viewed through a reader that ignores my custom style sheets.

That’s great, but what about flow?

Most of the time, Live Writer is a great tool for blogging while in the zone, but having to stop to view and edit the HTML source by hand is a giant pain, and I often find myself manipulating the wrong element or attribute by mistake.

But wait, I’m a programmer. I can do something about that.

Thankfully, the developers behind Live Writer have made their product extensible through plugins, and it really was as easy to roll my own as they say. (I found this Hello World example to be helpful too.)

So after a bit of mucking about I was able to process all my images with a custom C# form I made. It does require me to highlight a section of HTML that is well-formed Xml code, but I just select the whole post and run it through my plugin anyway. I also added a tool that will take a selected piece of HTML and wrap a paragraph tag around it – handy for having those images appear inline in feed readers.

It’s not ship quality, and I could certainly put more effort into this, but for the short time I worked on it I get the results I need with a much smaller hit on my flowy zoneness.

My plugin form

Nice. This is the kind of stuff that really turns my crank, or floats my boat, or whatever verbs my metaphor as a programmer. To cite the 80/20 rule, I find that just about any tool or process out there might get you to 80% of what you want. Programming is about getting that other 20%, and I love the confidence and independence that comes with that. It’s the power of programming.

For completeness, the C# class library solution for this plugin can be found here, with the lone DLL available here. I doubt I’ll do any further work with this, but should the need arise I’ve got this small effort, like all my coding adventures, under source control.

* Thanks to Scott Hanselman for recommending Windows Live Writer, and a whole bunch of other tools.
** Seriously, I promise to give this “frak” thing a break.

Update: Well what do you know? The original title of this post was "<img> tag hell and the power of programming". Guess which famous feed reader tried to make an image out of that? :)

{ 0 comments }