Unthinkability

Scott Fletcher – Saying unthinkable and sundry things.

Jun
05
2008

"Kung Fu Panda" game – Rescued villagers run to their death.

Posted under A Geek Dad's Life, Blog Posts

Kung Fu Panda for Xbox 360I bought the XBOX 360 game “Kung Fu Panda” for my kids, and we’re having a good time playing it.  It’s a simple game with few/no mind-bending puzzles, and you can progress through much of the game on the “easy” setting by simply mashing on the buttons until the enemies finally succumb to your feverish melees.  It is a visually beautiful game, and the voice-over acting and script are well done.  I stayed up [way too] late on Tuesday night playing it for 5 hours and nearly finished the game. (I grew tired of the “hit the buttons in this order or die” gameplay of the boss battles.  Reminds me a lot of the old Dragon’s Lair, and I hated that game!)

Throughout the game, your missions often include “saving the villagers from the big-bad-mean-guys.”  After you defeat the bad guys, the villagers run up to you, say thank you in a mini cut-scene animation, and then run merrily on their way never to be seen again.  It’s cute.

Rather, it was cute until I found out exactly where the bunnies go after you rescue them;

The bunnies run into the nearest bush or shrub, fall over dead, and then blink out of existence. 

You are not supposed to watch them be ‘de-rezzed’ from the game, but the graphics in these modern game consoles are so good that you can actually see the bunnies through the branches in the shrubbery. 

Again, they say thank you, run into the bush, fall over dead, and then disappear.  It is both funny and sad, and then funny again.

I can understand why the Luxoflux built the game that way;  All programmers create objects (create bunnies) and need to dispose of those objects (destroy bunnies).  Many objects actually know what they need to do to clean up after themselves right before the are disposed, and they can execute their own program code right before they are disposed of by their owners (for instance, through the IDisposable interface in .NET). 

Here’s what I think happened: I’m sure that the ‘bunny’ objects already had their OnDispose() methods written, and that the “Die” method had code to notify the game world that the bunny was ready for disposal.  Rather than writing a separate “GracefullyExitThisWorld()” method to gently fade out the bunny in a pool of glorious light, the developers simply ran the bunny into the nearest shrub, disconnected the bunny’s audio triggers, and invoked the bunny’s “Die()” method (or less directly, set the bunny’s Health property to zero).  So sad.

I imagine that the game code looked a little something like this:

protected void OnAllEnemiesVanquished()
{

    if (zone.Villagers.AnyAlive())
    {

        //pick the nearest bunny to interact with hero
        Villager bunny = zone.Villagers.GetNearest(hero.Location);

        //queue up the thank-you and “run to its death” actions
        bunny.ActionQueue.Add(new object[]{
        bunny.Go(hero.Location),
        bunny.Say(zone.Villagers.Script.ThankHero),
        bunny.Go(zone.GetNearestKillSpot(bunny), MoveMode.HappyRun),
        bunny.DisableDeathScream(),
        bunny.Die()});

        //Execute the actions.
        bunny.ActionQueue.Execute();
    }

    else
    {
        //So sad.  All were dead already.
        //This player sucks, but might be a 4 year-old
        //so we can’t ridicule the player.  We should,�
        //however, warn all of the other bunnies in�
        //the game to run out and buy a firearm or
        //start taking Kung Fu lessons.
    }
}

This is not a bug, or a glitch, or even a defect in the game; it is just something that I noticed.  Otherwise, the game is beautiful, elegant, smooth and well-crafted…

Except for the infuriating checkpoint-save system that forgets to save your progress after finishing a level, or the New Game / Load Game menu screen  always asks you if you want to overwrite your hard-earned progress with a brand new blank game!!!  My 4 year-old has accidentally had to start over twice!  I finally moved the default save slot so that it wouldn’t happen again… I think. Not cool, Luxoflux.)

If you have kids, I strongly encourage you to buy “Kung Fu Panda!”  It’s a hoot.

Add A Comment