Mode 13
Games
Miasma
Psychopomp
Fate Meridian
Gallery
Web Log
Support
Contact Mode 13
About Mode 13

2010 Archive

Back to 2011
2009 archived here
2008 archived here
2007 archived here
2006 archived here

It's an honor just to be nominated.
December 31st, 2010

Play This ThingIn my quest to generate a broader audience for Fate Meridian I have begun looking at the more popular on-line venues for indie and casual games. Play This Thing is one that shows up over and over again in forums as a good place to go, and I like them because they have a different way of choosing the games they cover.

Rather than submitting your game directly to their editor, you suggest your game to the public. It then goes on a list where others can play the demo and rate your game. The site also has a staff of writers who might decide to review your game and feature it on their home page. I like this dual approach because it still has the full review potential of a standard indie game news site, but also serves as a place where the game-playing public can rate the games they like best. I'm a big fan of survival of the fittest.

And then the fittest showed up.

The suggested list at Play This Thing is sorted by most recent submission date, and the most revered game developer on the planet submitted a game four days after I did. Now instead of seeing the names of several smaller indie shops and choosing among their games to try, visitors will be looking at id, and I can't blame them. I'm such an id fanboy that my eyes jumped to it as soon as the page loaded. Drool.

Even if you don't know the name id Software you certainly know the Doom and Quake game franchises. Before id changed the world with those series, they released a game called Commander Keen. They've converted the classic 2D platformer to Flash, and now everyone with a web browser can see the game that started it all.

If anybody's going to be taking eyes away from me, I'm happy it's these guys. If it weren't for id I probably wouldn't even be in this industry. The original Doom and Quake mark the only two times I've stared speechless at a computer screen. Simply the best in the business, and I'm honored to be listed on the same web page as them, even if it is only an accident of timing.

 

Happy New Year,

Jon

 

 

Water heaters: the great vacation killers
December 24th, 2010

It started with a drip. Actually the outline of a puddle, followed by a drip. Last weekend I spotted a slow-but-persistant drip from the bottom of my water heater. This is my first home, so I'm a newbie when it comes to most appliances, but I had heard the horror stories of people who decided not to replace their water heaters at the first sign of a tank leak. Flooded basements, eroded concrete foundations, ruined carpets. Not one of those alternatives were worth seeing how many more months I could squeeze out of this heater. After a visit from Centerpoint confirmed that it was a tank leak and not a fixture leak, I braced for the inevitable: I wasn't going to Manhattan.

When I started on this adventure called entrepreneurship I came up with a budget that would take care of my basic needs as well as some extra money for fun and excitement. Each month there was money for going to movies, having drinks with friends, and buying cool stuff that couldn't be considered a necessity. In addition to this, there was the "surplus" category which was supposed to be used to fund a trip for each game I completed. These trips would help me get the hell out of Dodge for a while, clear my head, and remember what it feels like to not be programming in my basement.

The trick with the surplus is it is just that: whatever money I have left over. If I have to do a major unbudgeted repair on my car, it comes from this surplus, as do advertising and business expenses. The original plan with the surplus was to leave enough left over to get on a plane and go somewhere, while staying in something nicer than a hostel.

Then the drip happened. I know the theory behind heating water sounds pretty simple, but the machines that do it are expensive nonetheless. So expensive that it ate through the entire Manhattan budget in one shot. Who knew that:

plane from MSP to JFK + 3 nights at Millennium Hilton = hot showers + doing laundry

Still, while the holidays will not include a trip to Rockefeller Center to go ice skating, they will include hot cocoa. Almost as good.

 

Merry Christmas and Happy New Year,

Jon

 

ATI ratted me out
December 24th, 2010

Up until yesterday my main video card had been nVidia's 6800 GT. This beast ran Doom III and Half Life II with ease back when other cards were choking, ran Maya beautifully, and let me edit videos in Vegas with one GPU tied behind its back. It required its own power cable directly from the power supply, had a huge fan that cooled several square inches of heat sink, and took up two PCI slots. Awesomely over-the-top.

