Friday, December 30, 2011

World of Warcraft old blade server

Woo! I got an old server World of Warcraft server for Christmas. As expected, it came without hard drives or any way to plug it in. All the servers that were auctioned off were intended for display only. I'm toying with the idea of getting it running, although if I can get it working I probably won't benefit too much. But it will be awesome.

Blizzard auctioned off old World of Warcraft servers a few months ago The server I have was Rexxar, according to it's plaque it was in service from February 10th, 2006 to June 9th, 2010. I leveled up my main on it a few years ago before transferring it off to join some of my guild migrating from a different MMO, Guild Wars. The servers they auctioned off were all pretty old HP Blade servers, I don't know much about them but it sounds like they were powerful servers in their time, power hogs and very noisy. Unfortunately, I haven't found any good sources of information about Blade servers yet, I tried contacting HP support but they haven't gotten back to me yet.

My blade server has three main ports I've found. One on the front, which I assume is for plugging in a terminal. Two in the back, one looks very much like a power port and the other is probably for data. I assume when the server lives in a rack, the power would plug into 48v DC and the data port would plug into some sort of very fast ethernet (I found at least one thing claiming this model used gigabit). I imagine I could hack power together to boot up the server, but I have no idea how I'd interface with it or connect it to the internet yet. Also, I don't know how well the server tolerates variances in voltage. Ideally I'll be able to find a small Blade server rack, but it doesn't look like any small ones exist. Maybe I'll get lucky and I'll run into someone with a space server rack. I'd love to be able to host stuff on an old WoW server.

Thursday, December 29, 2011

RTS Engine

When I first started to learn C, as soon as I finished with learning the syntax I jumped straight into trying to make an RTS engine. I'd written enough of an engine including a server and a client to move units around on both screens and have them collide with each other and pathing blockers. I'd also written a map maker for placing pathing blockers. The whole thing was very crude, basically it was just a lot of colored rectangles that could be selected and move around. After a little over two weeks of working on it, I got bored and moved on to working on an MMO engine (partially shelved at the moment, it's on my GitHub)

Recently, I decided I wanted to work on my RTS engine more. Fortunately I was using git at the time and found an old backup. I hooked up my old repository to GitHub and started working on it about a week ago. Fortunately my coding was neat enough so I didn't have to spend a while figuring out what it all meant.

Over the last week, I focused on implementing pathing. In most RTS's, units automatically find paths around obstacles. I don't know how other RTS engines deal with it, but I decided to break the map up into a grid of rectangular nodes, each of which has a flag for occupied or not. When a unit is ordered to move, it runs the A* search algorithm using euclidean distance as a heuristic to find the optimal path. The current version is a little glitchy, but it seems to work. At the moment it is very crudely coded and would break if multiple units existed on the game or if the pathing blockers moved. I need to clean it up a little, but it's a good proof of concept right now.

Path 1
Path 2
I'm not sure how well A* will work as my game becomes more complicated. Right now the engine assumes units can only move to nodes adjacent to the node it's currently in. If I implement any sort of teleportation, I have no idea how to deal with it yet. If teleportation is done by a fixed teleporter, I guess I could test paths to the teleporter and see if they're shorter than direct paths. That doesn't scale very well with large amounts of teleporters, but it might not matter if I can assume there are always few teleporters. There are a few other tricks to A* which I don't entirely understand yet which might cause A* to get non-optimal paths.

Friday, December 16, 2011


It's almost finals week, and that means I'm finally done with assignments and only have to study for finals. Before really diving into studying (my first final is on Monday), I decided to take a break and relax.

One of my current pet projects is about terminal emulators. In just about every terminal emulator I've tried (such as gnome-terminal, terminator, and many others) text does not get auto reformatted. That is, when I resize the window the text does not get reformatted to fit the new window size. Mac OS X terminals actually do auto reformat text nicely, as well as the GUI-est terminal I've ever seen. I wish I could get my hands on Mac's terminal's source, but it looks like it's closed source. The other editor is too GUI for me, although I might fish through it's source some day.

I discovered that screen partially does what I want. The output of programs like cat, less, and tail all get correctly auto reformatted. However, ls does not get auto reformatted. I haven't tested it much beyond that yet.

As an experiment, I decided to make have gnome-terminal run screen by default when I run it and do all of my work inside of screen. So far I've noticed almost no differences, other than the auto reformatting I described. The main difference is screen eats my normal ctrl-a for it's own commands. Ctrl-a a does work as a normal ctrl-a. I'm considering seeing if I can change the main screen key to something other than a, although I need to find a safe character first. Maybe I'll try to change it to Mod4-a instead.

In the meantime, I've learned a little more about screen. I learned about .screenrc, which as it sounds gets run when screen is started. Right now, this is my .screenrc:

startup_message off
vbell off

Pretty simple, it suppresses the startup message that screen normally displays and switches off the visual bell. The visual bell is similar to the system beep, except instead of making a noise it flashes the entire terminal for a second. Useful, but I prefer the beep.

For anyone interested in screen who hasn't used it much, one of the most important things about screen is how to use screen commands. Ctrl-a by default is the prefix to most or all screen commands (I'm not sure if there are others). Ctrl-a ? will give you the help menu.

