The Medium is the Message 50¢ Contact
 

Porting a Fixed-Function Game to a Programmable Pipeline: Part 3

Crush the Castle: iPhoneI’m porting Crush the Castle from a fixed-function, OpenGL 1 renderer to a programmable, OpenGL 2 renderer. In the last couple of posts I described how I separated my initial fixed-function renderer into three distinct classes:

  1. An abstract Renderer interface that the game itself talks to
  2. A concrete implementation of the Renderer interface that uses fixed-function OpenGL 1 (RendererGLES1)
  3. Another implementation of Renderer that uses programmable OpenGL 2 (RendererGLES2)

Today I’d like to show you what I had to do to port the fixed-function version of the renderer to use the programmable pipeline in OpenGL ES 2.0.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in Crush the Castle, iPhone, programming

Back from the Bing

All right Google, nevermind. I thought you were obnoxious. But after trying Bing for a few hours I see you’re still the best thing going.

Google’s recent interface changes may be noisy and toadying. But at least their search engine works. Bing’s doesn’t. Not well anyway.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in programming, technology

Goodbye Google

GoogleI never imagined this day would come. It seemed like Google would be my conduit to the internet forever. Why not? Who could beat it?

I never guessed that I would leave Google not for another, superior search engine, but simply because Google had turned fickle and annoying.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in culture, programming, technology, thinking

The Things You Learn in the Strangest Places

Dog-FoxMy daughter Kathleen loves foxes. Until last Friday she had never owned one. We bought her one that afternoon. Not a real one of course. As Dr. Desoto rightly observes in William Steig’s excellent story, foxes are “wicked, wicked creatures.”

Instead we bought her a small, hard, painted plastic fox that she picked out specially. She adored it.

That night as she got ready for bed she debated whether to name it “Reddy” or “Redders.” But while thus occupied, she accidentally dropped the fox into the toilet—a toilet already in mid-flush.

We heard her heartbroken wail as she raced down the hall. Redders—Reddy—was gone.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in Uncategorized, family

Porting a Fixed-Function Game to a Programmable Pipeline: Part 2

Crush the Castle: iPhoneThis series of posts is about converting an existing OpenGL 1 renderer into a “dual,” abstract renderer that can speak to either OpenGL 1 or OpenGL 2 depending on what the hardware supports. In the particular case that I’m working on, I’m taking Crush the Castle, which was written for OpenGL 1 hardware on the earlier iPhones and iPod Touches, and I’m expanding it so that it can also support the OpenGL 2 hardware on later iPhones, iPod Touches, and iPads.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in Crush the Castle, games, iPhone, programming

Porting a Fixed-Function Game to a Programmable Pipeline: Part 1

Crush the Castle: iPhoneI’ve started work on porting Crush the Castle from the iPhone/iPod Touch to the iPad. I thought I’d share some of the technical issues I’ve encountered while expanding the Crush the Castle renderer from an OpenGL 1-based system to a system that supports both OpenGL 1 and OpenGL 2.

When my daughter wants the iPad she asks for “the huge iPod.” That’s about right. Inside and out, the iPad is basically an exploding iPod.

One difference, though, is the graphics hardware. Older iPhones and iPod Touches used simpler graphics hardware that’s built on OpenGL ES 1.1. That’s the platform I built Crush the Castle on. The iPad uses a more modern graphics pipeline that’s built on OpenGL ES 2.0. From a programmer’s perspective, the big difference here is programmable shaders.

So my first job in bringing Crush the Castle to the iPad is upgrading the renderer from a fixed function, OpenGL ES 1.1-style system to a programmable, OpenGL ES 2.0-style system. If you’ve ever been interested in learning graphics programming with shaders, follow along with me and perhaps we can learn together.

In the articles that follow I’ll talk about iPhone/iPod Touch/iPad development. But much of what I do would apply to anyone working with OpenGL on any platform—PC, Mac, PS3, whatever. I’ll talk about OpenGL “ES”—the trimmed down, mobile version of OpenGL. But in practice, Crush the Castle runs on non-”ES” versions of OpenGL, so the “ES” is immaterial. I’m also working in C++. If you’re working in a different language, like Java, C#, or Objective-C, you’ll have to read between the lines a bit. But I’m mostly dealing in terms of design patterns that aren’t specific to any particular language, so the leap shouldn’t be too far.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in Crush the Castle, games, iPhone, programming, technology

Roll Along, Roll Along

LeafCoffee doesn’t taste as good to me as it used to.

Once upon a time my morning cappuccino would have me turning up my face and closing my eyes in a prayer of thanksgiving. Now I wait for a rapture that never comes. I stare into the froth of a caramel macchiato wondering where all the marvel went. I tweak the recipe—a little less foam, a little more sweet—but nothing ever brings me back to how it used to be.

It’s not just the coffee. The spring—princess of seasons—has lost the magic it once had. Who can be unmoved by a field of Texas wildflowers? Yet the spiders and mosquitoes and the early rising heat make me wish it was midwinter again.

Yesterday’s delights fade too soon. Still, today is not without its charms. My son is becoming a man, growing from child into peer and friend. In the evenings my daughters and I tumble into Wonderland (as told by Lewis Carroll—I’ll have nothing to do with the film). Every day I learn a thousand things both in my studies and through my teaching. I enjoy every day.

So old delights fade as new delights arrive. I’m sure that’s how it should be.

In college, my wife and I loved Jeremy Brett’s Sherlock Holmes. Recently we tried watching the old episodes. They were still fun, but a little tired. I can’t quite manage to completely forget the solutions to all Sherlock’s problems.

Although we can’t resurrect our love of Holmes, we have discovered a new love—Nodame Cantabile, an anime series about musicians in college.

It seems that joys have a way of rolling around.

This realization has led me to a resolution. Don’t try to regain the pleasures of the past. Enjoy the pleasures of the moment.

Tomorrow they’ll have faded too.

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in thinking

The Christian Storyteller’s Dilemma

Lucy and TumnusThere’s no good way to tell a Christian story.

The gospel is perennially uncool. Any story that points to the gospel runs the risk of inheriting its uncoolness. A Christian yarn may end up sounding like a sermon. It may come across as moralizing, over-hopeful, or lacking the secular sheen that modern readers demand. A story designed to draw people to the gospel may end up repelling them instead.

How can a Christian writer craft a story that appeals to the culture while pointing beyond it?

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in culture, faith, writing

January Blues

January is the most disappointing of months. The excitement of the holidays is over. We’re back to work with no end in sight. The weather remains dreary. It’s like Demember’s evil twin, with a turtleneck and goatee.

I wrote this song years ago to cheer myself up. Maybe it’ll cheer you up too.

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in music

Never in a Hundred Million Years Will You Ever Sell Your Game Idea to a Company

PS3 Sonar PatentA while back I posted an article on How to Get Your Game Idea Made into a Game. Since that article appeared I’ve received hundreds of emails telling me about ideas that you’d like to see made into a game.

I appreciate your openness in talking about your ideas with me. I applaud your drive in moving forward and trying to get your ideas made.

But your questions have made me realize that I wasn’t clear enough in my first post. So let me be clear.

Never in a hundred million years will you ever sell your game idea to a company.

Game developers never, ever, ever, ever, ever buy game ideas. Game publishers never, ever, ever, ever, ever buy game ideas.

Read More »

share:
  • Twitter
  • Facebook
  • MySpace
  • Reddit
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Bookmarks
  • Slashdot
  • Technorati
  • Yahoo! Buzz
Posted in games