Until Tuesday, when it died. To its credit, it has been very reliable for six years, the last two of which have seen it running over 12 hours a day, never in standby mode (my mother board has a problem with standby mode, so I never invoke it). Also to its credit, it died gracefully. First it showed the green lines so common in cards that are about to go. Then it stopped letting Windows use it as an accelerator, though it did still provide basic VGA graphics while I troubleshot everything. Finally, as if it knew that I had resigned myself to replacing the card, it died completely. Goodbye, my sweet.

Replacing a video card for a six-year-old computer is a job of work. With its 350-watt power supply my computer can't even power most of today's cards. Still, there are some budget cards out there that make the cut, and after a brief stop at an nVidia 430 that had a flicker problem on its secondary monitor output, I have installed the ATI 4350. Then my game engine didn't work.

Okay, maybe "didn't work" is overly dramatic, but ugly diagonal lines in my textures that weren't there before were there now, and I hadn't written any new code or even recompiled it. Drivers, you say? I had the latest. Bad card, you say? That's what I was thinking, except that everything that involved heavy 3D, from Maya to Oblivion, was working fine. Gangbusters even.

Then I remembered the half-texel trick. When you're working with polygon vertices and you want the texture on the polygon to match perfectly to a pixel on the screen, you have to move the vertex left and up half a pixel. This is because DirectX does this when it's trying to figure out what color a screen pixel will be when it is provided with a vertex, a texture, and a set of UV coordinates.

The reason I had never actually done this with my engine was because everything looked fine on my 6800. Now that I have the ATI, I can see the effects of not dealing with it. It doesn't seem to affect single quads, because Fate Meridian (which uses only single quads) still looks fine with no alterations, and the single quads in my second game look fine. The grids of multiple quads in my second game, however, did not look fine. These grids share a vertex buffer, are drawn with a single call, and the vertices of each quad in the grid overlap. In this case I was seeing the diagonal lines in the textures.

