Archive for May, 2009

Reduce game network latency in Windows 7 or Vista

After installing Windows 7 I noticed a slight increase in network latency in several online games. It wasn’t a big deal – I’m talking 200-300ms, but this is on a connection that was reliably < 100ms in the past. Beyond the obvious settings in Windows or on your router, here’s a list of tweaks that may help quite a bit. It involves disabling Nagle’s algorithm, also commonly known as TCP no delay, which is basically an optimization of network traffic that tries to reduce overall packet volume but can cause extra latency in the connection. This should work on Windows 7 or Vista, though the same principle can probably applied to other operating systems as well.

  1. From a command prompt (usually in All Programs -> Accessories -> Command Prompt) run “regedit”
  2. Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces
  3. Browse the items under interfaces until you find one that has an IPAddress entry matching the network interface you want to affect (typically LAN IP addresses start with 192.168 or 10.0); note that if your IP address is automatically assigned by a DHCP server you may need to look for a matching DhcpIPAddress instead of IPAddress
  4. Right-click on the interface and select New > DWORD (32-bit) Value, name it “TcpAckFrequency”
  5. Right-click the new TcpAckFrequency value and select Modify, enter “1″ (Hexadecimal radio button should be selected)
  6. Right-click on the interface and select New > DWORD (32-bit) Value, name it “TCPNoDelay” (note that TCP is all uppercase this time – that’s intentional)
  7. Right-click the new TCPNoDelay value and select Modify, enter “1″ (Hexadecimal radio button should be selected)
  8. Verify that both TcpAckFrequency and TCPNoDelay now show up in the adapter’s property list with types REG_DWORD and values 0×00000001
  9. Exit regedit and reboot (reboot is necessary for the changes to take effect!)
  10. Play a game and enjoy your new low ping

This decreased my ping in most games from 200-300ms to 50-60ms, which matches the latency I would see via a tracert to the game’s server.

, , , , ,

283 Comments

GXT 2.0-M2 upgrade experience

Recently I shared my GWT 1.6 and GXT 2.0-M1 upgrade experience which was quite underwhelming on the GXT front. In the past week my team went ahead an upgraded to GXT 2.0-M2 to take advantage of some specific changes we’d noticed in svn.

For the most part 2.0-M2 didn’t introduce new breaking changes beyond M1. In our project, the only obvious differences were new parameters to some renderers that were easily converted. Functionally, most things seem to work like M1 as well – just a few minor tweaks here and there. However, on the performance front there seem to be some incremental improvements: one example is TreeTable, where we’ve had problems with render time growing linearly with the number of children (over 100ms/item in IE7 – that’s over a minute for a 100 item tree!). It’s still based on the legacy Table paradigm rather than their newer Grid (see some GXT notes on the difference here), but has improved to the point where we can use it for a moderately sized TreeTable and re-build/render a new TreeTable in under 10 seconds. The existence of Table vs. Grid is a good example of 2.0-M2 still exposing several different architectural approaches to components, but at least the ones being actively pursued seem to be headed in the right direction.

Other than that M2 has been a worthy upgrade from M1. I’d fully expect anyone upgrading from 1.2.x to 2.0-M2 to still experience a lot of pain, but if you’re already on M1 then it makes sense to go ahead and get all these fixes. Our M1 build was actually an svn checkout that already had a couple weeks’ worth included, and M2 is certainly a much higher quality preview than either that or the original M1 release. Moving from M1 to M2 will give you a bunch of fixes and keep you in sync with the API for a very minimal amount of effort.

,

No Comments

Pandora gets even better

I’m a huge Pandora fan (thanks to my wife who discovered it for me!), and just noticed that they’ve revamped the premium side of the service to be even better. In case you haven’t used it, Pandora is an incredibly cool “custom radio” service that lets you seed it with a song, artiest, or other criteria, and then it spings off songs to your liking for hours on end. The only catch is that you can’t request a specific song to be played, and there are a limited number of “skips” per hour to conform to licensing agreements. It’s kind of like the iTunes Genius except that you obviously don’t have to own the music, and in my experience the “matching” logic in Pandora is by far the best out there. It literally plays all the music I love and finds new stuff for me, rarely coming up with anything annoying (which, when it does, is easy to correct via simple “thumbs up” and “thumbs down” controls).

