The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Coding Traicks Of Game Developers...

Last post 02-29-2012 4:52 PM by Ragnax. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-21-2012 7:55 AM

    Coding Traicks Of Game Developers...

    Dodgycoding.net link - waste an hour reading.

     (edit: link didn't show the first time. Try:

    http://www.dodgycoder.net/2012/02/coding-tricks-of-game-developers.html)

  • 02-21-2012 1:22 PM In reply to

    Re: Coding Traicks Of Game Developers...

    Link is surprisingly good.

    SOMEWHAT UNRELATED ANECDOTE: Game developers seem to be about 5-7 years behind the status quo for software development practices at all times. As I was playing through Skyrim the first time, a bunch of quests broke-- enough that it was bugging me so I restarted a new character. The second time I used an entirely different strategy for competing quests, and I still ended up with a crapton of broken quests.

    At the time, I was thinking: "man, whatever unit testing framework they're using to test quests did a pretty crappy job!" There's hundreds of quests, not even counting the randomly-generated ones, and they interact like crazy. I mean, each part of a quest involves setting flags, moving items/NPCs around, moving inventory items around-- surely they have some automated way of running quests to ensure that quest Foo would never destroy an NPC still required by quest Bar, or that taking the item required for quest Fizz in the same dungeon where the target item for quest Buzz is wouldn't break Buzz even before you even got the quest in your quest log... I mean, this stuff is trivially easy to test, they could have a couple machines in a basement somewhere just running through the quests in random order, right?

    It didn't occur to me until later that they weren't doing unit testing of quests at all!

    When Bethesda released the "Creation Kit" (i.e. the game editor for Skyrim), I looked into it. Unit testing for quests? Not there. No hooks to add it. Pathetic. No wonder the end product was so buggy...

      <-  I couldn't make my shit work, so here's a Godzilla head.
  • 02-21-2012 3:50 PM In reply to

    • Xyro
    • Top 25 Contributor
    • Joined on 06-10-2007
    • Location location = new EnterpriseLocatorFactory() .newLocator(Locale.US) .getLocationFacade(this, true) .getLocation();
    • Posts 1,715

    Re: Coding Traicks Of Game Developers...

    blakeyrat:
    I mean, each part of a quest involves setting flags, moving items/NPCs around, moving inventory items around-- surely they have some automated way of running quests to ensure that quest Foo would never destroy an NPC still required by quest Bar, or that taking the item required for quest Fizz in the same dungeon where the target item for quest Buzz is wouldn't break Buzz even before you even got the quest in your quest log
    WHOA, hold on, let me rewrite that a bit... and... yes...
    edited blakeyrat:
    I mean, each part of a script involves setting flags, moving files around, moving database entries around-- surely they have some automated way of running scripts to ensure that script Foo would never destroy an archive still required by script Bar, or that taking the files required for script Fizz in the same directory where the target file for script Buzz is wouldn't break Buzz even before you even got the script in your crontab
    Holy molies, it's my old team's Unix environment!

    (The story has a happy ending though: I replaced about 75% of the scripts with one behemoth everything-and-the-kitchen-sink program that carefully manages around self-interaction bugs. I guess that's a happy ending. It has more than zero unit tests, at least.)

    #!/usr/bin/perl

    ($_,@x,@y,$r,$o)=( "Xyro's signature!", 0xe4e10e9d0a4803ea, 0x92b0b7684cda510e,
    0x9d2a504b06a54c04, 0xb04804bca984dc0c, 0xea4889b4dadb1108, 0x90534665a4c79811)
    ;%_=map{$_,1}split//;%_=map{$o++,$_}sort keys%_;@x=map{sprintf'%x',$_}@x;for(@x
    ){$r.=$_{hex$_}for(split//)}$r=~s$Xa$xa$;$_=$r;s;(^|! )(\w+);$1\u\L$2;g;print#!
  • 02-21-2012 3:59 PM In reply to

    Re: Coding Traicks Of Game Developers...

    Xyro:
    Holy molies, it's my old team's Unix environment!
    Skyrim's actually a huge-ass database with 4-byte types. Hm, what does that remind me of...

    OH SHIT Skyrim's game world is a Mac Classic application's resource fork!

      <-  I couldn't make my shit work, so here's a Godzilla head.
  • 02-21-2012 11:00 PM In reply to

    Re: Coding Traicks Of Game Developers...

    blakeyrat:
    OH SHIT Skyrim's game world is a Mac Classic application's resource fork!
    Now I have a bizarre desire to see this application. Fortunately I have neither a Mac (leaving aside the problem of running the Classic OS) nor Skyrim, so I should be able to suppress the urge.

    I'm sure you could have a lot of fun with ResEdit that way, though.

  • 02-22-2012 11:25 AM In reply to

    Re: Coding Traicks Of Game Developers...

    The Internet is one of the greatest tools ever invented for both improving and destroying productivity. Twitter and forums and blogs and instructional websites can be extremely motivational and educational, but they can also be a distraction that completely destroys all hope of ever getting anything done. One thing I’ve done in the past which has proven pretty successful is to stick to a plan for when I can spend some minutes checking email and Twitter, or play a quick game or something. Either at the completion of a task, or after a period of time (say one five-minute break every hour). Otherwise, the browser’s only use is for reading reference manual pages, if necessary. That way I turn a potential distraction into a motivating tool.
    Raise your hand... how many of you are practicing this "coding trick" as you are reading this?
  • 02-29-2012 4:52 PM In reply to

    Re: Coding Traicks Of Game Developers...

    blakeyrat:
    When Bethesda released the "Creation Kit" (i.e. the game editor for Skyrim), I looked into it. Unit testing for quests? Not there. No hooks to add it. Pathetic. No wonder the end product was so buggy...

    The really craptacular part is that anything you can do with Skyrim quests, you can model as some form of attributed workflow, which means whole families of automated tests (soundness, deadlock detection, etc.) are possible that wouldn't even require the writing of unit tests.

    Massive fail on the part of Bethesda.

    Cassidy:
    http://www.dodgycoder.net/2012/02/coding-tricks-of-game-developers.html
    How topical the Skryim stuff is! Number 7 "Its not a bug, its a feature!" (sic) has to be Bethesda's Radiant AI...
Page 1 of 1 (7 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems