Saturday, May 19, 2007

PC Gods Angry! PC Gods SMASH!

For the last few weeks, I've been contemplating a PC upgrade - there's been a recent RAM and CPU price drop, and there are a ton of games coming out that I'm dying to play, but that my current PC really isn't up to.

However, I couldn't really justify dropping that much cash, so I decided to buy an Xbox 360 instead. I picked it up on Friday, and had a blast the whole weekend smashing zombies in Dead Rising and playing various demos.

But, of course, I knew my defection would not go unnoticed by the supernatural powers that control the PC Gaming world. So I was not surprised when my wife's PC died on Sunday morning - I could tell by the crusty brown ooze that had leaked out of several capacitors that she was yet another victim of The Bad Cap Scandal.

So at that point, I had a choice - rebuild her PC for a couple of hundred bucks, or give her my PC and build myself a new one. I'm weak, so I decided to build a new PC!

She needed her PC by Tuesday morning, which pretty much eliminated any chance of shopping online, so I headed down to Fry's in Renton, wandered down the aisles filled with Fabulous Products (peppered with loss leaders which were invariably out of stock), weathered the gauntlet of belligerent East African salesmen who didn't actually know anything about the products they were trying to sell me, but were quite willing to say anything I wanted to hear to close the sale, and came home with a pile of merchandise that was invariably priced 20-30% over what I would have paid had I just ordered from NewEgg. Plus a shiny new copy of Vista Home Premium, Upgrade Edition (queue forboding music)

Now, for the fun part - building the PC! So, the first, easy step is to move my PC from my giant case to a smaller case that fits under the Darling Wife's desk. No problem! Um, except it no longer boots. So I reseated all the components, and...it crashes booting into Windows! Several hours later, after swapping components around, etc, I finally figure out that it's some kind of ESCD problem (whatever that is) and putting the components back exactly how they were lets me boot to desktop.

Whew.

Now to do a fresh install of Windows XP on the PC...except Windows XP doesn't support hard drives > 128Gb without SP2, which isn't part of my install disk. So I create a new install disk that includes SP2, and we're off to the races. One down, one to go.

I nervously unpacked all my components from Fry's, including the budget motherboard I picked up because It Was Just So Damned Cheap! put them all in my new PC, plugged everything in, turned on the PC and....everything works. It just boots right up, and starts chugging through the Vista install. Maybe the most painless PC build I've ever done, until...Vista asks me for my product key. No problem, I enter it, figuring it might ask me to insert my Win2K CD (since it's an upgrade CD) or maybe enter my Win2K product key.

Nope. It wants me to run the CD from within my Win2K installation, basically making the "upgrade" CD worthless if you are simultaneously upgrading the hardware (especially since it's incredibly unlikely that Win2K would support my new SATA drive, etc).

Once again, Google and Paul Thurrott came to my rescue - the trick is to install Vista without a product key (which puts it in a 30 day trial mode), then "upgrade" that Vista installation using my install DVD. Voila!

This may be the last home-build I do, though - life is just too damned short to spend hours building PCs anymore.

P.S. Oooh, almost forgot - I mostly play my 360 using headphones, and I got this fun little gadget to help me. It's a tiny, battery-powered amp from penguinamp.com, and it sounds great:


Sunday, May 06, 2007

The web is a fickle mistress

So I've been doing some extracurricular web development work lately, and I figured I'd share what I learned:

1) The internets are filled with lies!

I'd mocked up a site using Ruby on Rails as the backend, and I'd gotten some new assets from our graphic designer to use as menu rollovers. I decided to do a little research to see if there was anything built in to Rails or Scriptaculous to help automate this task, when I came across a "usability" message forum, containing gems like "Don't use images in place of text!" (sure, maybe when the Browser Gods give me more than 3 fonts to work with).

Anyhow, one of the posts on there said something along the lines of "I can't stand it when I see noobs still using Javascript to do their menu rollovers instead of CSS", and I thought "Well, I certainly don't want some random stranger on the internet to think I'm a noob! I'd better check this out!"

Anyhow, the idea as outlined in the forum was to setup your links with a forced width/height in the CSS, and set a background image on them. You can then use the a:hover or a:active CSS elements to specify a different background image when they are rolled over or clicked on.

Brilliant! ...except it doesn't quite work, because some browsers don't gracefully cache background images, so they get loaded from scratch when you rollover them. And even the ones that do cache background images still result in flickering when you rollover the item.

Anyhow, it turns out that there's a workaround that my random forum friend didn't know about - you basically combine all your rollovers into a single image, then use CSS to change the image offset to swap images when you want to display the rollover. It's darned clever, although in the end I think it would've been faster for me to just roll my own Javascript preloader/rollover handler than muck around with all the images.

Of course, when editing the images, I couldn't help but notice that there was some significant artifacting on them, which leads me to:

2) JPEG is a piss-poor format for images with text in them!