Thursday, December 15, 2011

New plan!

So, about a month and a half ago I took down my new blog due to a bot attack and hadn't gotten around to putting it back up yet. I just started working on it again today, and decided against restoring my drupal installation. It was causing me some trouble, (I foolishly tried to update the installation while bringing it back) and I'm planning on completely overhauling my site over January. I decided that for now, I'll stick to using this blog.

Speaking about that, I'm planning on redoing my whole site to combine my original personal site, and this blog while revamping it's look so it doesn't look like it hasn't been updated since the 90's. As much as I like having beautifully simple coding, a background that doesn't blind the user, and a site that scaled to any browser with the same block of code, it looks pretty bad. My new site will probably be based on Movable Type, and hopefully someone I know who actually knows how to make websites look good will be helping me design the site.

Wednesday, November 2, 2011

New blog temporarily down

My new blog got hit by comment bot spammers, I had to take it down to protect my server. I haven't had a chance to fix it back up yet so the links point back here for now.

Monday, August 8, 2011

Switching blogs

Among other reasons (mainly procrastination), I've been avoiding posting because I've wanted to switch my blog over to running on my webserver. I finally built up enough interest in starting a build log for another project (a huge fish tank that suddenly became a challenge instead of a tedious bunch of gluing and waterjetting) and decided it was time to switch my blog over. I've imported my old posts and comments, although comments don't seem to be attached to the posts yet. All my posts currently say they are posted by anonymous, that's another thing I'll be working on.

I'm going to start learning how drupal works better and possibly finding some useful modules. There's a few things I want to add, the least of which is a simple way for people to follow this blog.