As for the new changes, they’ve just unveiled Pandora One which for the same $36/year premium price, boasts even further relaxed restrictions and a handy desktop player (which incidentally, also appeals to my geek side because it uses Adobe AIR). Now I don’t have to worry about killing Pandora during my multitude of browser restarts during the day!

If you haven’t tried Pandora you should really check it out. Even the free version is phenemenal, and once you’re hooked you’ll see that $36/year for the extra bells and whistles is a steal. They also have a great iPhone app for music on the go and are starting to support some more conventional home audio systems as well.

, , ,

No Comments

Windows 7 RC is (surprisingly) really great

I just upgraded my main home PC to Windows 7 RC and I have to say – against all odds – that less than an hour into the experience I’m already pretty much blown away. For one thing, I’m writing this entry the same night I got the idea to upgrade, and less than an hour after beginning the whole process. In fact, I think it took longer to download the iso than to do the upgrade. But what’s really amazing is how painless it was, and for once, everything just works – seriously, it’s like I’m on a Mac or something. By this I mean that I simply burned a copy of the iso, ran setup.exe, let it do its thing (no custom/advanced options required), it rebooted my PC twice, and when finished Windows 7 was humming along with drivers working for all of my hardware.

Keep in mind, I have a home-built PC with hardware RAID, relatively new sound and graphics cards, a very new wireless N USB adapter, and these were all detected seamlessly without me so much as selecting a driver, much less downloading or installing one. On first boot I was instantly prompted for which wireless N network I’d like to connect to, my desktop appeared in the expected 1920×1200 native resolution, and even the really little things that just never happened automatically – like detecting my actual LCD display brand and model instead of labeling it “Generic PnP Display” – are there. It even found my Brother multi-function printer/copier/scanner over the wireless network and installed a driver for it. I think the only things I was even prompted for where a user name, password, and my time zone.

Anyone who’s installed any other version of Windows on a non-trivial PC, from 3.1 up to and including Vista, knows the pain of loading RAID drivers from a floppy during install, figuring out how to get a wireless driver onto that PC without internet connectivity (always a blast), etc. – it’s become so ingrained in my thinking that I just considered it part of the custom-PC-Windows-install process. To be fair, Microsoft has always had to deal with an insane amount of hardware while Apple has exclusive control, and in that respect it’s been no surprise that a Mac install or upgrade is much less painful than Windows one. But it’s for that reason that I am really, really impressed that Windows 7 has come so far – and in an RC, no less. Who can remember the last time a Windows OS didn’t have major issues until SP 1 or 2?

The insanely enjoyable install aside, Windows 7 seems a lot slicker and streamlined than Vista did, borrowing much of the look and feel while losing much of the bloat. The little Windows quirks that Vista tried to make better – but often just overcomplicated – are much better, from the “simplified” control panel (which now has quick power-user links to many things like Device Manager built right into the main view) to the wireless icon in the system tray which allows quick one-click connecting to an available network, to the slightly new take on the taskbar and window preview/switching. Even IE 8 isn’t half bad – though not technically part of Windows 7, I figured I’d use it at least once to write this entry before downloading Chrome again. :) For a more complete list check out this summary.

It looks like all the pressure from Apple is making a difference, and for once I’m looking forward to installing the full version of the next Windows. Now I just hope they give us a reasonable upgrade price!

1 Comment

Star Trek delivers

I made it out to see Star Trek on its opening night and it definitely lived up to the hype. Was it the deepest, most moving two hours of Star Trek ever? Did it strictly adhere to time-honored characters and canon? Did it it really feel like a “Star Trek movie” at all? On all of these counts, no – but the point is, it’s a great movie anyway. It’s been a long time since a movie that looked and felt like Trek did it so well, and without all the usual “Star Trek movie” pitfalls. Warning, spoilers below…

