Archive for June, 2010

Dropbox

Wednesday, June 30th, 2010

You’re all web savvy people so you’re already using Dropbox, right? If not, you’ve got to check it out. It’s an amazing tool and website that lets you store and sync files across any computer (at home, at work, Mac, PC, linux, etc.). I use it so a bunch of friends can work together on a project and to keep files in sync between home and work. If you’ve ever found yourself emailing yourself a file, use Dropbox instead.

(Also, if you use the link to Dropbox from this post, I’ll get a free extra 250Mb of storage so give it a shot. It’s free!)

Holograms Video in Japanese

Monday, June 28th, 2010


http://www.youtube.com/watch?v=Mo3DjI6N1go

So … I normally sell, like, 10 copies of my iPhone app “Holograms” per day. It’s not a huge seller but I’m happy that people keep on buying it. But on Saturday, 241 people bought Holograms! I looked into it and saw that they were almost all coming from Japan. Why are they buying it? I have no idea.

But if a country is willing to buy over two hundred copies of one of my app on a single day, that ought to be commemorated in some way. And since I happen to sort of speak Japanese (not great, but hey, better than George Takei) I decided to try to make this demo video in Japanese. I also added English subtitles in case any English speakers were curious.

Mach Dice Available in Brazil!

Friday, June 25th, 2010

A while ago, I mentioned that my dice rolling app, Mach Dice, wasn’t available in Brazil. It turns out that iPhone games aren’t available in certain countries. Weird, hunh?

Since Mach Dice isn’t really a game, I removed the games category and now it’s available in Brazil! (And possibly other countries…) I’m not sure how long I’ll keep it that way, but it’ll stay there at least this weekend. So if you’re in Brazil, buy Mach Dice now!

Slay

Wednesday, June 23rd, 2010

My brother pointed me to this simple little strategy game called Slay for the iPhone / iPad (it’s one of the few apps that I’ve seen that actually natively supports the iPad’s native resolution).

The game only has a few different types of units: peasants, spearmen, knights, and barons. And the rules are very simple: each unit beats the ones below it and they become much more expensive as they get higher. And the object is to take over the entire map. But the game has incredible layers of strategy where you have to balance between expansion and defense. If you are too aggressive, you risk getting cut off and losing all your units when they go bankrupt. Play too defensively and your opponents will become unstoppable.

If you’re into strategy games at all, check it out! There’s even a free trial version. My general strategy tip is to try to consolidate your lands and push out to a border where you can defend a little easier.

Father’s Day

Monday, June 21st, 2010

Yesterday was my very first Father’s Day as a dad. I spent the day trying to focus on all the stuff that I didn’t do before I was a dad: changing diapers, feeding the baby, working on my car… Just kidding. I don’t know the first thing about cars.

But it got me thinking how different our generation is from the previous one. My dad never changed a diaper in his life and that was probably common of the fathers in his generation. (Or maybe not, he was really fastidious, so that might have just been him.) Heck, my brother made his kids baby food from scratch. On the one hand, it might seem like our dads had it easier back then. But I think that we just have more options as dads now. We have the opportunity to take part in things that just weren’t a part of a man’s world before.

In a strange way, though, owe a lot of that to my dad. I mean, he wasn’t exactly breaking gender role expectations, but he was always encouraging me to explore new territory and do things differently. If he were alive today, I’d like to think that he’d look at all the things I do with my own son and smile and say, “Good, good.”

Go See Toy Story 3!

Friday, June 18th, 2010

I don’t talk about my day job much on my blog but for the past year or so, I worked on a movie that comes out today. It’s a movie based on a once-unknown franchise but is now nearly a household name. A movie with everything in it: a sweeping musical score, Academy Award winning actors, humor, and passion. A movie about universal themes like good and evil … love and loss.

I am, of course, referring to Jonah Hex.