Yeah, yeah, I knew this already (it's for photographic images, people!), but that's the format the graphic designer gave them to us in. At first glance they looked acceptable, but the more I looked at them, the more I couldn't stand it. So I had her regenerate the images as PNG, only to discover:

3) PNG has problems also!

So this is probably old news to anyone who has worked with the Macintosh, but the Mac uses a different gamma function than the PC. This means that if you have an RGB value, it'll look lighter on the Mac than it does on the PC - it's built right into the video drivers.

The creators of the PNG format, in their infinite wisdom, thought "hey, this is bad - our images might look different on different systems!" so they decided to put gamma information directly into the PNG file so when viewed with a well-behaved application, the image would look identical on different systems.

Sounds great, huh?

Except the rest of the world (like HTML) doesn't come with customizable gamma functions. So when your PNG file contains gamma information that doesn't match the built-in gamma function for your system, then the colors in the PNG won't match the other colors in your web page, even though they have identical RGB values. This is bad, if you want the background color of your image to match the background-color CSS setting on your page, for example.

Turns out that Photoshop inserts this gamma information automatically, and there's no good way to keep it from doing this. The Mac version of Photoshop inserts gamma information that matches the Mac's gamma function - this means that everything looks perfect on the Mac (which is what most graphics professionals are going to use) but then looks off when viewed on a PC (which is what most web developers and the rest of the world use).

4) The internets will save you!

So of course a few minutes of searching on the internet yielded dozens of solutions, ranging from the inane ("don't use PNG!") to the obscure ("Go into this random File Info dialog in the latest version of Photoshop and delete this random chunk of file information!") to the pragmatic ("Use one of these free utilities to strip out the gamma info!"). I went for the pragmatic option - Ken Silverman (creator of the PNGOUT utility), I owe you a beer, man.

Saturday, April 28, 2007

Good things...

There are many good things in life:

Peggle!
Puzzle Quest. Oh god, yes, Puzzle Quest
My new LCD monitor
Not having a sick baby. The only thing worse than being sick, is being sick *and* having a sick baby. And wife. Yeesh.
Puzzle Quest, again!
Ruby on Rails. It almost makes web development tolerable again.
Coffee.

Of these, I'd have to rank "not having a sick baby" and "coffee" at the top of my April list :)

Wednesday, February 28, 2007

I have had it with these mutherf--g babies on this mutherf--g plane!

So, we took a flight to Chicago for my granny's 90th birthday. Travelling with a 13-month-old was about what you might expect:

The outgoing flight was relatively painless, since we had to wakeup at 5AM and the boy sacked out pretty early and slept through the flight.

The return flight, however, was less fun, and was punctuated by Blake grabbing a fistful of hair from the lady sitting in front of us and refusing to let go, followed by him laughing maniacally and grabbing my Darling Wife's hair while she yelled at him in German.

Luckily Mario came to the rescue, and the boy sat in my lap and quietly watched me play Mario Kart DS for 20 minutes until he fell asleep. Yay, better living through Video Games!

I've promised her that the next time we travel, I'll book a separate seat for Blake, but it's kind of a moot point as there's no way I'm getting on a plane with him again until he's 3.

Wednesday, February 07, 2007

Angry Garden

everyday terror
soaked up
like a seed in an angry garden
until the fear is indistinguishable
from the plant
is the plant

a lifetime of washing
can't remove the welts
and a lifetime of heartfelt apologies
can't put the plant
back in the seed
to grow again

and who would want to, anyway?

so we put on the gloves
and once more
turn to tend our own garden
and hope
that the mistakes we make
are our own

Wednesday, January 17, 2007

Falling off the wagon...

So, it's been about 7 months since I've played WoW. And I'm holding the expansion pack in my hand, ready to take the plunge again.

It's funny - you can't just jump right into an addiction once you've broken free ; you kinda have to sneak up on it. If you are a recovering alcoholic, you don't just say "Fuck it!" one day, grab your keys, and drive to a bar - you have to work yourself up to it, look at it out of the corner of your eye while you rationalize what you are doing.

My approach went like this - I was going out to pick up some lunch, and I figured I'd stop by Office Depot to pick up some things I needed. And, you know, if they were selling the Burning Crusade then maybe I'd buy it. They didn't have it, so I drove on to order my lunch. I had about 15 minutes to burn while I was waiting for my burger, so I figured I'd stroll on over to Barnes & Noble and browse the books there. And, of course, if I should happen to come across the game while I was in there, well, cool, I might pick it up. And naturally they didn't have it either.

