Sign in to follow this  
Followers 0
DF Oliver

Programming Update #6: All Hail the Bug Overlords I

78 posts in this topic

Hi guys.

This is the first post in a new series of project updates of a different kind. Because this time I want to talk about a part of our job that can be tricky and frustrating, but also quite hilarious at times: Bugs!

While we are working on the game, things inevitably go wrong and the unintended behavior sometimes yields in humorous results. We all know that extreme lumberjackery is dangerous business, so let’s look at some of the funnier examples.

Can't see the forest for the lumberjacks

programming6_01.jpg

This is what we saw when we ran the cabin scene on an iPad for the first time. The lumberjack was hiking through a bearded forest. At first we thought he took too many colored pills, but the problem was that the game couldn’t load any of the other textures and then simply used the last valid texture to draw all geometry.

Lumber mutant hero jacks

programming6_02.jpg

“Oh no…” he screamed. “My face… it’s melting!”

Loading a model that was exported from a 3D package can result in hilarious situations when the geometry data doesn’t exactly match the way the graphics card expects it. In this case there was an issue with the index data and OpenGL was drawing triangles defined by incorrect vertices.

Red dreams of texture packing

programming6_03.jpg

After adding support for automated image processing to one of our build servers, we generated all assets necessary to run the game on a Mac. I did, however, forget to install the correct license for TexturePacker, which causes all the images to tint red and overlaid text reminding you to install a license. I guess the lumberjack shouldn’t have taken the red pill…

Feeling a bit disconnected today

[vimeo]46122579[/vimeo]

You remember the mailbox in the pre-viz video, right? What if I told you that the mailbox was actually a buzzard in disguise? That does not surprise you? Alright, fair enough. But did you know that the lumberjack and the mailbox-buzzard are connected through a hyperspace wormhole?

This hilarious problem was caused by using the wrong skinning matrices when rendering skinned characters. The buzzard was using the joint transformations of the lumberjack and vise versa. While fixing this issue the following issue appeared.

Riding the buzzard

programming6_05.jpg

After destroying the evil wormhole, the inhabitants of the forest were so happy about the newly established peace that they erected a massive statue of the lumberjack riding the buzzard to the land of beautiful animations.

This issue was the result of not using the bone matrices. The shader constants that were supposed to contain skin deformation matrices simply stored identity transformations. The unfortunate placement of the two objects and their scale caused this situation to occur.

Rubber band lumberjack man

[vimeo]46122578[/vimeo]

On a cloudy Sunday morning, our friend the lumberjack woke up still tired. He made his way into the kitchen. Instead of grabbing a delicious caffeinated soda, he drank the magical rubber juice that was also stored in the fridge. Let’s just say he felt particularly flexible for the rest of the day…

While writing the shader for the skeletal animation, the vertex was incorrectly multiplied as column vector, so this video demonstrates that it is really important to use the correct matrix multiplication order.

That’s it for now. I hope you guys enjoyed the first bug update. It probably won’t be the last one. As usually please feel free to ask questions about this stuff.

Share this post


Link to post
Share on other sites

A forest of lumberjacks... looks like an acid trip. You should leave it in.

Share this post


Link to post
Share on other sites
Oooh.. Possible interface UI hint in the upper right of that last video?

Love the red-hell texturepacker license version... It'd be cool to have a way to corrupt the game for hilarity, like folks do with the old NES roms.

I believe that is the Lumberjack "Raise the Roof" power. Not sure if his special ability to pump up the party will make it to the final game

Share this post


Link to post
Share on other sites

Good one. Now we should have a plead to include a rubber band lumberjack.

And it seems this is not the first DF game to have a bug in which a character screams about his face. We don't need another one of those.

Share this post


Link to post
Share on other sites

I believe that is the Lumberjack "Raise the Roof" power. Not sure if his special ability to pump up the party will make it to the final game

I lol´d pretty hard with the "pump up the party" power. I´m at work and everyone is looking at me like I´m crazy or something.

Share this post


Link to post
Share on other sites

These bugs absolutely need to make it into the game somehow. Perhaps a level dedicated to programming bugs.

Share this post


Link to post
Share on other sites

I hope to see more of updates like that :D Or maybe I don't...

Anyway, the first one reminded me of a XKCD strip. Behold my skillz... ;)

35b6p20.png

Share this post


Link to post
Share on other sites

Ha, cool! I didn't think we'd also be getting updates like this, but I'm happy we do.

And ugh, matrix multiplication. I have to do quite a bit of those by hand every once in a while, and even when you do them in the right order, things can get messy. Why couldn't matrix multiplication be commutative like regular multiplication? *sigh*

Math is an evil, but beautiful mistress.

Anyway, Rubberjack does look like fun.

Share this post


Link to post
Share on other sites

I really hope the lumberjack rubber-men world appears in the game!

Share this post


Link to post
Share on other sites

Haha! I love this update. I used to do visualization programming in the oil industry and the thing I definitely miss the most is the absolutely hysterical bugs that would result when I inevitably screwed up my math at some point.

Share this post


Link to post
Share on other sites

These are all pretty great. Honestly I think the red TexturePacker license one looks like it would be a cool effect to actually intentionally use somewhere, in something, someday. (Maybe with slight modifications for scene composition and with text that's not about licensing.) There's something both creepy and ...newspapery about it.

Share this post


Link to post
Share on other sites
And ugh, matrix multiplication. I have to do quite a bit of those by hand every once in a while, and even when you do them in the right order, things can get messy. Why couldn't matrix multiplication be commutative like regular multiplication? *sigh*

Ugh, matrices. I knew they were involved in graphics somehow, but I was still surprised to see them pop up here.

I was wondering how exactly matrices were getting involved in this graphics nonsense so I looked it up in case anyone doesn't know yet and is interested.

http://en.wikipedia.org/wiki/Transformation_matrix#Examples_in_2D_graphics

I guess they're probably more fun when it's not all being done by hand or being used to write proofs.

Share this post


Link to post
Share on other sites

Rubbery lumberjack cracked me. His walkcycle looks so funky.

Share this post


Link to post
Share on other sites

The "Riding the buzzard" screen reminds me of the land of the living in Grim Fandango!

Share this post


Link to post
Share on other sites

While writing the shader for the skeletal animation, the vertex was incorrectly multiplied as column vector, so this video demonstrates that it is really important to use the correct matrix multiplication order.

Oh nice! I had no idea you could do animation with vertex shaders like that. You should add an option in the finished game for Use Incorrect Matrix Multiplication Order. :D

Share this post


Link to post
Share on other sites

I didn't expect to giggle this much at some bugs. The rubber lumberjack particularly. Thank you for sharing! Bwahaha!

Share this post


Link to post
Share on other sites

The reminder to install the texture license was almost as if a search and destroy robot (probably Redbot) was preparing to target and eliminate the poor lumberjack. I like it.

Smiles

Share this post


Link to post
Share on other sites

Bwahaha! Got a good laugh out of some of these. Please include some hint of these in the game!

Share this post


Link to post
Share on other sites

Lots of people finding these funny. I don't know if I'm the only one but does anyone else find this sort of thing utterly terrifying? When I was young, if a game had any serious glitches I came across, I would have to leave the room and get a parent to restart or turn off the computer.

Share this post


Link to post
Share on other sites

Well, at least this shows that you do not conjure games out of Tims Bandana. Which would be quiet sad, because he wouldn't need any of you fine ppl... pls refrain from spawning more overlords, maybe that helps with the bug problem ;)

Share this post


Link to post
Share on other sites

That is a walk of pure confidence in that last video.

No one can tell him what to do. He lives by his own rules.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0