I'd prefer to use Google Plus as a backend somehow for it's circles system. I'd love to be able to easily select between groups of people to send posts to, especially if it was linked to the work I already put into G+ to sort everyone. I'm thinking about poking the G+ API (I believe there are some unofficial ones, I don't know of any official ones) to use drupal as a way to display posts written on G+ with the same view permissions as would be on G+.

Anyway, my blog's url is now Please change your links accordingly. Shoot me an email at if you have any suggestions/feedback/complaints. You can try leaving comments here, I haven't really tested anything yet so I don't know what'll happen.

I'm copying this post to my blogspot blog so people I don't catch will be forwarded along to my new blog.

I have an rss feed set up now, unfortunately right now the only link is a tiny annoying button at the bottom of the page. To compensate, here it is:

Sunday, June 19, 2011

Mobile car chair

First, a little bit of backstory

From before I started going to miters earlier this year, there's been a car chair mounted on an old electric wheelchair base. Unfortunately it didn't work and didn't have a battery pack so it was hard to test. Earlier today I decided to see if I could fix it. Fortunately Shane tipped me off that electric wheelchairs often run at around 24v. I hooked it up to a DC power supply and it turned out it worked when everything is plugged in (with the power supply in place of the battery). In other words, all it needed was a battery.

Soldering the cells:

Heat shrunk & insulated the contacts

Charging the batteries:

Chair base sans-batteries

I forgot to take any pictures of it with the batteries inside and I didn't get any good pictures of it driving around (my phone crashes when I try to put it in video mode). Someone else took some video, hopefully I'll get that soon so I can post it. The chair now drives around very smoothly and has space for at least 4x the batteries I put in it for increased range. It still needs a good mount for the controls and possibly a better interface. Odds are it'll make an appearance next time miters has a booth for something.

Sunday, June 12, 2011

3d printing, new design

Change in main structure, now I'm planning on building my printer with 1/4" acrylic. It's waaaay cheaper than making it out of aluminum and will be lighter. It's also much easier to build an enclosure so I can heat it instead of just having a heated build platform. Airflow for working with PLA will be harder, I'll just have to build it into the design instead of propping a desk fan up pointed into my printer like I did with my makerbot.

Switching to t-slot construction makes designing and machining the parts far easier. Also I don't have to worry about the machine racking like I would have had to with the earlier design.

For comparison, here's the old and new designs. The shafts aren't structural, they're a part of the design I haven't put in the new version yet.



The new design is about the same size as the old one, but it's much easier to scale. It doesn't need nearly as many slots as it has. I put in so many since it's easier in Solidworks to pattern the slots like that than only putting a few in. As far as I know, the main difference will be it'll take a little longer to cut it out.

Wednesday, June 8, 2011

More door fun

Continuing on with fun things about my door. A few days ago I finally got around to turning my door into a speaker. It's actually pretty simple. Four transducers (horribly simplified, they're the part of a speaker that moves to make noise) are hot glued to my door. They're wired up in pairs in series, one is the left and one is the right channel. Both pairs are hooked up to an awesome little class D amplifier which is duct taped to my wall and plugged into my computer. In short, my door is now another audio output for my computer. My motherboard's left channel is dead so I can only use half of the transducers at the moment but I'm getting a cheap usb sound card to be dedicated to being the output for my door.

Sketchily mounted amplifier with volume control

Doorbell v2.0

I'm bored and don't feel like going to sleep yet. Guess that means it's time to catch up on some of my projects!

I fixed up my doorbell to be much less sketchy. Now, a 555 timer constantly runs at a visible duty cycle (around 17 hertz), driving a 2n7000. When the button is pressed, the voltage source is connected to a 1000uF capacitor and powers the LED. When the button is released, the capacitor discharges through the LED and another resistor to make it drain faster. I probably should have a resistor in series with the LED, but the LED I'm using is tough and a good brightness without any resistor. I'm relying on the fact that the voltage source has some internal resistance for current limiting. Here's the circuit and the new setup:
New setup outside, aluminum tape as wires. I'm great at neatly aligning tape aren't I?
I had to reinforce the connection on the inside with hot glue since aluminum tape isn't very structural.
The circuit itself. The blue LED that's on is something else.

Sunday, June 5, 2011

Motorized scooter

A while ago, I decided I wanted to build a motorized scooter. Brilliantly, I decided I wanted to build my own motor. I'm still pretty sure I could given more time but it'd be tedious and require a lot of redesigning. I might go back and try to do that in the future.

In the meantime, I've decided to switch to a brushless DC outrunner motor from Hobby King.

It should be a lot more powerful then the hub motor and I can use it with the same controlled I had bought for my hub motor. I'm switching to a belt drive and redesigning the back of my scooter a little. My current wheels are a little small so I'm springing for some nice 8" wheels from I still need to finish the design of the mount and figure out how to build it, but I might jump ahead and order everything I need for the belt drive. Almost everything else can probably either come from around MIT or McMaster so it won't take as long. Hopefully I'll be zooming around with a motor in the next few weeks.

Saturday, June 4, 2011

Sad scooter

While I was riding back from MITERs earlier tonight I noticed something strange was happening with my scooter's steering...

Didn't there used to be a nut there?

