Archive for July, 2010

Minesweeper in the RenderMan Shading Language

Friday, July 30th, 2010

One of the things I attended at SIGGRAPH was the RenderMan Users Group Meeting. At the end of the meeting, they hold an event called Stupid RAT Tricks where people present silly things they’ve done with their tools.

This year, I gave a brief presentation about the silliest thing I’d ever done with it: implemented the game Minesweeper in the shading language. It’s a little trickier than you might think because all the shading language does is let you control the color of a given pixel so I had to come up with a way to display numbers and grid, in addition to a way to place the mines, etc.

If you happen to have a copy of RenderMan and Slim, you can check out the source code. The comments at the top show how to load it. Enjoy!

Rounded Dice for Mach Dice

Friday, July 30th, 2010

I’m still working on this, but I’ve mostly got rounded 6-sided dice implemented for Mach Dice. I actually implemented rounded dice for my dice game, Boom Dice, but I hadn’t updated my code for the former project.

The only real issue is that the geometry to make all those nice round corners is a lot heavier than just a simple cube, which would really slow down those 100d6 rolls. So I think I’ll make it an option.

SIGGRAPH

Wednesday, July 28th, 2010

By the time you see this, I’ll be in Los Angeles attending SIGGRAPH. I think there’s going to be decent Wi-Fi at the conference and hotel, but I’ll be pretty busy the whole time so I’m writing this ahead of time.

It’s been a while since I’ve gone and I wasn’t even planning on going this year because of the baby and all. But I’m giving a few short presentations, so off I go.

I grew up in LA and now I’m going back for a business trip. It’s a little weird to feel like a stranger in the city I grew up in. It’s the sense that this thing I once thought I knew was never really there, like I grew up in some fantasy that didn’t really exist.

Day in a Life

Monday, July 26th, 2010

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

A friend of mine told me about Ridley Scott’s Life in a Day project. The idea was for people all around the world to shoot some aspect of their day on July 24th and then they collect all that footage and turn it into a documentary about that one day.

It sounded like a neat idea so I thought, “Sure! I’ll give it a shot” and started shooting … on July 23rd, a day too early to submit for the project. But since I had the footage, I thought I’d cut together a little movie about what a typical day in my life is like.

Fudge Dice for Mach Dice!

Friday, July 23rd, 2010

Have you bought my iPhone / iPod app, Mach Dice? It’s been, like, forever since I’ve done an update to it, right? Well, I’ve started taking one night a week to try to work on iPhone stuff and this week, I implemented fudge dice — one of the most popular feature requests I get.

What are fudge dice? They’re dice that have an equal number of plus sides, minus sides, and blank sides. Typically, you roll 4 of them and then add up the plusses and subtract the minuses to get a value from -4 to 4 in a rough normal distribution. But you can also add them to other dice, like a d10 in my screenshot.

The way you’ll create them in Mach Dice is to tell it to use a “d3”. Why d3? Because there are three possible values: plus, minus, and blank. There will also be a setting to let you use d3 as values from 1 to 3.

It’ll be a while before I submit an update because there are a couple other things I’d like to implement as well. But hopefully, it’ll be out in the next few weeks.

Ripping a Phonebook in Half (Sorta)

Wednesday, July 21st, 2010

I attempt to do a great many things in life, not all of them successfully. But sometimes failure is funny:

http://www.youtube.com/v/U_dc91ZrZaY

Exponential Growth

Monday, July 19th, 2010

In the first half year of his life, my baby has tripled in size while I have remained fundamentally the same. Now, I may not know a lot about babies, but I know math. And at this rate, baby “Mach 2” will overtake me in less than a year.

That’s okay, kids are all about surpassing their parents. I just didn’t think it’d be happening this soon. Although, I suppose I should have expected it. He was already way cuter than I was as a baby and I was pretty cute baby:

Dating Advice

Friday, July 16th, 2010

Dear Mach,

There’s this guy that I’ve been friends with for a couple years but now I’m starting to have feelings for him. What should I do?

TNK

Dear TNK,

You know, as a guy with extremely limited dating experience, I’m not sure that I’m the best person to ask this question of. But since you asked — if it were a guy in that situation, I’d want to hear something like, “Hey, I just wanted you to know I’m totally into you.” And bam! Problem solved.

What, too simple and straightforward? Well, I can suggest something more elaborate, but I have to warn you that my knowledge of dating is mostly fictional and primarily comes from John Hughes movies of the 80s. Try this: throw a birthday party but conveniently “forget” to invite everyone but the boy in question. And then (read this on my blog to see this in script format):

INT. TNK’S ROOM -- NIGHT

TNK and BOY are sitting alone in a dark room next to a sad birthday cake with SIXTEEN CANDLES.

BOY

I’m sorry that no else came to your birthday party.

TNK

That’s okay. I have a confession to make ... it’s not really my birthday.

BOY

...

TNK

You totally hate me now, don’t you?

BOY

No, I could never hate you. I knew it wasn’t your birthday.

TNK

(surprised)

But how?

BOY

We’re Facebook friends and I know your birthday is in May.

TNK

But then wh--

BOY puts his finger to her lips and shushes her. Their eyes meet. They totally make out. Like, hard core.

And bam! Problem solved. No, no need to thank me. It’s reward enough to know that I’ve made it possible for you two crazy kids to finally get together.

Coding Night

Wednesday, July 14th, 2010

One of the harder things about being an independent hobbyist developer is that there are just so many distractions: emails to respond to, internets to browse, twitters to tweet, etc. But one thing that I’ve found that really helps me focus is to get together with friends and do a coding night.

It’s nothing fancy, I just invite a couple friends who are also working on iPhone projects over and then we just sit and code. The fact that there are other people in the room gives me just enough pressure to keep on working on my project instead of checking out the latest weird video coming out of Japan.

Why There Isn’t an Android Version of Mach Dice

Monday, July 12th, 2010

Oh sure, there are several articles that point out how small the Android paid market is compared to the iPhone. And from anecdotal experience, that seems to bear out. Almost everyone I know with an iPhone has bought an app at some point but of the few friends that I know have Androids, none of them have ever paid for an app.

That said, it seems like a very powerful platform and if I had an Android, I’d probably try developing for it except for the fact that between a full-time job and a certain other thing occupying all my free time:


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