Saturday, January 28, 2012

(Actually) switching sites

This time, it's for real. I've spent a bunch of time making a new site to replace this and alex.willisson.org, and, with the help of my dad and one of his coworkers (a great artist) I've finally finished my new site, http://oldspeak.us/. My new feed URL is http://oldspeak.us/atom.xml

From now on, all my posts will be on oldspeak. I'm retiring this blog and I replaced alex.willisson.org.

Wednesday, January 18, 2012

Pseudoscope prototype parts

I just ordered the parts for the first prototype, I should be able to make at least two pseudoscopes out of the parts that I ordered, I doubled up on the one item I wasn't sure if I had enough parts for. Since I'll be lasercutting everything, each one can be a new version. Here's the McMaster order I just made:

One 8712K57 - ABS Rectangular Bar, 1/4"  Thick, 3"  Width, 2'  Length
One 8712K34 - ABS Rectangular Bar, 3/8"  Thick, 2"  Width, 2'  Length
One 94323A301 - Knurled Head Thumb Screw with Shoulder, Black Nylon,
6-32 Thread, 1/4"  Length, packs of 100
One 91773A108 - 18-8 Stainless Steel Round Head Phillips Machine
Screw, 4-40 Thread, 3/8"  Length, packs of 100
One 90279A197 - Zinc Plated Steel Round Head Phillip Machine Screw,
8-32 Thread, 3/4"  Length, packs of 100
One 1518T52 -  Mirrored Extruded Acrylic Sheet, Adhesive Back, 1/8"
Thick, 12"  X 12
One 90480A009 - Zinc-Plated Steel Machine Screw Hex Nut 8-32 Thread Size, 11/32" Width, 1/8" Height
One 90480A005 - Zinc-Plated Steel Machine Screw Hex Nut 4-40 Thread Size, 1/4" Width, 3/32" Height

Two 8586K162 - ABS Sheet, 1/8"  Thick, 12"  X 12",  Black


So with shipping, it should still be well under $100, making at least two (possibly four or six) pseudoscopes. To make even more, I'll only have to order more mirrors and 1/8" thick ABS. Pretty much everything in this list was picked to be the cheapest possible. I'm not sure if I need the nylon thumb screws, they're to be a set screw to fix the large mirrors in place. I specifically picked nylon because I didn't want it scratching the ABS, but I'm not sure if I'll be able to get enough friction out of it. Hopefully it'll jam the mirror's pivot when screwed in without shifting the mirror too much to work. Another possibility would be to use any material thumb screw and a small rubber ball, but that'd be annoying to deal with and I'm aiming for simplicity in assembly for this design.

Once I get the design nailed down (hopefully with these parts or one more order), I'll learn how to use Ponoko and set it up there. I'll make sure a fresh set of parts from Ponoko works without any modifications, and I'll post the designs so people with a laser cutter can make their own. I'll also post assembly instructions, although the whole thing is really straightforward.

The main thing I'm not sure about for the design is how to hold it. My current plan is to pay attention to how I naturally attempt to hold the prototype and adjust the design so that way is easier. I suppose I should also grab someone left handed and have them to the same thing. I can probably use some scrap pieces to design a handle instead of having to buy more materials to figure out what it should be like.