I have no idea when it happened (I didn't hear it), but the nut I had on the front wheel unscrewed itself and the screw had slide out so far the spacer on the inside of the fork (adjacent to the wheel itself) also fell out. My wheel looked like it was a few seconds from falling off when I noticed it. The fork ripped the hub up a little but it's nothing too bad, it's just superficial damage. I carefully rode it back to EC sans-nut since I was too lazy to walk it back. It should be a really simple fix. I just need to machine a new spacer, find a new nut and get some locktight or something similar to stop this from happening again. I guess I'll be walking to MITERs tomorrow.

3d printing!

The start of a gantry 3d printer. The toolhead will move on the X and Y plane and the build platform will move along Z. If it turns out as planned, it'll probably have a build area of around 10"x10"x12". Most (possibly all) of it's structure will be aluminum angles and bars bolted together. I haven't figured out a good way to keep all the joints straight yet but that shouldn't be too hard.

Wednesday, May 25, 2011

Very crude password generation

Generates 25 passwords which alternate between the left and right hands for each character, have alphanumerical plus symbols and never require holding down shift. Coded while playing Super Smash Brawl at 3am so I bet there's a million horrible things about it.

import random

alpha_left = ['r', 'q', 'w', 'e', 'r', 't', 'a', 's', 'd', 'f', 'g', 'z', 'x', 'c', 'v', 'b']
num_left = ['1', '2', '3', '4', '5', '6']
symbols_left = ['`']
alpha_right = ['j', 'k', 'l', 'n', 'm', 'h', 'y', 'u', 'o', 'i', 'p']
num_right = ['7', '8', '9', '0']
symbols_right = [';', "'", '[', ']', '.', ',', '/', '-', '=', '\\']

left = [alpha_left, num_left, symbols_left]
right = [alpha_right, num_right, symbols_right]

def gen_pw ():
passwd = ""

for i in range (8):
if i % 2:
cata = left[random.randrange (3)]
cata = right[random.randrange (3)]
passwd += cata[random.randrange (len (cata))]

return passwd

def check_pw (p):
has = [False, False, False]

for c in alpha_left:
if c in p:
has[0] = True
for c in num_left:
if c in p:
has[1] = True
for c in symbols_left:
if c in p:
has[2] = True
for c in alpha_right:
if c in p:
has[0] = True
for c in num_right:
if c in p:
has[2] = True
for c in sym1ols_right:
if c in p:
has[2] = True

if False in has:
return None
return p

pwlist = []
while len (pwlist) < 25:
tmp_pw = check_pw (gen_pw ())
if tmp_pw:
pwlist.append (tmp_pw)

print pwlist

Wednesday, May 11, 2011

Door + electronics

So far it's just a couple status LEDs (door open/closed and a "doorbell") and sketchy wires but I'm planning on cleaning it up once I have time.
All the resistor values are completely arbitrary, I grabbed them at random and they work. If I thought it through I could probably get the LEDs a little brighter but it doesn't matter too much. The only important things are that the resistors are large enough so the LEDs don't burn out and R2 has to be small enough to pull enough of the current so the LED doesn't turn on.

Left LED is red, right LED is green
Bare wires, when you short them together the red LED turns on. I'm planning on putting a nicer button here
Aluminum tape on the door and weather stripping (convenient for sealing a door and guaranteeing good contact!) with wires duct taped on each contact, since only the non-sticky side of aluminum tape is conductive.
All of it together:

EDIT: As several people have pointed out, it would be smarter to do the door switch with a transistor. The reason I didn't was because the circuit got about a minute of thought (if that) and I just grabbed a few parts near me.

Electric scooter

Mid February, I decided to build an electric scooter. Unfortunately I didn't write up what I was thinking along the build, but I took a lot of pictures. I finished the majority of the mechanical work (minus mounting the motor and I still don't have a brake) in late March and have been using it as a kick scooter since then. When I'm done, it will have a hub motor I built, a motor controller I bought, and as many batteries as I can possibly back into the base. I'm hoping for a 10 mile range but I have no idea how efficient the motor will be yet.

Pictures and write-ups of some of the choices I made and the ways I built things coming soon, finals week is coming up so I'm short on time.