The Enemy of Good

Have you ever refused to do something because you couldn’t do it perfectly?

There’s a proverb by Voltaire that says “Perfect is the enemy of good”. Basically, you can let yourself get so paralyzed by the thought of having to do something perfectly that you end up doing nothing at all – or worse! You can’t get a stain out of your carpet so you don’t clean it at all. You’re too tired to do your full workout, so you don’t do any of it. You can’t eat right at a restaurant so you pig out.

Deep-fried pizza, here I come!

It’s a trap I think we’ll all fallen into at one point or another – especially for perfectionists. “So what does any of this have to do with Wrack?” you’re probably NOT asking? This issue has plagued this very project! … or at least, it used to!

As you likely know from the screenshots, Wrack has directional shadows on most of its objects. During one of his playthroughs, Bobby Prince pointed out that the shadows were being cast on walls that objects were behind. Most of the time it wasn’t an issue, but sometimes…

Uh oh...

My response was that it would be really expensive to fix the problem. Sure, I could cut out faces that were facing away from the object, but you’d still have small issues. For instance, if an object was sitting on a ledge, and the shadow shone onto the ledge floor, the ledge wall, and the floor below, the shadow wouldn’t be present on the ledge wall, but it would be on the floor below – all the way up to the ledge wall. Obviously, that isn’t visually correct. You can see that on the image below.

See? Clearly total crap!

To really fix it, you’d have to build depth information so that when you project the shadow, you can tell if the shadow has been “blocked” on that pixel. Doing so would be harmful to the framerate, and not really worth it to do. Because I couldn’t completely fix it, I left the issue alone.

So, let me get this straight. Because I couldn’t completely fix that, I settled for this:

PICTURED: A bad decision.

Having to look at that abomination over and over, I eventually came to my senses. I put in the simple check to not have shadows render on faces that face away from the object, and while it’s not a perfect solution, it’s 95% better than it used to be. Honestly, the whole “ledge” issue is so rare that I’m not even sure it’s present in the first 3 levels. So, this pretty much fixes all noticeable issues with virtually no framerate cost.

Ah, much better!

Perfect? No. Good enough? Hell yes.

This entry was posted in Game Design, Updates. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>