• ShinkanTrain@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    10 days ago

    This is probably one of the most shared pieces game lore, but it isn’t actually true! Sid Meier himself explained in his memoirs.

    Civ 1 only has three aggresion levels, and Gandhi always stayed at the lowest one, like many others leaders. A programmer might have to correct me here, but the language the game was written in © doesn’t even have unsigned integers by default.

    The myth probably spread out because it’s a fun story, and being nuked by Gandhi is just a funny memorable thing that stuck with people. I haven’t verified this, but he also has the Scientific trait, which means he’s likely to reach the nuclear tech before other Civs.

    • okamiueru@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 days ago

      Seem that you are indeed right! Thanks for clearing that up!

      To quote the relevant parts:

      … It’s the fact that none of it is true. The overflow error never happened at all. It is true that Gandhi would—eventually—use nukes when India was at war, just like any civilization in the game, and at the time this did strike a lot of players as odd. […] Since all leaders used the same basic diplomacy script […] But at no point did a democratic score change, or any value approaching 255, come into it. That kind of bug comes from something called unsigned characters, which are […] not something I used for the leader traits. Brian Reynolds wrote Civ II in C++, and he didn’t use them, either. […] Gandhi’s military aggressiveness score remained at 1 throughout the game. […]

    • boonhet@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 days ago

      Pretty sure C has had unsigned ints from the start, but who knows what data type they actually used. It was the 90s so using small data types where possible was common, aggression could’ve been a short, a char, etc. Also I think C programmers like using enums and that’s a valid use case for enum (low, med, high)