Monday, March 28, 2011

GDC slides, how do they work?

[update: (versions of) (most of) these talks are now online!]

tomaswoj writes, "I would love to see the presentation you gave on NDK/C++ in Android on GDC2011. You've mentioned that it will be up for d/l at some point of time. GDC already shares lots of this year presentations in their 'free' section, but yours is not among them. Does it mean, it will be in the pay area only? Or just overlooked? "

So, here's the deal. Back in a more innocent time of my life (late February), I was under the impression that it would be fairly easy to get slides posted online. I thought it would be about as easy as getting them OK'd for GDC in the first place--a little tedious, but not that hard. Hah. I was wrong.

First and foremost, game developer relations deals with multiple product teams, each of which has their own PR org. We have to make sure that each team is ok with what we're saying about their product. And in the case of posting slides online, we need to be sure that nothing can be taken out of context, because we don't have the luxury of explaining them or doing Q&A. So Chrome, App Engine, YouTube, and Android all need to be cool with not just the slides, but with all of the many uses and misuses they might suffer as they get passed around on the web.

Most of the product teams have signed off or requested small changes. But Android is different, and this is why the answer to @tomaswoj is not going to make him (or me) happy. See, Android is not a Google product in the way that Chrome or Gmail is a Google product. Android is a product of the Open Handset Alliance, which is an industry consortium involving many, many companies--carriers, hardware manufacturers, and so on. It's true that Google has an important role in the Android ecosystem, but it's not a lone wolf. The challenges of balancing the needs of all of the OHA's members make Android PR extra careful.

All of which boils down to one sad fact: Android's policy, which I learned after the fact, is to release slides only if they are accompanied by video. And we did not have budget for video at Moscone. (It's a union shop--we couldn't just handycam it ourselves.)

So, what's going to happen to those slides? Well, there is one possibility that I'm exploring. The developer relations team does have a budget for video production at Google I/O, which is happening in May. It turns out that many of the presentations my team is giving at I/O are very similar to the ones we gave at GDC. (One might even say we were recycling the material. I would respond, waste not, want not.) So there's a reasonably good chance that we can post the material online after I/O.

Does this suck? Yes. I learned a sad lesson this month. I'm very sorry that others--our excellent speakers and the developers who need this material--have to suffer for my sins. We'll do what we can to make the material available in some way, as soon as we can. But I can't make any promises about the NDK talk or any other Android material.

Thursday, March 24, 2011

Handedness! Argh!

This week I started hacking on Unity, because all the cool kids are doing it. I wanted to see what all the fuss was about. So far I'm pretty impressed. I like the component-oriented architecture, which is something I've been lazily experimenting with since I left Offset Software eighteen months ago. One of the frustrating things about Offset (and many other engines) is the monolithic entity model: every entity has physics, audio, etc., whether it's needed or not. In Unity every entity starts out empty and you add components as necessary. I don't know much about the underlying code in Unity, so I don't know how far down the component-oriented thing goes, but it seems pretty promising so far.

I also got a copy of Maya, because I was sick of trying to learn Blender and we ended up with an extra copy at work. W00t! So now I can kick it like a real artist. (If only I were a real artist. So far I've been able to create a bad copy of the ship from Elite, and that's about it.) And best of all, Unity imports Maya files directly. No exporter FTW!!!.....

...and that's where the problems began. Because Maya is all about right-handed coordinates, and Unity is resolutely left-handed. And neither product seems to offer any feature that would fix this. Maya has a left-handed tangent space option, but nothing for actual world space. I can flip my models 180° in Maya (this works because they're symmetrical around Z), but that doesn't actually change the vertices in Unity--it just adds a 180° rotation to the model's transform. Which is useless, because that's the world transform--there's no "import space to model space" node that I can find. Useful things like the Unity follow-cam use that transform to figure out which way the model is pointed. This led to hilarity as I tried multiple ways of rotating the model in Maya, only to find that no matter how I rotated it, and no matter what orientation the model appeared to have in my Unity scene, the follow-cam always floated around to the exact same spot right in front of my little spaceship. (In case you're new to this, let me emphasize that the follow-cam is supposed to always be in back of what it's following.)