Just kidding! No, I didn’t have anything to do with that movie, although they do both start off in the Old West… Anyways, go see Toy Story 3. I saw it and I laughed, I cried … I loved it. To be honest, it was a little daunting to work on a movie with that much of a legacy. I mean, it’s a pivotal movie for any of us working in computer graphics today. But I feel that we succeeded in making a sequel worthy of the first two Toy Story movies. I hope you’ll agree.

Space Miner

Wednesday, June 16th, 2010

One of the best game purchases I’ve ever made was Space Miner: Space Ore Bust. You could say it’s just a simple asteroid mining game, but it’s so much more. There’s ship upgrades, cute art, and hilarious dialog. I’ve played it through more than once and now my wife’s hooked as well.

If you’re looking for a fun game that’s easy to pick up, check it out:

RSS Notifications for Twitter Replies

Monday, June 14th, 2010

I’ve been using Twitter now for a couple years and built up a modest following of 138 followers which is about 130 more people than I would have expected. I mean, it’s not like I’m talking about the making of Toy Story 3 or something, which I could see as being of interest to a more general audience. No, I just post random things that are amusing to me and hopefully a few friends.

So anyways, as a somewhat infrequent user, I don’t check Twitter that often. And on the rare occasions that someone replies to one of my tweets, I’ll often miss it. This wouldn’t be a problem if Twitter had email notifications for replies, but strangely it doesn’t. Oh sure, there are ways around that, but they seem to involve giving your password information, or setting up a Yahoo account, or using a defunct API, etc.

Fortunately, it’s easy to set up an RSS notification for your replies:

  • go to Twitter
  • do a search like “@machwerx”
  • click on the “RSS feed” link at the bottom on the right
  • add that URL to your RSS reader

Adding a Depth Buffer

Friday, June 11th, 2010

Apple does a great job of making sample code available and starting you off with simple templates to build your apps. But one thing I’ve found lacking is that the default OpenGL ES template (and GLSprite sample code) don’t have a depth buffer. I’m like, “Seriously? How can you do a 3D graphics demo or template without including a depth buffer?!”.

So here’s how you do it. First, enable depth testing somewhere in your graphics initialization code (like, say, the “– (id)init” function of ESRenderer1.m or whatever file has the OpenGL calls in it) as follows:

// enable depth testing
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);

Then, be sure that you’re clearing the depth buffer in your render loop. There’s probably a glClear() function call in there somewhere. Replace it with this:

// clear depth buffer
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Now, finally, you’ll need to be sure that depth buffer is created once the render buffer size has been determined. If you’re using the GLSprite code or creating from an OpenGL ES template, this would be in the “– (BOOL)resizeFromLayer:(CAEAGLLayer *)layer” function, right after backingWidth and backingHeight have been set by glGetRenderbufferParameterivOES(). Here’s what you add:

// create depth render buffer storage
glGenRenderbuffersOES(1, &depthRenderbuffer);
glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);
glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight);

Oh, you’ll also need to add a “GLuint depthRenderbuffer;” to the appropriate header file, but you probably figured that out when you tried to compile the stuff above, right? Very good.

See you next class!

UPDATE: You should probably delete the depth buffer in your dealloc code as well. Here’s the code for that:

// delete depth buffer
if(depthRenderbuffer) {
glDeleteRenderbuffersOES(1, &depthRenderbuffer);
depthRenderbuffer = 0;
}

New Version of WordPress

Wednesday, June 9th, 2010

Hey, notice anything different? Yeah, me neither. But recently my web hosting company, In Motion Hosting, told me that they’re upgrading PHP and Apache. What does that mean? I have no idea. But they said that older versions of WordPress might not work with the new stuff. I’ve been meaning to upgrade for a while (I was at version 2.6 and now it’s up to 2.9.2) so this just forced me to stop putting it off.

Fortunately, WordPress has a very handy guide on upgrading. The only tricky thing was to make sure that I didn’t overwrite my old plugins and themes.

Hopefully, you guys won’t notice any difference. For me, it means that it’s a lot easier to keep up with the latest plugins (mostly to fight spam). But if you notice anything wrong with the website, let me know!