Results 1 to 10 of 298

Hybrid View

  1. #1
    Player
    Granyala's Avatar
    Join Date
    Sep 2014
    Posts
    1,635
    Character
    Ifalna Sha'yoko
    World
    Cerberus
    Main Class
    White Mage Lv 100
    Quote Originally Posted by Iscah View Post
    Gender is a binary flag because "binary" is how a computer thinks. It's the simplest piece of data they can store. One or zero; on or off. There's no "halfway".
    First of all: it would be called a "boolean" variable, not a binary one. Boolean differentiates between two states: true and false.

    Second: I doubt that they use boolean for gender as that would make for pretty awkward coding. I'm sure it is a completely normal variable that points to a value in your character data and that information is then used to pick the right dialogue via if/else.

    Adding in more states than two would not only require the rewrite of the character data, because right now with only 2 sexes 1 bit is enough to store the information, if you want a 3rd option you't have to beef it up to 2 bits. Also it would require another loop in the if/else decision making code.

    It is pretty trivial to implement once you have the template because you can use (or point to) the same tiny code segment every time.
    (0)
    Last edited by Granyala; 07-27-2019 at 05:10 PM.