I guess the right thing to do is probably to parent the model under some other game object, and let the parent-to-child transform take care of the handedness switch. (I still need to figure out how to load a Unity transform with a matrix that inverts Z, because doing a 180 around Y isn't going to cut it forever.) But it still chafes me that neither Maya nor Unity has a simple way to invert Z. This seems like the kind of problem that would crop up fairly frequently.

Maybe someone reading this knows how to fix the handedness mismatch between Maya and Unity in a clean way?

Saturday, March 19, 2011

So close but yet so far...

So WinGDB has a beta up of their "mobile edition," which is light years beyond the hacktastic preview I wrote about a couple of months ago. I installed it today and wow. This is what Android hacking on VS was meant to be. You can create projects via the normal new project dialog, you can start debugging with the normal play button, and all of the random settings and junk that we had to deal with before are gone.

What's really scary-cool is that they're actually working within the NDK make system. The project file is not a .vcproj or an MSBuild file, it is You add a file to the project via Visual Studio, and that's where it lands. That means they have completely rewritten the storage part of the Visual Studio project system, which is kind of a big deal. I'm not sure if I agree 100% with the design (I'm actually kind of a fan of MSBuild, at least for Visual Studio stuff)*, but I have to respect that kind of work.

Only problem is, right now it doesn't work! Not on my computer, anyway. It does what looks like a full and successful build, but then tells me that the build failed and refuses to launch the debugger. I turned diagnostics up to 11, but I can't find anything that even looks like a failure in my build log. Building from the command line via ndk-build works fine. But no luck getting Visual Studio to act like all is well. I'll ping the WinGDB guys, of course. I'd be interested to know if anyone reading this can get this to work. I must be doing something wrong, but I've tried this with both the NDK samples and a scratch project, and I'm not having any luck.

Well, it's probably for the best. I'd promised myself this would be the weekend that I finally learned how to use Unity. So I'll get onto that. Leave a comment if you get the WinGDB beta working better than I did...

Weekend Blogging: a recipe hack

Three weeks ago I made a soup with Lagunitas GnarlyWine that was so astonishingly not vile that I wanted to share the recipe. Of course, I promptly forgot it--probably because the GnarlyWine was accompanied by a half liter of Hop Stoopid, which did not go into the soup. (Neither did half the GnarlyWine, come to think of it.) So I have no recipe to remember that weekend by. In fact, I have very little memory of that weekend in general, except for a recollection of Hop Stoopid being one of the most awesome beers I've ever had.

So this weekend I'm writing down what I remember of my most recent experiment. Alcohol was not involved--quite the opposite, in fact. I wanted to make Beef Burgundy in our new automatic pressure cooker. But, the wife is pregnant, and pouring an entire bottle of wine into her beef stew sounded like a bad idea. Even if most of the alcohol did cook out, she'd kill me--she's very, very careful of our baby's health.

So how to spice beef stew without wine? I stumbled upon what turned out to be an amazing mix: onion powder, balsamic vinegar, white truffle oil, and just a bit of cheap-ass Costco brown gravy mix. Oh, and some McCormick garlic Season-All, probably because I use so much of it that nothing tastes right without it. Here's the recipe I ended up with (all measurements are approximate):

16 oz ribeye steak, cubed
1 lb bag frozen peas & carrots
3 red potatos, also cubed
1 tbsp 10 year old balsamic vinegar
1 tbsp white truffle oil
1/2 tbsp onion powder
1/2 tbsp brown gravy mix
1 tsp garlic Season-All
1 tsp basil
1 tsp oregano
1 tbsp extra-virgin olive oil

Combine in pressure cooker, pressure cook for 30 minutes (the auto cooker's "soup" setting) and stir vigorously to break up the potatoes a bit so they thicken the stew. Mwah!

The pressure cooker really is amazing. The meat was so tender. Well, ok, it was USDA choice ribeye, so no real surprise there. But everything was better than it had any right to be after half an hour of cooking. It tasted like it had been slow cooking all day. All the juices and flavors were mixed--even the potatoes were flavorful all the way through. I didn't even want the thing, it was my wife's purchase, but now I'm totally sold.

Oh man, you know what would go awesome with this? A bottle of burgundy. Good thing I'm not pregnant... :-)

Saturday, March 12, 2011

In case you're wondering...

It's been a while since my last update, I know. I caught some kind of flu at GDC that's left me tired and weak. Didn't help that, due to missing our anniversary on Feb. 27, I'd promised my wife to spend Monday on whatever she wanted. That turned out to be moving lots of heavy furniture around to get ready for our baby and for her mom to come stay with us. So on top of the flu I threw my back out.

Anyway, I'm still sick and doing more than answering email is pretty much beyond me at this point. But I do have a beta of WinGDB 2 and I'll hopefully get a chance to try it out before it actually gets released. So stay tuned :-)

Wednesday, March 2, 2011

Another Open Letter

An Open Letter to whomever stole my Motorola Xoom tablet at GDC.

Dear Sir or Madam:
You stole my stuff. You suck.

Unless, of course, you use that Motorola Xoom to create a fantastic app for the Android Market. In which case, good on you and I'm glad you're a little lightfingered.



Tuesday, March 1, 2011

Letter to a Bike Thief

An open letter to whomever stole my bike from the rack at the Moscone Center last night.

Dear Sir or Madam,
First of all, ha ha ha ha ha ha ha. I hope you enjoy your new bike. Especially the way the chain falls off when you downshift. Or the way the right-hand shifter sticks and has to be yanked back with your thumb. Enjoy the slow leaks in both of the tires. And especially enjoy the way you'll have to pump up those leaky tires with two separate bike pumps, because one of the tires has a normal red-blooded American valve, and the other one has one of those elitist European things with the long stem and the little screw gadget on the end. 

Second, let me just be the first to salute what I can only assume to be your giant, brass-cored, steel-belted, chrome-plated set of cojones. That bike was locked up right on Market Street in full view of thousands of convention-goers. Admittedly your average Game Developer Conference attendee isn't the most physically imposing specimen, but still. There's an awful lot of them, and they're going back and forth in that area all day and all night because they're diehard party animals. So bravo, sir or madam, you have got to be swinging a massive pair.

Lastly, I want you to understand just what this means to my life. You didn't just steal a reasonably nice but sensibly priced road bike from me. You took away my mode of transportation. That means I have to buy another bike. And that's five hundred to a thousand dollars that could have gone to pay for so many other things. 

For example, will I now be able to convince my wife to let me buy a new Xbox 360, the new black one with that fancy new camera controller thingy, even though I already have like five 360s sitting in the garage waiting to get their red rings of death fixed? No. And I was this close to talking her into it, too, man. But now that money is bike money. So I will not be playing Dance Central using my body as a controller this month. There will be no evacuating the dance floor for me. I'm going to have to get by with a regular controller and a stupid white Xbox just like I did last month. 

And it's not just the Xbox, either. A bike costs a lot of money. Will I be buying a stack of new games or a bunch of e-books this month? No, that's bike money now. Can I get my 1995 Acura Integra detailed and waxed 'til it shines like the top of the Chrysler building, like I was planning? Gonna have to wait until the bike's paid off. Will I be sipping Champagne and dining on the finest cuisine San Francisco has to offer? Well, yes, because I plan to expense that. But those new shoes that Baby needs? Bike.

Okay, thinking about it, my life is pretty good. You probably need the bike more than I do. After all, I still do have one Xbox that hasn't red-ringed yet, and I've always got my 1995 Acura Integra (last model year before they nerfed the engine control computer!) to fall back on.

So enjoy the bike. You're the one that has to live with being a lousy thief.

GDC: Coming up for air

After 2.5 days of GDC I'm finally coming up for air a bit. It's going really well. Our Google sessions played to a nearly full house, and we've been turning people away from the Android sessions all day long. 

I spoke last night at the Social and Online summit about lessons we learned from Google TV, and again today at the Android dev day on the Android NDK. What do those topics have to do with each other? Nothing. What do I know about either of them? Well... let's just say I had a lot of studying to do. 

I actually co-presented both talks. The main speaker for the Google TV talk was Andrés Ferraté, who has given me two gifts in life: one, a much better understanding of Google TV, and two, the knowledge of how to type an 'é' on the Mac. (Everyone who knows Andrés learns how to type é at some point. It's kind of a thing with him.) Andrés put together the main slides and I stepped in to play the role of "guy who knows console gaming" to talk about how Google TV is not a console. It was a fun talk to give, very fluffy but entertaining. For me, at least.

The talk today was much more technical. I played the role of "guy who will explain the basics of the NDK," which was right in line with the work I've done so far. I talked about the ins and outs of getting started and using the NDK on Windows,  and introduced things that I've been talking about on this blog, like WinGDB and vs-android. Then Dan stepped up to the plate and laid down his unique brand of magic, otherwise known as "knowing pretty much everything there is to know about NDK programming." Go teamwork!

So dev days are over, and I'm relieved. There were some gaffes but overall I'm pleased. Thanks much to everyone who attended!