I think a single pseudoscope of the current design uses about $18 of materials, including scrap. That's excluding laser cutter runtime cost, the cost of extra nuts & bolts that aren't used, shipping and tax. If my estimations are right (they're a little pessimistic about material used, but the measurements are from memory), I barely need to make this any cheaper. The main expensive part (the reason that this first order is near $100) is the fact that I didn't pick my parts well. I have to order a lot of extras because there isn't a good way for me to buy just the right amount of everything.

SOPA/PIPA

While I haven't blacked out my site, I support the opposition to SOPA/PIPA and internet censorship. I think the internet blackout of many sites today is a great idea, although sadly sites which are tailored to less techie people didn't participate (most notably to me, Facebook and Twitter. I feel like either one of those blacking out at least partially would have been massive). Here's an email to a mailing list I'm on with a collection of a few related links. I'm thinking about doing a writeup of all the sites I can find which are blacked out what who the supporters of SOPA/PIPA are, but I'm really busy right now working on a new site and cleaning up old backups. If you're interested in learning more about SOPA/PIPA and the internet blackout, ars technica has a lot of good articles about it.

Date: Wed, Jan 18, 2012 at 12:31 AM 
For those who don't know, a bunch of sites on the internet are going dark or otherwise opposing SOPA. Wikipedia went down earlier and will be down for a little under 24 more hours, reddit will be going down in 8 hours for 12 hours. Google blacked out their logo on searches and made a good series of sites talking about SOPA and PIPA. Sadly, Facebook, Twitter, and many other big sites decided to not join in. Here's some related links:

http://arstechnica.com/staff/palatine/2012/01/sopa-resistance-day-begins-at-ars.ars
http://www.reuters.com/article/2012/01/18/us-internet-protest-idUSTRE80H01U20120118
http://arstechnica.com/tech-policy/news/2012/01/google-scribd-and-wordpress-to-join-sopa-protest.ars
http://arstechnica.com/tech-policy/news/2012/01/wikipedia-to-join-reddit-in-sopa-blackout-wednesday.ars
http://arstechnica.com/tech-policy/news/2012/01/sopa-livesand-mpaa-calls-protests-an-abuse-of-power.ars
http://blog.reddit.com/2012/01/stopped-they-must-be-on-this-all.html

Conveniently, Wikipedia left the SOPA and PIPA articles available:
http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act
http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative
http://en.wikipedia.org/wiki/PIPA
http://en.wikipedia.org/wiki/Wikipedia:SOPA_initiative/Learn_more

http://www.fsf.org/
https://www.eff.org/
https://www.google.com/landing/takeaction/
http://sopastrike.com/

If you're near San Francisco, you might be interested in this:
http://www.hackersandfounders.com/events/48317262/?eventId=48317262&action=detail

Tuesday, January 17, 2012

Pseuoscope, part 2

I've gone through the original cad and put in the details, as is this should work as soon as I order all the parts. I'm still not sure about mirrors, I'm going to try adhesive-backed mirrored acrylic but I'm not sure. Especially because the pseudoscope I've studied some uses front surface mirrors for the mirrors near eyes. I'm also worried about laser cutting mirrored acrylic, hopefully I can just flip it over and cut it. I'm looking into it before trying it out.

I think the first one will cost around $55 + shipping and tax, but some of the costs are for nuts and bolts (where I only use a fraction of them). I could also make it much cheaper by being more intelligent with the design and using less expensive suppliers than McMaster. Also, there's a lot of wasted material because the parts aren't designed well to fit in less of a cutting area.

Friday, January 6, 2012

Pseudoscope!


I'm designing a pseudoscope! In short, a pseudoscope switches the images going into your eyes (what would go into your left eye goes into your right, and vice versa). My dad was playing with a paper kit for one around christmas, and it didn't work very well. Unfortunately the paper just didn't hold together well enough. However, he suggested I should design one that can be laser cut, write up instructions for instructables and possibly post it on ponoko.com. So here goes, the plan is to make it out of plastic so it won't warp, and to have all of the assembly to be done with screws so it can be redone (no glue). All machining should be with a laser cutter, but I'm considering drilling out the holes, at least for mine.

Here's my rough draft CAD. The gap is where your nose fits. The two planes near it are mirrors, which reflect the light coming in from the large mirrors on the opposite side into your eye. The large mirrors are designed to pivot, so it can be adjusted to the user. Also, it makes it easier to design. I'm currently planning on doing this with a basic t-slot design which I've used before, partially because it's easy for me to design and partially because it's a very easy way to design things for other users who might try to follow my design.

There isn't much more to do before I start prototyping it, but I'm still looking for a good mirror supplier. Once I figure out what size mirrors I want, I'll order the first set of parts and start experimenting.

This should be an interesting project, it's my first which I'm partially designing to be easy for other people to replicate.

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 http://us.battle.net/wow/en/blog/3710218. 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
Oops
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.