Sony Style? Well, I've still got a few minutes, I can look at those HDTVs...nope, no PC software.

Bartell Drugs? We are out of Baby Tylenol, so I'd better go in and pick some up...no software again.

At this point, my food was no doubt getting cold, so I zipped over to pick up my burger. Heading back to my car, I saw it...The Apple Store (tm). They'd probably carry it, and if I recalled correctly, the Mac and PC versions come in the same box.

I don't own a Mac, nor an iPod...hell, I don't even own a turtleneck, so I had no justification for going in there. So all rationalizations were gone now - I was an addict, and I was walking down that dark alley to get my fix, not to take a leak.

"Hi, welcome to the Apple Store! Are you looking for something in particular, or just browsing?" asked the perky clerk.

I muttered something along the lines of "Shut the fuck up and get out of my way, lit major", shoved my way past the dorky Mac-heads looking at the meager Apple software lineup, grabbed my copy, and stomped out.

Now I just have to figure out how I can accidentally install the damn thing.

Saturday, December 30, 2006

Oh, game...

Apparently all these years I've been stifling my inner German - he's an unassuming, efficient little man whose hunger for reams of statistics is equaled only by his thirst for galactic conquest. But he's been set loose.

I've discovered Ogame.

Ogame is a browser based game. No, not one of those inane little flash-based time wasters. This is a Thinking-Man's game. Or, to be precise, a Worry-About-His-Fleet-All-Day-Man's game.

On the surface, it's a traditional 4x space exploration game. From the moment you log in, you are peppered with little pictures of space ships, planets, planetary defenses, etc. But don't let that fool you - this game is really just about numbers: making your numbers as big as you can, and using them to bludgeon poor saps with smaller numbers, at which point you take their numbers and add them to your own. They might as well take down all the space-themed pictures, and replace them with photos of puppies.

The crux of this game is that it operates in real time. You want to research a piece of technology? It'll take 2 or 3 hours, in real time. You want to colonize a new planet? You send your ship off, and when it arrives 14 hours later the planet is yours. The higher you research your "computer" technology, the more stuff you can do in parallel (attack other planets, etc) - there's technology that allows you to research or build things faster, have your ships travel faster (so they arrive at their destination in a shorter time, etc). But in the end, it all comes down to the numbers - when you attack a planet, how many of the different kinds of ships do you have, vs how many "defensive" units the planet has. Whoever has more is likely to win (after taking into account things like ship statistics, various relative technology levels, weaknesses of certain units against others, and good old-fashioned random luck).

It's complex enough that in a close battle it can be quite difficult to figure out how it will turn out...so the crafty German player base has come up with a set of tools to simulate battles and give you reports on how they will turn out (since there is an element of luck, the simulators tend to run hundreds or even thousands of times and provide best/worst-case results). Here's an example:




Since it all pretty much comes down to numbers, there's a definite food chain where the top 50 players prey on the top 250 players, and the top 250 players prey on the ones below them, and so on, and the smallest fish can almost never beat the larger ones in a direct fight (you can still do guerrilla-style hit-and-run raids on their bases while their fleets are away, but mostly as a small fish, you try really hard to stay below the radar of the big fish).

And that's where the true evil of this game comes in... Ogame has a persistent universe (actually, it's dozens of different universes, each of which has thousands of players). That means that while you are sleeping at night, someone who is stronger than you (and there is always someone stronger than you) can find your base and/or fleet and attack it. Bases that are attacked just lose resources (and 30% of your defenses are permanently destroyed), but if someone destroys your fleet...poof, it's gone. Weeks of work down the drain.

To counter this, Ogame uses this simple mechanism - fleets that are in transit are safe; only fleets in orbit around a planet can be attacked. That means that if you want to go to sleep, no problem, just send your fleets on an 8 hour trip. Want to go out to lunch? Send your fleets on a 90 minute trip. Just don't oversleep, or pick a restaurant with slow service, because as soon as your fleet returns, it's fair game. And if you wake up early and want to play, your options are limited because your fleet is still off on a mission.

The end result is that the serious Ogame player is forced to divide his day into two sections - times where he cannot play, because his fleets are off on safety missions, and times when he must play, because his fleets are at his planets and are vulnerable. And god forbid that the hapless player should have a windstorm which knocks out internet service for several days (*cough* me *cough*) because he'll inevitably freak out and have to drive to Kinko's to rent a PC to save his fleet.

The combination of having an increasing investment in the game (my fleet has been accruing for nearly 2 months now) with this "you must play, or lose everything" mechanism is crushing me, actually. It's even worse than grinding PvP in WoW was, because you can't even take a day off.

It's actually kind of a brilliant hook, when you think about it...