Category Archives: Programming

Telecommuting In Style

I’ve been working with an indie game dev studio based on Vancouver Island for a while now. Normally, when my boss Denny wants to know what any one of the team is doing, he’ll just walk up to a station, look over a shoulder, and ask questions. Similarly, when anyone else needs to show something quickly, it’s trivial to wave someone over and get on with things. When half of the company works in Vancouver and the other half works in Austin, however, that all goes out of the window. It’s not uncommon for the process of explaining something over Skype to be clunky and more time-consuming than it would be if we were all in the same office, and this becomes much more of an annoyance during crunch time.

Earlier this month, Denny and I found ourselves repeatedly having the same weird conversation–he would ask me what I was up to, and I’d tell him I was too busy working to explain what I was up to. It’s funny the first time, but gets old pretty quickly, and doesn’t really keep anyone clued in.

So, to fix that, I put together a Boss Stick. I call it that because it lets me put my boss on a stick so he can look over my shoulder from 2300 miles away.

boss_stick1

On the hardware side, it’s just a photographer’s light stand with a telescoping boom arm, a quick-detach ball mount, my trusty Logitech C920 HD webcam, a Smith Victor reflector lamp with a daylight CFL, and 16 feet of USB 3.0 cable.

On the software side, I upgraded to a Skype premium account (the quarterly plan’s a good deal!) for the group video chat and screen sharing features. I also set up a Flash streaming server account with Onyxservers and use that to stream a live feed to the other office during working hours. Topping that off is ManyCam Pro acting as a video mixer/switcher, which allows me to use multiple video sources and cut/transition between  them as needed.

This setup has already proven its utility several times over by allowing me to demonstrate works-in-progress and show hard-to-describe issues over live video, and Denny can see exactly what I’m working on just by tabbing over to my video feed when he needs to. We’re in the process of setting up something similar for the Vancouver office, which should be fun.

The other nice thing about the Boss Stick is that it’s also going to come in useful when I do more papercraft videos in the future. I always have a blast shooting those, and it’ll be nice to actually work with the ideal camera angles that I couldn’t get before with a small table tripod.

Scribus is pretty cool!

I’ve got a cold, but felt okay enough today to come into the office for a couple of hours.

I’ve been playing around with Scribus (an open source DTP/layout program) a little bit over the past few days. It had a problem that forced all PDF layers to print regardless of whether or not they were visible, so you couldn’t use it to create the kind of neat layered PDFs that Fat Dragon, Dave Graffam, and some other companies were doing for their paper models, so it never really entered my workflow.

I was doing a routine Google search on the subject of layered PDFs when I came across a Scribus bug report filed by one of the Cardboard Warriors forum regulars, and the Scribus devs were sort of dismissive and blew it off for a few years. One of the comments in that bug report got my attention, so I put together a quick test PDF and opened it up in Notepad++.

Sure enough, simply deleting the optional /Usage instruction lines fixes the problem and makes layered PDFs work correctly. So, if you want to do layered paper models in Scribus, just do this:

  1. Create your layered PDF in Scribus as you normally would.
  2. Export as PDF. Make sure you choose PDF 1.5 or higher, and tick the box for keeping layers.
  3. Open your newly generated PDF file in Notepad++ or another similar text editor that can handle large documents.
  4. CTRL-F, find all occurrences of “/Usage” (without quotes).
  5. Delete all of these lines.
  6. Save the PDF. Done!

Scribus has another pretty neat feature: you can extend it with scripts written in the Python programming language. I’ve whipped up some quickie helper scripts that speed things up by automating as much of the boring parts of building a layered PDF as possible. I’ll be testing those a little bit tonight.

Fun With Localization

I implemented something pretty fun today. You know how I said a while back that the whole point of the experimental storefront was to push the envelope to ridiculous lengths? In that spirit, I added realtime currency conversion to the price widgets.

This is what you see in the United States, in a region outside of my sales tax responsibility:

This is what you would see if you were another unfortunate denizen of the Republic of Texas, where digital goods are somehow considered to be “tangible personal property”:

And now for the fun of it, some other currencies (GBP, CAD, and EUR):

Okay, here’s how it works. It polls OpenExchangeRates.org for the latest exchange rates, then saves them to the database. Every hour and 30 seconds afterwards, it polls OpenExchangeRates.org for a fresh set of rates. So, the storefront updates the rates every hour, shortly after OpenExchangeRates updates their values, and in between, the buttons and catalog price strings pull the rates stored in the database and apply them to the default USD pricing.

