Monday, October 29, 2012

The closer you get...

Modern computer games are a very impressive set of things. A lot of them have deliberately overcomplicated character designs, just so that they can show off that they've managed to make clothing that acts like textile, hair that looks at least believable, and so on. That's on the physics simulation side of things, but it wouldn't mean much without improvements on the graphics side of things - and while a lot of that is done right, some of it is done very badly.

The trouble is, computer games don't ever really get close up with cloth. The closest you'll get the camera is about three feet away, and from there only the most pronounced surface details will be necessary to render. A chunkily cabled sweater, for example, would benefit from the trick of bump mapping. Bump mapping is a clever means of faking extra detail; it involves making two versions of the 3-d model. One version is in stupendously high detail, and you spend hours calculating just how the light will reflect off it so you know what the surface detail does to the shadows on it. The other version is the low-detail version you'll use in the game; that, you colour in, and then you overlay the shadows you pre-calculated with the detailed model. The result is a model that's computationally cheap to render, but looks incredibly detailed; and that's what you want to keep gamers happy. Gamers demand pretty worlds, and they demand no problems with frame rate; these two demands are in opposition, since the prettier a world or an object is, the more oomph it takes to render it.

The trouble is, art sensibilities haven't yet caught up to the fact that you don't always need to use this trick. In some situations, a bump map can make things look worse. Two games that run into this are Just Cause 2 and XCOM: Enemy Unknown. In Just Cause 2, one of the notable NPCs is always shown in a suit, with a ridiculous bump map. It looks as though the suit was woven from garden twine. While tropical suiting is not generally as smooth as temperate suiting, it's by no means that rough! In XCOM, the problem is worse; one NPC in a labcoat has similarly overdone bump-mapping, while the NPC in a ribbed military sweater (the proper green wooly pully that so many British country people love for its durability and insulation) appears to have no bump mapping, even though it would be appropriate.

It's a shame we're in this hole at the moment. Most modern games are either close enough to allow suspension of disbelief, or stylised enough to not demand it; but we seem to be in the uncanny valley of clothes right now.

Monday, October 22, 2012

Further apologies...