To fix it, all I had to do was implement the method Microsoft lays out in the SDK documentation (search for "Directly Mapping Texels to Pixels" and you'll find it), which is to subtract 0.5 from the screen position you're shooting for. So, if you want a four pixel square quad to show each of its pixels perfectly at screen position (0, 0), the vertex coordinates for that quad need to start at -0.5 and go to 3.5 instead of 0 to 4.

 

Happy coding,

Jon

 

Walking with a switch: 1081 Kilobytes
Tour guide swagger: priceless

December 13th, 2010

tour guide directional

Animation is the watchword. At least that's what I'm telling myself for game # 2 (working title: game numero deux). While Fate Meridian is a turn-based game that welcomes calm reflection, game # 2 will be a fast-paced arcade-style game that welcomes spastic button pressing. Since the arcade style demands a different look than turn-based strategy, I've fired up Maya and started keying the frames.

Initially I hadn't gone this route. Since the enemies in game # 2 are fairly small, I wasn't sure if subtle animations were worth burdening the player with larger file sizes and higher texture RAM requirements.

This all changed when I created the tour guide. She's an indestructible robot with platinum blond hair, smooth steel skin, and no arms. Her job in the game is to march around and tell some of the story, while your job is to listen to her narration and stay out of her way.

The initial art file (above) consisted of eight directional images, one for each major compass direction, but no animation of any kind. When I looked at her on-screen, she didn't have any real presence at all; it was just a bitmap scrolling down the screen, not looking particularly menacing. I could have added a bobbing motion to suggest hovering, but I think she still would have looked lifeless.

Enter Mars Attacks. I was trying to come up with a movement that was sort of creepy, but not a big movement that would distract the player from the rest of the game. I remembered the woman from Mars Attacks that was actually an alien, and how she walked (and chewed the creepy gum that the aliens had to chew to survive). It was this sort of hovering motion with her hips moving side to side, and I thought that would be fun.

So, even though the resulting texture file is over 1 megabyte larger than the original non-animated version, I think the animation is worth it. She'll still kill you instantly if you touch her, but there will now be a swagger in her step as she does it.

tour guide animated

Happy coding,

Jon

 

 

DirectSound, effects, and the GUID. Three years is too long to remember something.
October 4th, 2010

Today was supposed to be one of those lazy programming days where I know what I'm doing, am adding functionality that I fully understand, and have a reference book in front of me that describes the process for adding this functionality. The biggest challenge on days like this is supposed to be staying sufficiently caffeinated while typing code into the IDE. Such an arrogant attitude was bound to get me into trouble.

The worst part of my problems today is that I've seen them before. No, the worst part is that I've solved them before. Scratch that. It's that I've even blogged about them before. I think this must be what the early part of senility feels like. Maybe the definition of insanity ought to be amended to account for those who expect different results because they don't remember that they've done this same thing already.

[Linker Error] Error: Unresolved external '_IID_IDirectSoundBuffer8'
[Linker Error] Error: Unresolved external '_IID_IDirectSoundFXChorus'
[Linker Error] Error: Unresolved external '_GUID_DSFX_STANDARD_CHORUS'

Today's plan was adding a chorus effect during run-time to an existing sound buffer using DirectSound. This requires some COM magic that made me want to throw up a little. What can I say, pointer casting makes me a little dizzy. This COM magic, in turn, requires GUIDs of all shapes and sizes. Any time you need GUIDs, you cannot forget to #include <initguid.h> in your project BEFORE your DirectX #includes. You include it once and only once, and you're all set.

 

Happy coding,

Jon

 

Fate Meridian is released!
September 15th, 2010

Fate Meridian Start ScreenFate Meridian is officially available! Fifteen months in the making, this is the game about which I've been blogging for so long (please pardon the gap towards the end. Crunch time is a bitch).

The past few weeks have been a blur, so it's nice to slow down a bit and type this entry now that the dust has settled. The blur began in mid-August when an ad I'd purchased ran about a week before I thought it would. "Eeek!" would be an understatement.

I spent four hours whipping up a "Thanks for stopping by! The demo version will be ready soon! Please give me your e-mail address so I can tell you when it will be ready!" web site. Not my finest moment, but I think it got the job done. Did I mention that the demo wasn't actually done?

Thankfully it was very nearly done, and I finished it off over the next three days. The full commercial version took another week because I was adding and testing three difficulty levels, so balance was key. I actually spent three straight days playing the "Hard" difficulty level trying to beat it, and only won once. Your mileage may vary. :)

Officially the game was available on September 1st, 2010. I held off announcing it because I wanted to gauge the traffic from the first magazine ad. Sensing the calm before the announcement storm, I headed up north for some camping to decompress.

