Archive for November, 2008

I Have Good Reason

Posted in Wednesday Update with tags , , on November 20, 2008 by Dan Amerson

We had guests on site at Emergent yesterday, so I didn’t get to my Wednesday update. It’s coming a day late, and I’m not too upset at the delay. I’m being reasonably consistent. For today:

  • Lolcats
  • Used Game Markets
  • Texture Atlas Creation
  • Vacation Next Week

They Have Gone Too Far

A colleague sent this link to me. I’m not sure I really need to add any comments on the matter.

Monopolies Bad

There has been a bunch of discussion within Emergent about the used game market and whether it’s good or bad for the industry. I figured I’d post my stance just to help stir up a bit of controversy.

  • I’m in favor of a used game market.
  • I’m not happy with the current state of things where Gamestop has an effective monopoly. I want another national chain to enter the market and drive down the margins.
  • I think it’s great to do things like the Gears of War 2 map pack that add value to a new copy but still give used purchasers a secondary avenue for obtaining that extra value.
  • I find suggestions that games be sold crippled unless you buy them new deplorable. e.g., I don’t agree with Nintendo’s decision to not sell the Wii Speak Channel at all.

I think the most important point in my stance is the fact that there’s currently a monopoly in used games. Right now, the margin on used sales for Gamestop is huge, and that leads them to push used sales. If they had competition that drove that margin down, the market should center on a point where the margin for new and used sales is equivalent which would give us better liquidity in the market and no reason for a retailer to push used sales any harder than new.

[Edit: Joel points out that the Gears 2 maps are not being offered as DLC. Even so, I still like the practice since the maps are additive and not part of the core experience.]

Pack Them Tightly

An old colleague pinged me today asking if I knew of any available texture atlas creation code off the top of my head. I didn’t, so we spent a few minutes coming up with a simple algorithm that isn’t necessarily optimal but works and isn’t hard to implement.

  1. Sort your textures by size.
  2. For each texture decreasing by size, try to insert into your atlas.
  3. For the insertion.
    1. Describe the atlas as a quad tree.
    2. Initially, you have only one node representing the size of the atlas.
    3. As you insert a texture, you create a split that creates three empty cells and one occupied cell.
    4. Each insertion scans the tree and inserts a texture into the atlas into the smallest cell which will contain the texture.
  4. Algorithm is done when your smallest texture left won’t fit. Start a new atlas.

It’s not an optimal algorithm, but for textures close to square, it should give reasonable results with simple code. My question to you, dear readers, is whether you know of a better way possibly with code snippets online. I’m sure it would be appreciated.

Chilling

I’m headed off on vacation next week. I’ll have my laptop, but the odds of a post are lower. Wednesday update will be back the first week of December.

Starburst rule. I like strawberry the best. dba.

Advertisements

Older, Not Wiser

Posted in Wednesday Update with tags , , on November 12, 2008 by Dan Amerson

The blog has not had a ton of love, so I’ve decided to set myself a regular time to update things, Wednesday. Wednesday updates are likely to be heavier on game development topics, but at least they may be more frequent.

Today’s topics:

  • I’m 30.
  • Gamebryo 2.6 Released
  • Microsoft Visited
  • Compiler Warnings

Birthday, Birthday, Time for Fun

I turned 30 which somehow seems heavier than turning 29 even though the marginal deterioration is probably the same. In any case, we had a big beer around the world party. I drank too much hence the “not wiser” part of the post title. I paid for Saturday night well into Sunday afternoon.

Gamebryo 2.6 Released

Gamebryo 2.6 was released over the last two weeks. I was remiss in not announcing things when we actually went gold, so I’ll catch up now. Exciting new stuff includes:

  • Fully productized versions of our D3D10 and Wii renderers.
    • D3D10 was previously a developer preview, but we’ve done more optimization, added stream out support, and other enhancements.
    • Wii has been available as an overlay for 2.3, but we’ve added it to the product officially. This is pretty exciting stuff as we’ll be keeping it up to date moving forward.
  • Improvements to terrain.
    • Support for new distribution masks on shader-based platforms.
    • Support for terrain on Wii.
    • Additional authoring tools.
  • Refactored animation system.
    • Massive memory reductions for scenes with cloned characters.
    • Significantly faster on current hardware.
  • Enhancements to SceneDesigner
    • Support for layers.
    • Support for prefabs that combine multiple NIFs
    • Enchanced tagging, filtering, and selection.

There’s more, but I don’t want this to be too much like a press release. We’re really excited, and there’s a ton of new features for developers to us.

Tiding from MS

Our account manager at Microsoft, Tracey Frankcom, came to visit. She’s great, and she brought along some other folks from Microsoft to share insight into Xbox Live, 360 development, and DX11. Alas, I can’t share too much of that here. One thing I was going to share, however, was the SAL features of Visual Studio that they mentioned. This technology has been around for a bit, but this was the first time I talked about it in depth with anyone. Here’s a quick link.

SAL stands for standard annotation language, and it’s a way to tag interfaces with additional information that’s not available just from function declarations. For example, SAL can indicate that one parameter is a pointer to a buffer and that it’s size is specified by a second paramter. Obviously, this is pretty interesting information. When used in conjunction with the /analyze switch in their team studio editions of the compiler, these annotations allow static code analysis to more easily detect security issues and bugs. It seems pretty cool, and I’m hoping to play with it soon.

Compiler Warnings

It’s sort of a compiler warning week, I guess. Anyway, I noticed over here at .mischief.mayhem.soap that there’s actually a /Wall for Visual Studio. It’s not in the UI, but you can turn it on for some extra warnings. Most are not useful, but a few are. Here’s the full list which I’ll admit to not having fully parsed yet due to time.

  • C4820 – Maciej is not a fan, but I like to turn this on from time to time to make sure frequently used types aren’t burning memory. I’m a bit neurotic about struct packing.
  • C4263 – This isn’t always an error; I’ve actually put it to use in Gamebryo with sufficient documentation. However, it can be an indicator of a problem.
  • C4265 – I’m as puzzled as he is that this one is off. While one could have a virtual function in a non-base class, I’m not entirely sure why.

Anyway, fun stuff to play with. I’m out.

If the stars align, I’ll actually do this again next week. dba