Hosting a Terreria Server – The yakshaving commences

Four kids, four laptops, one minecraft worldSo the latest craze around here is Terraria. Think of it as Minecraft in 2d. Naturally, since the kids here are all Minecraft addicts, Terraria was a natural next step. Minecraft, the gateway drug for MMPORPGs.
Of course, “DAD! Can you host a Terraria server for us?” was inevitable. “Sure”, the foolish Dad says, “Where’s the Linux client?”
“Yeah, so, there’s a problem with the Linux server version of Terraria. There isn’t one.”
Awesome.
So began my descent into Windows hosting hell. I share my experiences here with you, to hopefully lesson your pain.
A server
Windows xp laptop in the server rackIn order to make this work, you naturally need a server. I had a spare Windows XP Dell 620 laptop lying around that looked like it was ready for abuse, so that was put up as my offering to the network gods. Getting said laptop into the server closet proved to be a bit of a challenge, since I was faced with some awesome challenges:
* The NIC on the laptop (or the drivers) are unstable. Occasionally it will drop the network connection, requiring a physical cable drop and reconnect. Wonderful.
* Terraria is a DirectX application. Ergo, it cannot be started via RDP (which reduces the video driver capability). I must start Terraria on the console of the laptop in the server closet before connecting to it.
* The screen on the laptop is twitchy – Occasionally the screen will blank out, and only a hard reset will restore it.
Installation
Setting up and running the Terraria server was pretty straightforward. Install Steam, download/install Terraria, start up the game, click ‘start server’. Easy, huh? Note that because it uses Steam, you need to use a unique login. My experience has been that the Steam credentials are only checked during startup – once the server is running, you can log out of steam on the server and run up a client machine on the same login.
Networking
Anyone who is familiar with firewalled hosted services should be able to set up their network appropriately. In our network environment, we host servers behind a NAT enabled firewall, and set up port-forwards to internal services. This makes the server relatively isolated from the internet at large, but allows for the server to be accessed from the outside world.
Some basic guidelines when setting up your server:
* Do not host your Windows box on the internet without a firewall. Really, just don’t do it. Windows boxes are the most often attacked, have the most vulernabilities, are the most commonly compromised.
* Running a Windows host with a ‘self hosted’ firewall is marginally better, but is still easy to run up in an ‘unsafe’ configuration without you even knowing it’s happened.
* Terraria uses port ‘31337’ for the server. Note that this port is ALSO used by the (mostly old school now) ‘Back Orifice’ application – a tool generally used to hack servers. Many firewall tools and applications may flag Terraria servers are Back Orifice servers, and disallow them
Testing the server’s available is pretty easy. Log into your Linux box out on the net (you do have one, don’t you?) and test connectivity to the server:

dbs@calypso:~$ telnet your.firewall.ip 31337
Trying 1.2.3.4...
Connected to your.firewall.ip.
Escape character is '^]'.

Hooray! Your server is ready to access! Run up Terraria on your computer, and connect to the IP address of your server (note that Terraria doesn’t support hostnames [idiotic in my opinion] – you must connect by IP). You’re in the game!
Conclusion
In so many ways, Terraria is NOT ready for prime time. The lack of a decent server mode, the requirement for DirectX for even basic operation (even in server mode) – these make hosting a server more painful than necessary. It can be done, but I don’t know how long this house of cards will last.
Oh, the game itself? Don’t know, haven’t played it, there’s no Mac version.

CONGO Update – The road to 2.1.

I’ve set a goal for myself. Have CONGO v 2.1 released by June 1st. It’s an auspicious goal to be sure, and recent career shifts have either made it more likely (more time to work on it) or less likely (new job) to have time to dedicate to coding.
But goshdarn it, I’m going to try.
congov2-eclipse-screenshot.pngWhile coding away last night at a particularly recalcitrant chunk of the new ‘Links’ system (I’ve been… instructed… by my pesky users, that ‘Friends’ is really too ‘social buzzy funtime networking’ for an event management system), I was curious how big CONGO had gotten. So a couple greps got me some quick stats:

Total lines of Java : 13,412
Total lines of XML : 5,492
Total lines of JSP : 5,543

This makes CONGO the largest application I’ve ever written completely on my own. Oh sure, I’ve worked on larger systems, but that was part of a team with other coders. This one (with some small help from 1-2 folks – accounting for around 2% of the code) is all mine.
I’m always looking for alpha and beta testers. Interested? Lemme know. Continuous build / QA testing is working, so there’s always new builds and bugs that need to be tracked.

My bosses are audiophiles.

It’s interesting working for a music distribution company – our upper management tends to the audiophile / retro-geek crew.
Witness our CEO’s office:
CEO Rig
And the CTO’s office:
CTO Rig
I do wonder at the massive old-skool speaker stacks and tube amps… in a 15×15 standard drywall office, but it does look sorta neat.

