rob terrell

sneeze ack sneeze rob terrell ack cough cough ack

Skip to: Content | Sidebar | Footer

Marshall’s First Haircut

10 April, 2009 (10:05) | Uncategorized | By: robterrell

I liked his long hair — if we averaged the hair length of all persons named Robert Terrell in this house, it seemed like I still had a good head of hair — but a boy can be called a girl only so many times before his mother decides to Do Something.

Tiger and stringWithContentsOfURL:

28 October, 2008 (14:32) | Uncategorized | By: robterrell

Let’s avoid back-to-back Halloween postings (which means, I left this blog unattended for a year) with a little technical update on TubeSock. (To cut to the chase and download the latest TubeSock, click here.)

Almost immediately upon releasing TubeSock 3.0 beta 17 on Friday, I received reports of its total and utter failure. Beta 17 worked fantastic here, so it took me a day to figure out that the problem was only happening on Tiger (10.4), and then another day to figure out the problem.

The problem was (and I mention this primarily so that, if I Google for this same problem in the future, I’ll find the answer!) that some sites send their web pages gzipped. That is to say, when your browser asks a web server for a page, it mentions in an offhand fashion that, if the server might want to compress the page with gzip before sending it, that’s cool with the browser. All modern browsers do this (accept gzipped pages) and some sites take them up on it, because for a really busy site, it can save a boatload in bandwidth charges.

Tiger has a string method, stringWithContentsOfURL:encoding:error: that basically acts like a browser; it goes to the URL you specify and returns a string with the contents of that page. However, Tiger says “hey, gzip is cool with me,” but then when some server has the temerity to actually deliver gzip, it freaks out and returns an empty string with the error 261. At first blush this looks like some kind of encoding error, like the server was sending text in some bizarre unicode code page no one’s ever heard of. If you ask what the string’s NSStringEncoding is, you’ll get a bogus value, and if you try to dig into the error object and figure out what exactly went wrong, you’ll slowly go insane.

The solution (which we actually figured out for TubeSock 1.0 but, since it was fixed in the wondrous Leopard and Cocoa Touch, forgot about) is to grab the page using NSURLConnection. For some reason it properly un-gzips the returned page before doing anything with it, even in Tiger.
So that was the whole problem with beta 17. The solution we employed was to add a category (which is basically an override, making our code run instead of the operating system’s) to stringWithContentsOfURL: which does our little trick instead of using the operating system’s potentially buggy routine.

And that’s how I spent my weekend. How was yours?

Boo 2007!

2 November, 2007 (10:40) | Family | By: robterrell

This year we’re working through a Wizard of Oz obsession. Well, except for Paden, who was a forest fairy. And Marshall, who was a skunk. Okay, we’re only 50% obsessed with the Wizard of Oz, but it feels like so much more. Click to see larger:

Summer pictures

28 July, 2007 (10:51) | Family | By: robterrell

Hey, the iPhone takes some decent pictures after all!Jason and Sally were kind enough to give him boots, but by the time they arrived, his feet were too big for them. But they fit on his hands nicely.I’m not sure which one will be the troublemaker. Probably all three.Honestly, he loves the bjorn. Honest.

Marshall Terrell

10 May, 2007 (22:36) | Family | By: robterrell

Robert Marshall Terrell V.
Born May 10, 2007. 8 pounds, 13 ounces, 22 inches long.













Edit: By request, a picture of Marshal with his daddy:

Just to be clear, I’m not quite egotistical enough to name him after myself. Michell picked the name. He’s named after his great-grandfather, Robert Marshall Terrell Jr., my grandfather.

10 May, 2007 (15:58) | Family | By: robterrell


Meet Marshall. Born at 3:11 pm on 5/10/07. 8 pounds, 13 ounces. 22 inches long. More pics to come!

In L&D…

10 May, 2007 (10:15) | Uncategorized | By: robterrell