I first discovered Star Trek TNG on VHS recordings kept diligently by my dad (who oddly enough, wasn’t a huge fan but somehow knew I’d like it – me being all of 5 years old at the time), then later discovering TOS in late-night re-runs and eventually tuning in to DS9. For the uninitiated, that’s The Next Generation, The Original Series, and Deep Space Nine. I tried but could never really get into Voyager or Enterprise; the characters felt weak, and often the writing so spotty that it just didn’t seem to do Star Trek justice. Like many fans I saw all the movies, liked some better than others, but over the past couple years concluded that Star Trek was pretty much dead. Yet J.J. Abrams has managed the improbable feat of turning things completely around.

This new Star Trek works because it doesn’t try to be another re-unit-everyone-for-a-final-grand-adventure type of movie. It’s a true reboot, with characters and an environment that, while inspired in small ways by its predecessors, is full of fresh ideas and new takes on the crew of the original U.S.S. Enterprise as they deal with a radically altered reality. It’s to Abrams’ credit that he takes this freshness head-on, with tons of action, beautiful production, and actors who all do an outstanding job capturing the essence of their characters without ever feeling like they’re playing the young version of someone else. There are plenty of nods to canon, familiar lines and scenes touching on nostalgia from past (future?) adventures, but it still feels like a clean slate, setting a wide-open stage for more to follow.

If there’s anything I can fault Star Trek with it’s the breakneck speed at which it does all this, possibly at the expense of digging deeper into our beloved character’s souls – something Star Trek at its best has always done remarkably well. For instance I felt more of an emotional tug in the five-minute opening then I ever did from Spock or Kirk, even as Spock’s planet is destroyed, and the brisk pace from battle to battle was a bit unsettling; this is where it’s hard to really look at Star Trek as a sci-fi action movie rather than “a Star Trek”. It’s mostly for this reason I think a lot of longtime fans won’t let this new Trek usurp Star Trek II: The Wrath of Khan as “the best”. Honestly, I think the new crew could reach this point in the future; it’s just not possible the first time on screen, at least not combined with all the other objectives this movie tackled. However this is a fair trade in exchange for an all-around great film that’s accessible to hardcore fans and newcomers alike, as long as there’s more to follow!

Overall this would have been a great movie even without the mantle of Star Trek on it, but that it was done so well and forged from the rich history of Trek makes it more so. The closest analogy I can think of in recent times would be Casino Royale or Batman Begins, both well-done reboots of troubled franchises in their own right. Certainly Star Trek takes even bigger risks and they pay off wonderfully, despite the vastly more complex history – both in this world, and its own – that it must navigate.

What I liked most:

  • Fresh takes on the characters, as well as the evolution of Starfleet and the Federation.
  • An Enterprise that’s true to the original design yet revamped beautifully (I think the bridge was built by Apple!)
  • Bigger roles and relevance for all the bridge crew outside Kirk, Spock, McCoy.
  • Big, messy space battles – finally, instead of carefully-consider-and-then-fire-one-phaser, we get to snap out of warp guns blazing, ships exploding all around us!
  • Abrupt death – yes this is an odd one, but one thing I love about Abrams’ style is that anyone can die pretty much anytime; there’s no getting mortally wounded yet hanging on just long enough to deliver a final monologue here.
  • Redshirts dying, Chekov’s accent, classic Kirk/Spock/McCoy banter, and all the other little nods that made it “just enough” Trek despite all the changes.
  •  A Star Trek that stands on its own as a great movie, so much that I can see it with my wife and she actually, really, likes it.

A few things I had to grin and bear:

  • Black holes don’t work that way; invent some other name for them rather than dumb down real science for the sake of a familiar phrase (but good job with Red Matter!)
  • Future Romulan mining ships are epically humongous and brimming with weaponry? And they’re filled with ridiculous tiered bridges instead of a “deck”?
  • Spock Jr. can fly a ship he’s never seen well enough to escape, destroy an enemy weapon, and return on a collision course, but Spock Sr. was captured in it?
  • Instant trans-warp transporter capability where distance is no obstacle, thanks to Spock’s memory… convenient.
  • Spock was content to hang out on a frozen planet and watch his world die, despite there being a Federation outpost nearby, but then has a change of heart when Kirk randomly shows up…?
  • Time travel can do anything, and causality is out the window… though by now I’m used to this on a weekly basis thanks to Lost.

,

1 Comment