Sunday, March 24, 2013

> Starcraft 2: Heart of the Swarm



Starcraft 2: Heart of the Swarm, an expansion to the inaugural Wings of Liberty was released across the globe just two weeks ago. Continuing Blizzard's tradition of fantastic games, HOTS updates the mechanics of the popular competitive Real Time Strategy Game, Starcraft 2. Being a longtime Blizzard fan, I sat down with the new expansion and decided to flex my army-commanding skills, to play through both the single-player campaign and the online multiplayer. There won't be very much technical or deep mechanics overviews this time, as I'm still trying to work some of those out. What I will cover is the Story and Community around Starcraft 2, and how much fun a game like this can be!


The second installment focuses on the Zerg race, aka the bugs from Starship Troopers


Heart of the Swarm's single player campaign picks up where the the previous campaign (Wings of Liberty) left off. I'll assume here you know enough about Stacraft to go on, as explaining it could be it's own post! Anyways, we're back with rebel leader Jim Raynor, who has finally suceeded in returning his love interest/potential murderer Sarah Kerrigan from a nasty Zerg infestation that had turned her into the omnipotent Queen of Blades (excellent story writing here, Blizzard). Of course, all is not well. While running experiments and tests to see if Kerrigan is indeed fully cured, Prince Valerian Mensk's facility comes under attack, prompting all shit to hit the fan. Raynor and Kerrigan attempt to escape, and I really can't go into any more detail without a ridiculous amount of spoilers. Suffice it to say, the action kicks off with a bang, much like the game's release.

So why is Starcraft such a popular game across the world? You could chalk it up to marketing hype, which Blizzard is VERY good at (see: worldwide launch event). But there is something else, something which keeps it's playerbase interested years after the game's launch. The community around Starcraft II is a key factor. Casual players from across the world compete in online matchmaking to improve their skills. Profesional players are showcased in several large sponsered tournaments for Fame, Glory, and prize money. Tournaments are often streamed online, in addition to having live audiences on location. Last Sunday, a large group of Starcraft Fans took over a local Bar & Restaurant to stream one such tournament and drink beer, in an event called Barcraft. For several hours the crowd cheered as we watched our favorite players go head-to-head , while listening to commentary from Streamcasters such as Sean "day[9]" Plott, and  Marcus "djWHEAT" Graham crack jokes and talk Starcraft Stategy. In the end, MLG Dallas came down to two high-level pros from Korea (The dominant country in Starcraft), Zerg player Lee "Life" Seung Hyun and Terran Lee "Flash" Young Ho. Although the player and fan base are the driving forces in the Starcraft community, business hasn't sat idly by. Companies like Jinx and Thermaltake, selling everything from clothing to CPU coolers line up to give away branded swag to fans and players. Many of the professionals are also sponsored full time by one company or another. Even some enterprising businesses like Twitch tv have answered the demands of gamers and fans by revolutionizing the way we view competitions and game content.

Even though H.O.T.S. is brand new, the community that loves it has been around for a long time. Back in the early days of multiplayer computer strategy games, circa 1998, the original Starcraft was released. I remember playing it a bit, even if I wasn't very competitive at the time. Back then, I was more into card games and console video games, so I left Starcraft and did something else for awhile. For years, however, the community of players grew, and early tournaments and professional circuits sprang up around it. It is because of these dedicated early players that the Starcraft 2 scene is as it is today. Even so, the community is still growing, and has only a small following when compared to professional sports like Football, Soccer, or Basketball. This may sound like a silly comparison, but the level of professional play in eSports is no less dedicated than any professional athlete. And with so much support, and ever growing player base (HOTS sold 1.1 million in its first day alone), it's hard to not see the phenomenon continue. I personally hope it does. As an on and off player, I've had a rather inconsistent history with Starcraft, but whenever I do visit again, I'm fascinated by the fierce competition, vibrant storytelling, and  amazingly dedicated community of players and fans. Perhaps this time, I'll stick around.