Camping was fine, although 40 degree nights do test one's calm. That, however, was nothing compared to losing the gas cap to my Jetta which, as other Jetta owners who might be reading know, is critical to starting the car. I am here to tell you that duct tape does, in fact, work as a reasonable substitute. Just don't let the revs go too high or too low, because it will stall. Limping my car from Two Harbors (who were out of gas caps for '99 Jettas) to Duluth (who had one left) was the beginning of my adventure.

The adventure continued on Monday when I fired up my computer to type this entry and other release announcements. The blue screen of death greeted me. And not just any blue screen of death, but the one where even Safe Mode doesn't work. I spent four futile hours trying to get my rig started again before finally giving up. Format C: (sniff).

So here I sit, with a clean install of Windows, my first game in the can and already starting work on the second one. Stop by the main site (www.mode13.com) and give the game a try and let me know what you think. If you like turn-based nautical games with old-school 2D graphics, I think you'll be pleasantly surprised.

 

Happy coding,

Jon

 

Mill City Ruins + Digital Camera = Free Texture Library
June 28th, 2010

Mill City Collage

There comes a time in every 3D artist's life when he realizes he's exhausted Maya's shader library and needs to branch out. Seriously, half the images in my upcoming game use either one of the five wood planks or one of the eight brick patterns in Maya's default material directory. Alias did a great job with the library; the textures are photo-realistic and seamless. However, at some point you will need a sixth type of wood.

When you do, may I suggest finding the nearest municipally-preserved historical site. In the case of Minneapolis, may I suggest the Mill City ruins. You've got several decaying brick buildings, the Stone Arch bridge, an aged wooden walk-way, and the buildings just across the bridge at St. Anthony Main.

I snagged almost 50 new textures, all of which have found their way into images in my game. To your left is a collage featuring Maya scenes that use several of those textures. What might seem like incredibly detailed models are simply cubes with the photos I took used as both texture and bump map.

 

Happy Rendering,

Jon

 

 

I feel the need...
June 8th, 2010

So I'm over at my friends' house the other night, and I'm showing them the latest build of my game. The wife just got a new Dell laptop with Windows 7 on it, so I know it won't have any trouble running a program that's meant to run smoothly on much older machines. Sure, it won't have the beefy graphics cards that my dev and test machines have, but laptop cards are pretty great now anyway. Fly, game! Fly!

Except it didn't fly. It faltered. It was painfully slow on a machine that could run much more complicated games with one hand tied behind its back. Slow on a machine that most of my potential customers will have. Slow, and I needed to figure out why.

Michael Abrash said it best: never assume anything with regard to speed; time the code. I myself have been bitten several times by timing assumptions that seemed perfectly logical to me and yet had nothing to do with the actual cause of the performance problem.

My game is proving to be similarly surprising.

My first problem was that my game was taking over 90 seconds to load the images it uses. This might be acceptable if I had gigabytes of textures, but I've got 600 relatively small image files, so 90 seconds seemed ridiculous. Knowing how slow disk I/O is, I just assumed that the problem was that it had to open, read, and close 600 individual files, and that if I put all those images in one big file, that would solve it. Still, before resorting to that I applied the Abrash axiom and timed the code. I was not even close to being right on this one.

If you're a programmer who uses Borland you have access to the TBitmap component. If you're reading the pixels from it using TBitmap->Canvas->Pixels[x][y] property, you're doing it in the slowest possible way. Of course, this is the way I was doing it. Unfortunately most of the Borland OpenGL / DirectX code samples on the web use the Pixels[x][y] array when loading an image into video RAM, so this is how I learned it. I don't blame the authors of the samples; the Pixels[x][y] array is by far the easiest and most intuitive way to do it, and easy and intuitive are what people new to graphics programming need.

Unfortunately, eventually you need speed, and the way to get that is TBitmap->ScanLine[y]. This gives a pointer to the entire scanline of the bitmap image. You're responsible for knowing how many bits to a pixel, and for properly setting the PixelFormat property, but getting at the pixels this way is several times faster than the Pixels[x][y] array. As proof, it now takes only 15 seconds for my game to load all of its images. Disk I/O my ass.

My second problem was that my game looked less like an interactive program and more like a slide show on my friend's speedy laptop. I figured part of the problem was that it was a debug build, so the machine code wasn't heavily optimized. Even so, it just seemed slower than it should have been, and I was puzzled.

Intuitively I've always thought that simply copying a block of pixels to the back buffer (blitting) is one of the fastest ways to draw anything on a computer. I mean, we're talking very simple instructions operating on contiguous data. Lightning fast. This assumption led me to build my graphics engine around the heavy use of blits, with textured polygons used only for images that needed transparency or rotation. I mean, a textured polygon should take longer to draw, right? You've got vertices, PLUS the pixels that need to be applied to the polygon, all of which are eventually drawn to the back buffer.

Rendering polygons seems like it would take more steps, but I'm here to tell you they're faster than blitting. I switched from heavy use of CopyRects on the back buffer to rendering quads (triangle strips) with the exact same texture that I had been blitting, and the speedup was dramatic. I got several million cycles per frame back just by making this change. All of a sudden my game runs reasonably smooth on a 500 Mhz machine, and would run like crazy on my friend's laptop.

 

Happy coding,

Jon

 

The blank canvas. Or why I looked forward to doing my taxes this year.
March 28th, 2010

To those of you who look at the image to the left and see the light cycle grid from the movie TRON, consider yourself lucky. I see my case of artist's block. While Sark and Flynn will never be battling it out on my screen, I will be fighting for some amount of creativity as I stare into the gray abyss above which the grid is suspended.

This is the 3D artist's equivalent of the blank canvas. A painter I know once told me that the blank canvas is the toughest barrier to overcome. As soon as you paint your first stroke you're working towards something. Your work becomes tangible, and you're making progress. Until then, your brain just sits there in creative mode, trying to come up with the image worthy of that canvas.

As February and March (or the art months, as I've been calling them) go rushing by, I'm faced with the blank canvas on a daily basis. On my best days I have an idea of what I need: a sword, a boat, a city with a castle, etc. On my worst days, I have a design spec: 4 more cargo items of a non-specific nature.

This is why, as I was trying to crank out more images last weekend, I was overjoyed when I realized that I still hadn't done my 2009 taxes. My weekend was to be filled with my choice of compromises: if the blank canvas represents artistic freedom and the hard work that goes with it, taxes represent the sweet lack of responsibility that comes from being told how to do EVERYTHING.

No longer was I faced with the daunting task of trying to decide whether special game item number 20 would be a cannon or a wine flask. My decisions on this day would be simple: to which political party, if any, would I like $5 to go? Would I like to donate to the Minnesota Wildlife fund? (choosing yes will increase my amount owed or decrease my refund).

That's it. Nothing else is open to any measure of creativity. I put my name in the right spot, and the rest is the bliss of following some of the most thorough instructions on the planet. After months of gripping the reins so tightly that my hands are bleeding, it's nice to let someone else steer for a while.

 

Happy rendering,

Jon

 

Learning how wrong I was about art scheduling.
February 19th, 2010

Maya Tavern Interior
Maya Merchant Ship

I gave myself two months to get the art done on my first video game. I figured at most it would take two and a half months, and I'd make up the extra time by subtracting two weeks from my audio schedule. Well, when the explosions in my game sound like me hitting my computer microphone against my desk, you'll know why.

Holy cow does art take a long time! To your left you can see a tavern scene and a merchant ship model I'll be using in my game, each of which took me over five hours to complete. I'm a little rusty with Maya, so I expect that eventually I'll get faster, but five hours? It's a boat, for crying out loud.

Even in my slower-than-usual state this is taking longer than I anticipated. I'm using the tavern interior for several images, so I'll get repeated use from it, but it's not like all 60 of the large images on my schedule occur within the tavern. Unless... maybe there's a market for a 2D strategy game that takes place entirely inside a tavern.

Assuming "Tavern Slide Show - The Video Game" doesn't take off, plan B still involves a lot more art production. In order to get this done on time, I'm going to have to turn the obsession knob down a bit. My background in Maya consists of building reasonably detailed scenes and rendering fairly large images. With large images, the little things really matter: the depth of your bump maps, the brightness of your specular highlights, the resolution of your textures.

With a video game at the resolution I'm using (1024 x 768) the details don't matter as much. With images that might have a resolution of 200 x 150, like the tavern images, insignificant details will get lost. For instance, I actually came up with labels for some of the wine bottles on the back shelves of the tavern. They've got graphics and text and everything. The thing is, at 200 x 150, the label will only occupy a 10 x 5 pixel square, assuming it isn't obscured entirely by the objects I'll be placing on the bar in the foreground. The text will be illegible at that resolution. Really, I should have just used several different colored rectangles as textures and saved myself the time, but I had my big-scene high-resolution hat on, when I should have been wearing my video-game low-resolution hat.

It's going to be tough to keep these things in mind as I continue, because I really do love the detail work involved in getting a scene to look great. I've decided I'm going to stay on task by reminding myself how bad my game will be if my cannon sound is me going "Pew! Pew! Pew!" into the microphone.

 

Happy rendering,

Jon

 

 

Up In The Air does for singles what Pretty Woman failed to do for aspiring prostitutes.
January 31st , 2010

I don't have a problem with the movie Pretty Woman as a whole. I mean, you throw two reasonably talented, attractive actors together who have good chemistry and you're going to end up with a decent film. I have, however, always had trouble suspending my disbelief when watching this movie.

First there's the life of Julia Robert's hooker. When I picture the life of an actual prostitute, I picture something more like the third part of The Butterfly Effect than anything happening in this film. Still, I bet women were leaving this movie thinking that a typical trick will net you several thousand dollars, that your John will be super hot, that he will have the penthouse at the Regent Beverly Wilshire, that he'll let you stay there as long as you like, and that he'll be a real nice guy who just has daddy issues. Yeah, that's why he can't get laid.

Which leads me to my second problem with the movie. Richard Gere is a great-looking guy, and in this movie he plays a man who is loaded. They expect me to believe that this man has to pay someone to hang around with him and occasionally have sex with him? A quick search on "Tiger Woods" proves what we've sort of suspected all along: good-looking guys with millions of dollars don't have to pay to have sex with hot women.

This is typical Hollywood fare, and I know what I'm getting into every time I watch this movie. Sometimes, though, I wish someone would have the balls to tell it like it is. Don't romanticize it or demonize it. Just show it.

This is trickier in Hollywood, because it's a lot easier to make hooker-with-a-heart-of-gold interesting than it is to make ordinary-people-doing-ordinary-things interesting. What the history of the romantic comedy has shown is that you can take the dumbest story known to man and, if you romanticize it enough, people will still enjoy it. Unfortunately the converse is also true: if you're not going to distort anything, you'd better have a really interesting story.

Enter Up In The Air, which has to be one of my favorite films of 2009. It's a movie about a man who has lived a connection-free existence (connection-lite might be a better description). He starts wondering if this is all there is, or if life might be more fulfilling if he tried to create and maintain connections with people that are more than occasional or fleeting. At first I thought, "Oh shit. This is going to be About A Boy all over again."

I loved About A Boy, but the ending sort of left me cold. The supposed lesson was that having these people in Will's life was an improvement over the solitary existence that preceded it, but it's so romanticized that the audience never bothers to ask why Will didn't seek out these relationships sooner. I'll tell you why: Toni Collette's character was a whiney suicidal mess who blames her problems on everyone else, her ex-husband was a pretentious bore, and her friend was an enabling simpleton. If you offered me a choice between an ongoing friendship with those three people and Will's Bang & Olufsen CD changer, I'd be listening to music right now.

The magic of Up In The Air is the removal of all romanticism. The single people aren't shown as society's lepers, and the married people aren't shown as perpetually happy. The married people have seriously hard times, being single isn't as cool as it seems, and neither of these facts requires much commentary, because real life rarely does.

If I'm going to convince an audience full of women that being a hooker is awesome, I'll have to jump through several logical hoops to get there. However, if I'm going to convince single people that being single is hard, all I have to do is show them a single person looking for a real connection. If I'm going to convince a single person that it's okay that they're single, all I have to do is strip the romance from the typical depiction of coupling and marriage, so they see the reality that married people see.

If I'm going to convince everyone that neither side has it as good or as bad as the other side thinks, that both have their highs and lows but that Hollywood rarely depicts either accurately, and that striving for an ideal without examining the legitimacy of that ideal is problematic at best, all I have to do is show them Up In The Air.

 

Happy coding,

Jon