Yup, once again, no new big post. On the plus side, we're getting everything straightened out, we've got the important mail coming here (although how remiss the post office is being at forwarding the previous residen't mail has us somewhat concerned) and the cats definitely feel like it's home.

The weather's been annoying, shifting between rain and shine annoyingly, and our air conditioner isn't wonderful. However, we're on a ridge and so we can get a good breeze going by opening windows. We're also in an end unit, which means side windows.

Monday, October 15, 2012

You've probably noticed...

Sorry, folks, no new post this week. The LA and I were moving, and it took a while for us to get internet back.

On the plus side, we bought this house. No more renting.

Monday, October 8, 2012

Why don't we have a moonbase?

Humanity has sent people to the moon and brought them back safe. This is a hell of an achievement, but it would pale in comparison to sending them to the moon and keeping them there. The trouble is, we're not using technology that can do that. We've gotten locked in by the related phenomena of local maxima and path dependence.

Local maximum is what you have when you're on a hilly landscape. There are lots of peaks, some higher, some lower. Any given point from which every direction is downhill is a local maximum, but there's only one global maximum in the given area.

Path dependence is what happens when you start using and developing a technology. We've done astounding things with the internal combustion engine; Otto and Diesel would barely recognise the marvels we have now, despite their using the same thermodynamic cycles and the same basic principles of operation. The trouble is, we're now at a point where the internal combustion engine is holding our technological development back; we could do great things, but we're tied emotionally and technologically to this bulky, heavy, smelly, inefficient contraption. Worse, our reliance on it has slowed development of other motors; modern electric motors are not far removed from the original designs by Tesla. We got locked into the path of improving the internal combustion engine, which path has now peaked; and at a local maximum.

The same thing has happened with space travel. When we first got interested in it, rockets were the easiest thing to try; and we got very, very good at rockets. The trouble is, rockets have abysmal payloads for the long haul, and they have vast amounts of waste in their construction; most of the Saturn V that took men to the moon was simply there to get them through the atmosphere. It took an incredibly heavy lift capacity to get three men to lunar orbit. We simply can't send up enough to make a moonbase viable that way. Rockets have reached their peak, and every other technology will require a step back down; something we're unwilling to take.

So we don't have a moonbase because we're an annoying combination of stubborn and idle. We don't want to take the time to develop technologies that can go further than rockets, because they won't be able to go further than rockets immediately we introduce them.

It wasn't always like this. The first guns for soldiers were far inferior to bows in utility; but we stuck with them, and now almost nobody would think of using a bow for war. We need to reignite excitement at potential, rather than pride in achievement.

Monday, October 1, 2012

Your car is probably lying to you.

Most cars have an array of gauges in front of the driver. There's always a means of indicating road speed, and usually a gauge for fuel level. What else there is varies depending on the target market, but nowadays a tachometer to show engine speed and a temperature gauge to show if the engine's overheating are normal.

Most of these gauges are fully functional, but one, the temperature gauge, tends nowadays to be a skeuomorph. It's not technically a temperature gauge (which in automotive terms is actually a suitably calibrated ohmmeter, reporting the varying resistance of a bit of wire that is the temperature sensor), but a multi-state indicator. This is called compensation, and it's annoying to me.

The major reason for compensation is to avoid worrying inexperienced drivers. When first sitting at the controls of a car, one sees this apparently huge panel of dials, very few of which are all that obvious in function. To avoid overwhelming the novice, much of what used to be handled by dials (oil pressure, electrical system health, and so on) has been relegated to a row of go/nogo "idiot lights". The temperature gauge was a candidate for this, but it turned out not to be a good idea; there is still a need for more granularity than a simple light can provide. However, by filtering the signal fed to the gauge itself, the needle can be held rock-steady.

Why is the filtering needed for a steady needle? Because engine temperature is affected by multiple factors working to both increase and decrease it. Demand more power, and the extra fuel will result in more heat energy going into the engine; it heats up. The thermostat opens, and it cools down; the electrically driven fan comes on, and it cools down further, closing the thermostat. Heat begins to build again. And so it goes, with the temperature confined to a surprisingly narrow range so long as everything's working as it should. If the filtering weren't there, the needle would move around, and an experienced driver would be able to see when the thermostat's opened, and so on. This would be useful should something in the complex chain of equipment stop working, since it would be reflected in the gauge's reading, making figuring out what's broken easier.

However, a nervous driver will be distracted by this wavering needle, wondering, not unnaturally, what they're doing wrong; and making the needle stay still is easier than explaining that "it's meant to do that". So in goes the filtering circuit, and the needle now has five positions. When the engine's cold, it's just off the stop, since it has to indicate that the engine is running (despite the tachometer; it's expected that a gauge will be "live" when the engine is running, so even if a cold engine should have the needle sitting on the stop, it's moved up); when the engine's warm, but not to full operating temperature, it'll be between there and the middle. When the engine's in normal operating range, the temperature needle will be rock-steady at the middle of its travel, since there's a strong mental association between "the middle" and "where it should be". Then there are "moderate overheat" and "severe overheat" positions, although the severe overheat will usually be heralded by a cloud of evaporating coolant and a cessation of drive.

But you're not seeing what the engine temperature actually is. Instead, you're seeing that it's within what the designers of the circuit deemed acceptable. This doesn't just make troubleshooting harder; it introduces another thing which can fail. The small circuit board that handles this for Volvo 240s is notorious for failing, and it's normal for enthusiastic owners to simply remove the board and substitute a short wire which restores the temperature gauge to being an actual gauge, rather than an indicator. Most vehicles built after the later 1980s will tend to have some degree of compensation in their temperature gauge; so unless you're driving a classic, it's probably lying to you about the engine temperature.

I'm not a fan of skeuomorphs in general. I much prefer that an interface be designed from the ground up for the device it's to be used on; skeuomorphs hinder accessibility and force compromises which lead to less powerful interfaces. It could be argued that skeumorphic design leads to less usable interfaces as clutter and non-functional elements accumulate.

Monday, September 24, 2012

You are a sheep to them: corporate cultures and you

In the modern world, we've no choice but to be customers of large corporations. Even indirectly, we're affected by their attitudes towards us. That makes it a great shame that their attitudes are generally so unpleasant.

This grew from a discussion on Twitter of "moon money", the various unreal currencies games companies like us to use. Call them Nintendo Points, Microsoft Points, what you will, they're a layer of obfuscation between your money and the things you buy with that money. Sometimes, they can be bypassed; but more often, your only choice is to pay in moon money or not at all.

Part of their purpose is to allow the companies to report income sooner. Once you've bought your moon money, you're now out the real world cost of however much moon money you bought; the company issuing the moon money has the real money now, instead of however much later it is when you finally finish buying "things" (generally intangible things, mere data) to the value of the moon money you bought. They got your money as a lump sum up front, not in the dribs and drabs it would have come in had they let you pay real money; because a common feature of moon money is that it may only be bought in inconveniently large chunks. Part of this is to avoid proportionately large charges for processing small credit card transactions, but a secondary benefit for the issuing company is the decoupling of moonbucks from real money. The real money is gone, and so spending moonbucks feels like getting something for free. A further aid to this is the common oddball exchange rate; Microsoft points exchange at a rate of $10 for 800 points, which is inconvenient to remember, while being close enough that people can be tricked into assuming that the exchange rate is one point per US cent.

On the face of it, these practices seem abusive to the customer; I believe they are, but they stem naturally from the corporate culture. Any publically traded company has a duty to its shareholders to maximise profit in the short term, which will result in abuse. Consider the customer as a mature sheep; you can look after this sheep, shearing it for wool each year, taking milk (but not too much!), and gain a long term advantage of woolen clothes, healthy family from good nutrition, and so on; the farmers' way. Or, you can sweep in, take the sheep, slaughter it, and you'll get a nice sheepskin rug, some very large mutton dinners, and overall a short-term windfall; the raiders' way. The difference is that the farmers' way results in you still having a sheep all along, but gives less reward at any given time.

So the requirement to maximise instantaneous reward is what has killed any consideration for customer loyalty. There will "always" be more sheep; so slaughter them, carpet the world in sheepskin rugs, and get fat on your mutton dinners. Privately owned companies can afford to take a longer view; after twenty years, the farmers will have a lot of sheep, because well-cared-for sheep increase in number, while the raiders will have slaughtered enough sheep (in this analogy, annoyed enough people to the point of boycott) that sheep will be getting thin on the ground. Short-term thinking is not generally sustainable.

One games company which appears to be a farmer is Valve. I've said many nice things about them, but the most telling example is their system of moon money. Yes, it's still moon money; but it's denominated in dollars and cents, as if it's real money; and it's available in flexible amounts, subject to a $5 minimum purchase. You want $13.74 in Valve moon money? Go right ahead and buy it. It'll cost you $13.74, and you won't have to round up and have the $1.26 from going to $15 hanging around. But if you do round up, any leftovers can be applied as a discount to anything you buy via Steam; the one time I used Valve's moon money, I ended up with $0.02 left over, and that was knocked off my next Steam purchase automatically. Valve go to pains to make sure their moon money behaves as much like real money as possible, because they'd rather sacrifice short-term gains in favour of keeping you coming back for a long time. They can do this because they're a private company; there aren't shareholders to placate with short-term growth. They can think long-term.

Any time you're asked to exchange real money for tokens, think carefully. The entity asking you to do that is aiming to make you stop thinking of your money as money, because they want to keep your money. Casinos; arcades; points for online purchases. The root desire is to get you to stop seeing it as money.

Monday, September 17, 2012

The controls are wrong: why ported games are hard.

It's usual, these days, for videogames to be released on multiple platforms. There are plenty of good reasons to do this; for one, the difficulty of hooking up consoles to a TV goes up exponentially as you add more consoles (as I should know, having at one point attempted to have eight different wossnames hooked up to one TV, and needing multiple switchboxes to do it since the US lacks SCART and its ability to Just Work) and so most people of normal sanity will tend to buy one console and stick with it. Then there are the people who don't really have consoles; the LA and I have a Wii, which initially stomped all over the PlayStation 3 and xbox 360 in sales, but which is now mostly passed over for high-profile games releases because things can't be made quite as pretty on it as they can on Sony's and Microsoft's offerings. So to get at all the potential sales, a smart developer and publisher will release on as many platforms as possible.

And therein lies the problem. Control schemes are inevitably going to be different. The Wii has its own issues with controlling the games, and generally Wii releases aren't straightforward ports; but PS3 and xbox releases will often be the exact same code, compiled for two different platforms. The controllers for these consoles are very similar; designed to sit in both hands, with four buttons and a joystick for each thumb to waggle about, and four more buttons in trigger-like positions. Some details are different, such as where the joysticks are, or whether they actually fit human hands or are designed for tiny elves, but that's the basics; twelve buttons and two joysticks. The joysticks can also be pressed on to make two more buttons, and there are a couple more buttons used for system access, overriding the game.

You can make certain assumptions with controllers. The fact that you have two guaranteed analogue input devices means you can get fancy with driving controls, and have somewhat realistic speed sensitivity in your steering; wallop the stick hard over at speed, and you'll spin out spectacularly. And so on. The four buttons under the right thumb make a very easy reflex test, known as a quick-time event; remember Simon? A lot of games nowadays use that for "react fast" challenges such as disarming bombs.

And these control assumptions fall apart when confronted with the harsh reality of PC gaming. A keyboard and mouse make for far different control inputs. For one thing, you only have one analogue input, and it's a pointing device rather than a steering device. There's typically a direct mapping between how far the mouse is moved and how far the pointer moves; flicking the mouse will move it fast, moving the mouse slowly will turn it slower. A joystick, by contrast, varies the speed of the pointer based on how far it's pushed over; accurate pointing is much more difficult. The different control methods here are a big impact. A recent high-profile problem caused by this was discovered in id Software's tech-demo Rage; on consoles, everything looked gorgeous, all the time, while on far more powerful PCs, at the same resolution, turning around too fast would result in the player seeing a blurry mass of foot-wide pixels for a short while until the game could get the proper gorgeousness on screen. The fundamental problem was the difference between a pointing device and a steering device; consoles didn't allow the player to turn faster than the game could get the right data.

And then there's the problem of car controls in driving games. Remember the speed-sensitive steering I mentioned earlier? One of the PC games I play has that, and it's a disaster trying to drive in a straight line at high speed. The reason is, the mouse is needed for camera control, and so the steering is delegated to the keyboard. Keys have two states: on or off. This means that the steering is either straight ahead, or at full lock. This has led to my typical method of cornering in that game being to bail out of the car by opening a parachute, which gives me enough time to see a car going in the right direction and steal that one. It's far quicker than slowing down to the point at which I can avoid spinning out, and cheaper than buying a gamepad. Another console port game has a much less speed-sensitive steering mechanism; I typically turn corners in that one, although the keyboard turns them from a dexterity challenge to a timing puzzle (hit the keys with the right timing to flick the car through 90 degrees, and punch the go pedal at the right moment, as opposed to judging how hard to shove the stick)

Similar difficulties prevail going the other way, rare as that is nowadays; the consoles being where the money is, they're likely to be the primary market. I've attempted to play ports from PC to console, and they're generally clunky and awkward at best.

As long as the control assumptions remain as they are, porting in either direction will remain a problem. Input handling is one of the hardest things to get right in making a game.