It’s 11:11 am, we’ve been at the hospital for almost four hours. Michelle’s water has broken, so the baby is definitely coming today!

3D Ultrasound

14 February, 2007 (23:05) | Uncategorized | By: robterrell

 


Meet Marshall. Estimated date of arrival: May 12. Estimated weight: 10 pounds. Estimated SAT score: 1600. 
   

Wii Remote + Torque Game Engine: Download Now!

20 December, 2006 (23:40) | Games, Mac, osx, wii | By: robterrell

For the doubters, I have put together a binary OSX-only release of the Torque Game Engine with the Wii remote control code. I’m hoping a few people will give it a try. Let me know in the comments if you find any bugs.

Download .zip here (45 MB)

It’s a (mostly stock) TGE binary using the default starter assets. I’m sure you’re familiar with the basic idea — run around and shoot everyone else. Obviously you’ll need a Mac with bluetooth running OSX and a Wii remote.

Some notes:

  • When the app starts, press the Wiimote’s red “Sync” button (inside the battery compartment). You can also press the “1″ and “2″ buttons simultaneously, but sometimes I get better luck with the red button for IR mode. If the connection is successful, the Wiimote will give a short (.2 sec) rumble. If the rumble goes on and on, something went wrong, so just hit the red sync button again.
  • It defaults to tilt-sensor mode, so if you don’t have an IR bar, you can still give it a try. If you do have an IR bar, press “2″ on the remote to turn IR mode on. If you want to make your own sensor bar, here’s how I made mine.
  • The controls are pretty basic. Point the Wiimote where you want to go. (If you’re in tilt-sensor mode, tilt left and right.) Press the Wiimote “A” button to move forward. Press the Wiimote “B” button to fire. You can also use “B” to click on GUI buttons.
  • If you quit via a Carbon event (i.e. Command-Q) the Wiimote will be properly reset. If you quit from a GUI button inside the game (i.e. the “Quit” button on the main screen) it won’t. Not a big deal, but I just thought I’d mention it.

If you’d rather test your Wiimote with something much smaller, try the WiiSaber app below. It’s only 29k. A bit smaller than 45 MB… but not nearly as fun.

If you have any questions, comments, or bug reports, please post in the comments. Thanks!

WiiSaber, the Wii Remote enabled lightsaber simulator

18 December, 2006 (22:26) | Uncategorized | By: robterrell

Download this app. Launch it. Press the red “sync” button on your Wii Remote. Then:



(a) hold remote in hand, like a dork pretending to hold a lightsaber.

(b) swing it around, like a dork pretending to be a Jedi.

Get yer geek on, fanboys!

I took the saber rendering code a a forum posting on gamedev.net, but obviously the controls have been changed over to use the Wii remote. It’s only doing two axes (pitch and yaw) so you don’t need one of those fancy homemade IR sensor bars.

Fun fact: the application zip is 29k. The jpeg above is 35k.

Wii Remote + IR working with Torque Game Engine

17 December, 2006 (23:11) | Games, Mac, osx, wii | By: robterrell

Status of my project to integrate the Wii remote with the Mac OSX Torque game engine: done!

Sunday night I got everything working. With the homemade sensor bar over the monitor, the IR code added to the game engine, and some decent AI opponents added to the game, it was finally ready.



(There’s also a higher quality QuickTime movie if you prefer that.)

Running around the game world and blasting Orcs with just the Wiimote is pretty fun. I’m going to try to reduce the sensitivity a bit, change the Wiimote to use one-dot mode (so you don’t have to back off three feet from the computer), and cleanup the assets for a binary release. That’s right, you get to play it too.

If you want more technical info, keep an eye on my .plan at GarageGames where I’m planning on posting the source code to everything I’ve done. And let me also add that everything I’ve done is possible thanks to the DarwinRemote folks. At this point I have absolutely shredded their code into little bits, but without it I would have been stuck tracing bluetooth packets and given up long ago.