The actual PayPal transaction will probably still display in USD–I don’t have any foreign currency to test it with, and this is something I guess we’ll need to find out after the public beta starts, but I’m pretty sure it’ll still be transacted in USD as that’s the default currency in my account. However, the storefront rates will still give you a good ballpark figure in your own currency, plus or minus a few percentage points, and that’ll save you the bother of hitting up Google for a conversion for every item on the page.

About those few percentage points of difference…well, there are actually a few different currency exchange rates. The interbank rates are what large blocks of currency are traded at by banks and financial institutions, then there are the retail rates, which are generally higher and assessed against smaller amounts of currency. Most currency converters and the newspapers generally display the interbank rates, while the retail rates are what you get zapped with when you exchange cash in another country or make an international transaction. To address that, I’m planning to add both a “quoted rates are approximate at best” disclaimer and add an extra 3.5% to the displayed total to account for PayPal’s conversion fee, which should bring the displayed total pretty close to what you’d actually end up paying in a non-USD currency.

Work on the experimental storefront will be somewhat spotty over the next few days, since there are a few things I have to do over at WorldWorks. Nothing sexy, mostly just time-critical administrative stuff, so I wanted to post this update to tide you guys over in the meantime. 🙂

Ouch II: The Brainhurtening

I’m surfacing for air briefly so you guys know what I’m up to. 2 biggies:

First, the USSC gunboat has actually been more or less finished for the past few days. 15mm and 28mm sizes both. Second, there was a good reason for that post a while back about online shopping being unnecessarily sucky. 🙂

I’ve spent the last several days up to my elbows in some pretty cutting-edge stuff. HTML5, CSS3, AJAX, PayPal’s brain-hurting APIs for Express Checkout and Digital Goods, and more. I wanted to see, as an experiment, what I could do with that kind of power at my fingertips. So, it’s not really a production environment, it’s more of an experimental testbed that pushes the envelope.

I don’t want to bore you people with another textwall of dry technical details, so let’s just go to a couple of screen captures and go over the high points. Below, you can see a snapshot of the partially completed front page, with placeholder graphics. Just to give you a sense of where things will be visually.

Nothing too special there, just some news posts on the left side and what will eventually be a list of the last X new releases ordered from newest to oldest.

Okay, here’s the part that really made me work for it. This is the product page–ignore the placeholder graphics. I basically just grabbed the first promo on my hard drive and used it as a placeholder all over the place. This is where the fun stuff starts.

Below the header, on the right side of the nav strip, is a location widget. Instead of filling in crap at checkout, you just set your location on the nav strip. The first thing you’ll see is a dropdown selector for countries, then if you happen to select a country that has states or provinces associated with it, a second dropdown selector will magically appear next to it. That’s all it needs from you, a country and sometimes a state or province.

Below that, on the right side, you’ll see a price and a PayPal button. This deceptively simple looking arrangement required a staggeringly disproportionate amount of work to set up. Here’s why:

When you click it, the next thing you’ll see is a PayPal dialog right there on the same page.

When you click the Log In button, it pops up a secure mini-browser:

Then once you’ve logged in, it takes you right to the confirmation step:

Clicking on “Pay Now” returns you to the store, immediately displaying a summary dialog with a download link:

Note that I did NOT leave out any intermediate steps. What you just saw is literally what a PayPal account holder will see, step by step. I’m not kidding. That’s all there is to it. No forms to fill, just a simple PayPal login and a couple of simple button clicks. In fact, if you let it remember you, you can collapse the purchasing process into two clicks. Well, three, if you count closing that last confirmation dialog.

Okay, here’s another surprise. There is zero user account management. You don’t register or log in or anything like that. This part makes use of some pretty fun HTML5 functionality. Your download links, when you buy something, are saved to local storage on your own machine. It starts right after you buy something (note how the buy button has been replaced by a direct download link):

It’ll stay exactly like that, and the links don’t disappear unless you happen to delete your cookies and flush your browser cache. You don’t log in at all, you just visit the page and it’s all there for you. Now, if you deleted your cookies and flushed your cache, or you’re just accessing your stuff from a different computer, this is what you would see:

Uh-oh, no downloads found. However, here’s the other fun bit: syncing your downloads. All you have to do in order to sync your downloads is enter your PayPal email address and any invoice ID from any previous order:

Bam, just like that, your download shows up in your collection again:

Anyway, this is all a work in progress, and it’s very much an experiment. I don’t know how much of it is going to be practical in a production environment, and I’m pretty sure it won’t play nice with older browsers and what have you. But if you’re using a current version of a modern browser, it’s a fun peek into the future.

Some of the stuff under the hood, mostly to do with the PayPal API backend, will likely make it into the next version of the WorldWorks storefront, and having a separate experimental storefront lets me play around with some ideas and prototypes that we wouldn’t normally dare implement on a production storefront. 😀