Before I run off, I think it's fair to say I wholly recommend Heart of the Swarm to any RTS enthusiast with a copy of Starcraft, and both WoL and HoTS to anyone even vaguely interested. There's so much more here than a single game in a box, it's an entire universe of it's own. So give it a try, and I'll be seeing you in the Koprulu sector!

Tuesday, March 12, 2013

> Asus UL30VT - Tweaking Hardware and Software for a leaner linux laptop


Several years back, Asus released a sleek and dynamic laptop line utilizing the the then-new Intel Ultra-low voltage CULV chipset: the UL30VT, UL50VT, and the UL80VT. With excellent battery life, reasonable pricing, and a Dual-graphics solution that allowed for gaming, the UL's have lasted reasonably well (I'm typing this on one right now :) Naturally, there has been a lot of work to get it working on Linux, and for the most part, it's been sucessful. However, most flavors of linux by default are not optimized for laptops, let alone the somewhat unique hardware in the UL's. For this post i'll be showing you how I lowered my battery usage on the UL30VT, using the latest version of Linux Mint (14, MATE edition). I have also made hardware changes to increase battery life, which may not be feasible for everyone.

Just look at that sexy thing.


UL30VT replacement battery:
http://www.amazon.com/4400mAh-A42-UL30-A42-UL50-A42-UL80-Replace/dp/B004HFFID8/ref=pd_cp_pc_0

My SATA II SSD:
http://www.newegg.com/Product/Product.aspx?Item=N82E16820220390


One of the most useful Linux laptop tools out there is called Powertop. Essentially, it keeps track of devices and processes running on your machine, and gauges their average power usage. For anyone who wants to pinpoint what's eating the most of their battery, it can't be beat. Installing and using Powertop is simple enough on the Ubuntu-based Linux Mint, just install and calibrate, like so:

sudo apt-get install powertop
sudo powertop --calibrate


Now it's important to let the calibration run on battery power and to leave your laptop alone while it happens. Powertop will analyze and aggregate the power usage of your hardware components, and for a power estimate based on the total power used and battery capacity. As we start making our optimizations, you should notice a marked increase in estimated battery life.


UL30VT specific battery optimizations:

The UL30VT has a very unique hardware configuration, as it utilizies 2 graphics cards: An intel onboard solution for low power usage (the one we want here), and a beefier Nvidia discrete card (it uses its own memory and a lot more power, so this is the one we will turn off), usually used for gaming. This configuration is very well supported in the Windows 7 it ships with, but we want to optimize it for Linux! The best solution that i've found at the time of writing is to simply disable the Nvidia card altogether. In order to do this, I followed this thread on Ubuntu Forums, with some slight modifications. The debian file didn't install for me, so I ended up compiling the module from source (after adding a module header to the code), and manually adding it via the modprobe command. What this does is install the module to the Linux kernel for the current session. In order to turn the Nvidia card off at every startup, however, it needs to be a permanent module. This can be done by adding the name of the module to /etc/modules. Normally this should work fine, but it ended up bricking my installation a few times. The workaround I found is to run the 'modprobe' command itself at every startup (by adding it to the /etc/rc.local file). After this, I noticed a 4 Watt decrease in overall power usage from powertop.

After extensive trial and error, these are the exact steps that worked for me (your mileage may vary):

cd Downloads (or wherever your .deb is downloaded to)
ar x *.deb
tar xzf data.tar.gz
cd usr/src/
tar xzf nvidia-*.tar.gz
cd dkms_source_tree
add #include<linux/module.h> to the top of asus_nvidia_g210m_acpi.c (or whatever the c file is called)
sudo make clean install
sudo cp nvidia_g210m_acpi.ko /lib/modules/$(uname -r)/kernel/
depmod
modprobe nvidia_g210m_acpi

To run on boot:
add 'modprobe nvidia_g210m_acpi' /etc/rc.local

Enabling brightness keys:
The UL30VT seems to have had some issues with getting the brightness keyboard keys working by default in Linux. However, by following the guide provided here, I managed to get them operational.


General laptop battery optimizations:
For awhile now, I've been a big fan of Hak5 on Revision3. Most recently they put out a segment on linux battery optimizations, from which many of these following tips are drawn. For the full episode, go here: http://hak5.org/episodes/hak5-1225