My Chumbys and Me

It’s no secret I’m a big fan of Woot and the excitement that can accompany a Woot-Off, that festival of consumerism and feeding frenzy for those susceptible to impulse buys.
A few frenzies ago included offering up a Chumby One for the attractive price of $49.
Chumby one!
I bought two.
I’d been trying to figure out various ways gaining ‘shelf-top’ access to online music resources. Back in the day, I’d picked up a Roku Soundbridge or two, but I’ve never been completely satisfied with the results. Even modern versions of these devices are in my opinion too expensive and too limited. They play music, that’s it. Even though Roku has moved on, other manufacturers are offering similar devices for $250.
Screw that.
The Chumby One is a small 450mghz Linux computer with Wifi, 64meg of RAM, and a 3.5″ color screen. It has everything I was looking for in a ‘bedside’ or ‘shelfside’ device. It can play music, it has a touchscreen that can show a wide variety of content, and it’s controllable from a centralized server. It has line-level audio out via a headphone connector, as well as internal speakers. The design allows for easy ‘bedside’ use, along with unattended modes.
The final button for me was the inclusion of a powered USB port on the back. This means I now had an easy charging station nearby for my iPhone, without taking up another power outlet and the accompanying cable mess.
I love the variety of apps, both the whimsical (David Letterman’s Top 10) and the useful (A constantly updated weather / traffic / time / date page that shows ‘local status’ in real time) – all while happily playing Radioparadise for me.
And. Heck. They’re cute.

The Blog is Resurrected… for now.

Well that was no fun.
For a while, I was in a funk because the Planet-Geek.com site was not posting ANY of my articles. And when I logged into the maintenance pages, I couldn’t see any of my articles for the last year.
Now, the site has something like 1600 articles on it. I was pretty cranky at the possibility of losing all my content. But the database itself seemed okay, and I could see entries in it. Just new content was not showing up.
Tonight I decided to sit down and figure out WTF was wrong with it.. It took about half an hour to determine the root of the problem…
I was logging into the wrong site.
We migrated the blogs off msb to msb2 a year or so ago, but I never a) removed the old bookmark in my shortcuts, and b) never updated the maintenance page to point to the correct toolset.
So I was editing the old site.
Boy do I feel like a dork.

Performance Tuning with Trac

I’ve been using Trac for managing all the bugs enhancements in CONGO for the last 3 years or so. For the most part, it’s been pretty useful, though I haven’t been thrilled with some performance problems I was having.
Most notably, a simple page load would take 4-5 seconds to come back.
I thought the initial problem was due to the older (v0.11) version I was running. But after a painful SVN crash and rebuild, and taking that opportunity to upgrade to 0.12 and move to a faster host, the performance problems were still there.
When reading Trac performance blogs, the first thing everyone says is “For gods sake, make sure you’re running mod_python!!!” Well, I was. So that wasn’t it.
I found the answer in an older blog post that mentioned the Chrome elements in Trac were rendered on the fly via Python. This didn’t make sense, as they were primarily static elements.
So why not cache them?
A quick tweak to the vhost configuration:

<LocationMatch /[^/]+/chrome>
Order allow,deny
Allow from all
ExpiresDefault "now plus 12 hours"
</LocationMatch>

(which, by the way, necessitated adding mod_expires in apache), and a restart, and my load times went from 6.6 seconds:

172.16.1.1 – – [13/Feb/2011:22:58:13 -0500] “GET
/chrome/site/stonekeep-ball-logo.gif HTTP/1.1” 200 6660
“http://trac.stonekeep.com/” “Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62
Version/11.01”

down to zilch due to caching:

172.16.1.1 – – [14/Feb/2011:08:15:51 -0500] “GET
/chrome/site/stonekeep-ball-logo.gif HTTP/1.1” 304 –
“http://trac.stonekeep.com/wiki/WikiStart” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X
10_6_6; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4”

Win!!!

How to make sudo use your login name

This is being tossed out there as a handy reference to sysadmins around the world.
Sudo is a magnificient tool for Unix / Linux based systems that allows a single command to be executed as the root / privileged user. The advantage is that the command is logged to the syslog, and access to sudo-managed tools can be tightly controlled via /etc/sudoers.
One problem that comes up a lot is that logged activities on a host will show up as ‘root’ when sudo is used to invoke them, when what you really want is to know who initiated the command.
The sudoers file can include an option that tells sudo to not reset the users login name when escalating priveleges. The option is:

Defaults        !set_logname 

Putting this option in sudoers will make it so RCS checkins and other tasks will log as the user who invoked the sudo, not root.

Fun with Server Uptimes

