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)



  • 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...



  • @blakeyrat said:

    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 said:

    I mean, each part of a [b]script[/b] involves setting flags, moving [b]files[/b] around, moving [b]database entries[/b] around-- surely they have some automated way of running [b]scripts[/b] to ensure that [b]script[/b] Foo would never destroy an [b]archive[/b] still required by [b]script[/b] Bar, or that taking the [b]files[/b] required for [b]script[/b] Fizz in the same [b]directory[/b] where the target [b]file[/b] for [b]script[/b] Buzz is wouldn't break Buzz even before you even got the [b]script[/b] in your [b]crontab[/b]

    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.)



  • @Xyro said:

    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!



  • @blakeyrat said:

    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.



  • 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?



  • @blakeyrat said:

    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 said:

    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...


Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.