Slashdot Mirror


Coding and Roleplaying - Is There a Connection?

TossCobble asks: "With table-top roleplaying giant Wizards of the Coast (makers of Dungeons & Dragons, for those not in the know) broadcasting an open call for adventure designers and developers (including an entertaining developer test to gauge your own game-design talent and knowledge), I found myself once again considering the odd appeal of gaming for us programming types. It's interesting that something so free-form-ishly creative, socially dynamic, and utterly fantastical be fun for folks so grounded in logical programming. Of course, my theory is that gaming and programming actually have more in common than we might think. Tabletop roleplaying involves coming up with creative solutions to problems set in a clearly-defined ruleset, involve constant data-tracking and minor mathematical equations, and involve working together with small groups of people toward like-minded goals. Conversely, love of roleplaying can illustrate how important creativity is to good programming. What do you think?"

9 of 417 comments (clear)

  1. A connection? Yes... by Anonymous Coward · · Score: 5, Funny

    A lack of women!

  2. roleplaying? by charliebear · · Score: 5, Funny

    Well, I used to code, and me and the wife like to role play every once in a while, so I guess there is a correlation.

    1. Re:roleplaying? by Anonymous Coward · · Score: 3, Funny

      "Why do I have such a big penis? Does everyone else have a big penis or am I alone in having such a great big penis?"

      Phaw. One penis is so last year.

  3. I... by Anonymous Coward · · Score: 5, Funny

    I ... [rolls d20] ... agree totally!

  4. Is there a connection? by SuperDuG · · Score: 3, Funny
    Good programmers are usually just as nerdy as good roleplay gamers?

    Or am I missing some non-obvious shared characteristic?

    --
    Ignore the "p2p is theft" trolls, they're just uninformed
  5. Re:Umm, poor people skills? by Billly+Gates · · Score: 4, Funny

    Shhh!

    I ban you away from my wow tower! Begone!

  6. Re:Coding vs roleplaying by BigGerman · · Score: 3, Funny

    yes, but some code reviews I have seen were very much like that ;-)

  7. On coding, roleplay, and Jack Chick by dacarr · · Score: 4, Funny
    Well, according to Jack Chick, RPGs of any flavor are satanic. And so if there's a correlation, coding, by extension, must be satanic.

    Which means that computer programs generated from said satanic code are satanic.

    Which means that, if there's a correlation, and Chick comes to this conclusion, his website will be off the net pretty soon.

    --
    This sig no verb.
  8. You're both wrong by sheldon · · Score: 3, Funny

    Finally, I am able to help with the amazing mastery of Microsoft BASIC v5.21 on CP/M 2.2 that I had in my youth. I never thought that this moment, and my hours spent in front of the computer writing programs to create D&D characters would pay off 22 years later!

    INT() doesn't round, it truncates.

    So let's say the 6*RND does return 1.6, 2.4 and 3.3... You're right in that his function would return 2.6 + 3.4 + 4.3 = 10.3... truncated to 10.

    Now yours:
    INT((6 * RND(0)) + INT(6 * RND(0)) + INT(6 * RND(0) + 3 )

    But your function is just as wrong. Suppose RND*6 returns .4, 1.2 and 2.2. That should be 1, 1, 2 for a total of 4. Your function would return 0 + 1 + 5. Yeah, you're adding in those extra 1s, but because they aren't within the INT() they aren't being used properly.

    It should be simply written as this...

    INT((6 * RND(0) + 1) + INT(6 * RND(0) + 1) + INT(6 * RND(0) + 1)

    Or if you were a master at BASIC, you would do something like this, knowing that this is a routine that you will use over and over again:

    DEF FN D(D%) =INT(D% * RND(0) +1)

    Then write your line:

    D(6) + D(6) + D(6)

    I think this is a lesson in, always break things down to their simplest components, and then just do that. Don't try to be fancy and shortcut steps... it makes your code harder to read, as well as potentionally introduces bugs.