At ${dayjob}, we were doing a system audit when an alarm came up on a pair of servers we rarely had any interraction with. One of our new monitoring tools was showing these servers were not answering correctly, and should be investigated.
Investigate I did, and found… four machines in a full sized rack that were doing absolutely nothing.
It turns out these were used for 3 customers we no longer supported. The applications were still there, the appservers were running, just… no one had connected to them in almost a year and a half.
What’s more entertaining is the uptime on these boxes:

09:23:08 up 992 days, 19:15,  1 user,  load average: 0.00, 0.00, 0.00

The current plan is to let them roll over to 1000 days, throw a little party for them, and shut ’em down.
(For the true geeks, these are dual opteron Rackable servers with 8gig RAM running CentOS 4.4)
Update – Just found the database servers these machines have been using. Also idle, but the uptime is even more impressive:

 09:43:08 up 1304 days, 19:49,  1 user,  load average: 0.22, 0.09, 0.02

Vox is Dead. Long live Vox!

As little as 5 years ago, Six Apart was the undisputed gold leader of blogging platforms. Movable Type was the largest and best known blogging platform, and corporate entities were making moves to acquire competing services.
During this time, SixApart launched Vox. The idea was to blend blogging with social networking. Shared questions and trends, bring the whole blogger community together into one big happy family.
It never worked.
Bloggers are individuals. They want their own sandbox, their own domains, their own content. Not only from an individualistic stance, but also when it comes to money. It’s hard to make a buck when your blog is buried in with a thousands other bloggers.
Vox lurched along for a few years, but never got any traction. Perhaps due to its muddled target audience. Were they targeting bloggers? Facebook folks? The then-dominant MySpace crew? It wasn’t clear.
I had a Vox account, and I posted perhaps 3-4 things on it, and lost interest. There was no draw or anchor. I never went back.

Quicken Online Shutting Down – One Guy in Mattawan Surprised

Quicken® Free Personal Finance Software, Money Management, Budgeting, Personal Finances

Well THIS will come as a shock to absolutely no one:
>Dear Valued Customer,
> For the past several months, we’ve been working hard to combine the best features of Quicken Online and Mint.com into a single online personal finance solution–Mint.com. With the improved Mint.com, you can enjoy the features you love in Quicken Online, plus new benefits such as connecting to over 16,000 financial institutions, including Canadian banks–as well as tracking your investment and retirement accounts. There is also a new Goals feature that takes the tool you enjoyed in Quicken Online to the next level.
> As a result of these changes, Quicken Online will no longer be available as of August 29, 2010. Creating a new Mint.com account is easy, but for reasons of security and accuracy, we cannot create one for you. Once you’re signed in, you can add your accounts and see your financial picture in just a few minutes.
Color me shocked. NOT.
It was obvious from the beginning that Intuit was never going to make anything serious out of Quicken.com – they’re far more interested in Quickbooks. When they announced the aquisition of Mint.com, the writing was on the wall.
I recently switched my online accounting over to Mint.com, and I have to admit it’s a helluva good system. Fast, very well designed interface, and good integration with my other finances.
So, there ya have it folks. If you can’t code it, acquire it.

iPhone Game Chatter – geoDefense Swarm Rocks my world

I admit it. I’ve been a fan of the geoDefense games for quite a while (even during geoDefense’s Freak Out period). When Critical Thought Games released geoDefense Swarm, I jumped at it. The new game layout (free form, etc) took a little getting used to, but after a bit, I was hooked.
geoDefense SwarmFor those not familiar with it, these are classic “tower defense” games. geoDefense used a fixed track for the ‘creeps’, while Swarm uses a free form layout. The game play is virtually identical between the versions (Swarm introduces ‘thumper’ towers, while de-emphasizing ‘vortex’ towers. Which is sad, cuz I do love me the vortexes).
The games have a strong ‘retro’ color-vector look to them. That coupled with some smooth, stunning animation makes the play experience pretty exciting. As the towers get more powerful, and more dramatic action is happening, the visuals really ratchet up. The endgame for an endless level is constant nuke-explosions from the missile towers and plasma lasers firing every which way. Kaboom!
Lately I’ve been rerunning Swarm levels and shooting for higher scores. This involves a huge amount of trial and error at the beginning, particularly on the ‘endless’ levels (which I adore).
The trick is to get the score multiplier up as high as possible in the first 10 levels. My best is around 900x by level 10. That particularly run resulted in my best score ever in the Crazy 88 level (‘hard’ ‘endless’). The screenshot here shows the very end of that game, which took about 3 hours to play beginning to end. Naturally, toward the end, it was just a matter of watching the game run it’s course.
Thanks @nsxdavid for making such an awesome game. Can we have some more endless levels please?

Beating the Heat – How I Did It

Sounds more grandiose than it is, really.
We’re going through a heck of a heat wave here on the east coast. The last 2-3 days have been 90+ degrees with high humidity, and it’s showing no signs of really letting up until at least next week.
I don’t react well to heat – I mean, I can deal with it during the day while puttering around, but sleeping? Bad things happen when Mr. Geek doesn’t get his beauty sleep.
With our super efficient buildings, we really don’t need to air condition an entire building just to make it habitable. But I’ve found that even with proper ‘behaviour’ (closing windows during the day, opening at night, using fans if necessary), I still need to cool the space down when I sleep.
Here’s how I set up my bedroom to use the minimal amount of cooling necessary for me to get a good nights sleep.
A few months ago I built a loft in my bedroom so Zach could have a place to sleep when he was over. I found that on super-hot-humid days (like this week), the upper part of the loft got too stuffy, even with the room AC turned on. I was also uncomfortable ‘turning up’ the AC just so my upper space could get cool. “The rest of the room is fine, it’s just this spot. Hmm.”
So last night I moved the room AC under the loft, turned it on LOW, and dangled one of my sheets over the end of the loft. With that loose enclosure, the low-power AC was easily enough to keep the space cool. I flopped on what is normally Zach’s bed, and slept like the dead for almost 8 hours.
I’m able to cool that space down in about a half an hour. I can turn off the AC when I leave, so in the end, I run the AC only about 9 hours a day on lower power. Just enough for me to get a good nights sleep.
Works for me!

CONGO Available for Download

Well, I said it and said it, and promised I’d do it, now it’s really here.
You’ve heard me chatter on about CONGO, my Event Management System for running conventions, meetings, and the like – well, now you can download and run it yourself.
Details are available on the CONGO home page. If you’re a fandom or gaming event, and you’re looking for a tried and trued registration system for your con, this is the place to go.
Enjoy!

StarCraft II – Release date of July 27

Well, guess I’ll be booking my PTO early. According to Slashdot :

Blizzard announced today that StarCraft II: Wings of Liberty, the first game in a series of three, will be released on July 27. The game will contain the Terran campaign (29 missions), the full multiplayer experience, and “several challenge-mode mini-games,” with “focused goals designed to ease players into the basics of multiplayer strategies.” It will launch alongside the revamped Battle.net, which we’ve previously discussed. Blizzard CEO Mike Morhaime said, “We’ve been looking forward to revisiting the StarCraft universe for many years, and we’re excited that the time for that is almost here. Thanks to our beta testers, we’re making great progress on the final stages of development, and we’ll be ready to welcome players all over the world to StarCraft II and the new Battle.net in just a few months.”

I remember being completely addicted to StarCraft when it first came out. We recently tried getting it running on Zach’s Windows XP setup, but we weren’t successful (Starcraft ran on Windows 95… that was 15 years ago. Sheesh!).
I wonder if we could have a release / lan party. Hmmmm 🙂

iPhone Development Guidelines – Do’s and Don’ts

First, a disclaimer. I am not an iPhone developer. I am what used to be termed a ‘power user’ – gamer, tool user, critic, yes – but I don’t write iCode. (I do develop, just not on the iphone).
Having gotten that out of the way, I’d like to propose a list of Do’s and Don’ts that every iPhone app developer on the planet should adhere to. This is a list from a USERS perspective – things that irk me to no end.
Onward…
* DO : Obey the Mute switch! – How hard can this be? If the mute switch is on, then SHADDUP! There’s a REASON it’s called a mute switch! I don’t know how many games I’ve powered up that leave me scrambling for the volume-down buttons when the mute switch was IN THE MUTE POSITION.
* DO : Incremental saves – again, primarily on the gaming front. That little device in your hand? it’s a TELEPHONE. That means people can call you at any time, and interrupt the application. It doesn’t matter if you’ve spent 3 hours getting Sir Grinsalot to the top of Mount Bigahonkin and you’re about to kill the Great Gizbo of Durn – grandma will STILL call you at that point, interrupting the game. Save!
* DO : Provide status that you’re doing something. Okay, older platforms are slow, so sometimes it takes time for things to load. Provide some animation or indication that something is going on – a load bar would be best (gives an idea how much longer it’ll take), but even a spinner will do.
* DO NOT : assume that just because you’re on an iPhone, the easiest device on the planet to use, you don’t need to provide directions. Apps are NOT self explanatory, and a link to a web page is not enough. “This button does that, this button does that. Got it? Go forth and enjoy.”
* DO NOT : Link out to a web site without informing the user you’re about to do so! Nothing is more painful than tapping on a “view the high scores list” and have that exit the damned app to start Safari. That app may have taken you 4 minutes just to get to that screen. Now you have to do it all again.
* DO : Provide a rotation lock. Some of us like to read or do games while going to sleep, which does not necessarily mean I’ll be in an upright position. Having the app auto-rotate to what it THINKS is the right orientation is irritating when you have no option to disable this.
I’m sure this list will grow, and I’m open to suggestions as to what to add to it. These are things that have come up in my adventures.
What bits have YOU seen that developers seem to miss?