1. Disable unneccessary Startup applications.
If you're like me, there are few startup applications/applets in most linux environments that you actually need. Some others, such as bluetooth manager and default-keyring are optional and consume battery when run in the backround. To disable, simply search for startup applications in your menu bar, and uncheck what you don't need. (WARNING: If you don't know what a startup application does, DO NOT disable it. Seriously, that's like dividing by zero.)

2. Lower backlight brightness
Most of the time, you likely won't need the absolute brightest setting your laptop has to offer. You can usually set the brightness from your power management console (click the battery icon, then preferences), or there may be keyboard keys that map to brightness functions (like on the UL30). Whatever your setup, you will need to make this behavior default in power management. I reccommend using the lowest brightness you can stand, but comfort may weigh more than battery life, depending on your preferences.

3. Turn off unused devices
Most of the time, I use my laptop on wireless only, so I don't really need my ethernet interface. In linux, you can see your interfaces with the ifconifg command. Try it, and you should see a few different ones, a lo (don't worry about this), a wlan0 (your wireless interface), and eth0 (we'll disable this).
To turn off eth0, run this command:

ifconfig hw eth0 down

To make this change run on startup, add this same command to your /etc/rc.local, like we did for our G210m module.

Do you know any other devices you can safely disable on your linux laptop? Post it in the comments!

4. Disable Swappiness
Straight out of the Hak5 segment, we'll be disabling our swappiness. But what is Swappiness? Swappiness (tired of it yet?) is a tool which controls when your machine starts to use its Swap memory (reserved hard drive space which is used as an overflow for RAM). By setting this to 0, we will force Swap to not be used until absolutely necessary. Because HDD space is more expensive to access, this will save us power if we have available RAM. To set, find your swappiness file:

/proc/sys/vm/swappiness

and edit it, setting whatever value it has (mine was 60) to 0. Make sure you do this as root (or run sudo with your command!)


Conclusions:
And that's it! If you've been following along, your laptop should now be consuming significantly less power than when we started.
According to powertop, I get about 6 hours @ 10 Watts when idle and 4-5 hours @ 14-15 Watts under reasonable use, but every machine is different. How'd yours do?
If you have any questions or additional suggestions for power optimization, please leave a message in the comments!

Thanks to:
Hak5.org
ubuntuforums.org
wiki.daviddarts.com/Main_Page
Google (for all the searchability)

Wednesday, March 6, 2013

> Intro


I've decided that I'd like to have a place to write about the things that I like. I've tried blogging before, but all my attempts have typically been constrained to a single topic or genre. If I didn't feel like writing something about that, nothing would get done. The same problem would crop up if I couldn't think of a relative topic for the week. It's easy to see how this problem can discourage someone from keeping their writing up to date. Fortunately, the solution is so obvious it could've slapped me in the face: Add some variety, and mix up the topics. So here's a fresh attempt at putting what I love to keyboard. Every week I'll be bringing posts on a mix of topics that anyone with good taste should love. Hold on to your hats, seats, pants and idioms!


So who the hell am I? Okay, I suppose some introductions are in order. The name's Devin, but online I like to go by Piratechnics. I'm  a self-styled geek, with obsessive interests  in all the usual topics. The stuff I like to write about includes Pop Science, Sci-fi and Fantasy, Software, Hacking (Good, Evil, and all other brands of varying mileage), Music, Movies and Video Games. I'll try to devote a decent amount of time of each of these, and maybe an oddball topic thrown in. For the more technical topics, I'll try to give some background, but most of the time I'll be just learning as well. For all the rest, I'll likely be 50/50 describing the work and gushing over how awesome it all is. Would you expect any thing different from a Geeky Dude?

So that's that for introductions and indoctrination. As I've indicated, this insipiant internet communiqué has been instantiated to learn, teach and internalize the ins-and-outs of varying innovations, in order to increase intellects. Without further intricacies, it's fair to include that this blog is now initialized. Please check back for further input at another instant.