Game Development Reference
In-Depth Information
should average the values from the two parents; if you do this, within a very few
generations, all your creatures will be the same height or very nearly so. Human
genetics work differently. Humans have not one value for each characteristic, but
two, one inherited from the mother and one from the father. These two values are
called alleles . If a person's two alleles for the same trait don't match, one of them
dominates the other according to a rule. The allele for brown eyes dominates the
recessive allele for blue, so people with one brown allele and one blue allele will
have brown eyes. When a human reproduces, one of the two alleles is chosen at
random to go on to the next generation. This means that it's possible for a brown-
eyed person to still pass on the allele for blue eyes. Otherwise, the allele for blue
eyes disappears from the population almost immediately.
MUTATION
Mutation is a change to a gene that occurs as a result of some environmental
factor. Radiation famously causes mutations; so do some chemicals. Bear in mind
that a mutation does not have a lasting effect on the population unless it occurs
in reproductive cells, and even then the results appear only in the offspring of
the individual whose cells mutate. Such mutations may benefit the population by
introducing random new values into the gene pool, but they may just as easily be
detrimental or even lethal to the individuals that inherit them. For the purposes of
your game, you probably don't want to allow lethal mutations—those that produce
miscarriages or stillborn offspring. If your creatures' gestation period is long, allow-
ing lethal mutations wastes the player's time and doesn't add anything of value to
the gene pool—or the game.
LIFE SPAN, MATURITY, AND NATURAL SELECTION
Each of your creatures needs a natural life span, or your population will explode.
(In Creatures , the life span of a Norn is about 30 real-time minutes.) If you want
your population to evolve through natural selection—that is, to become better
adapted to its environment—then your creatures also need a period of immaturity,
when they are not fertile, followed by a period of maturity, when they are. Natural
selection works only if it kills off creatures with maladaptive genes before they
mature enough to reproduce. If creatures could reproduce immediately after birth,
maladaptive genes would never leave the gene pool.
If there's one thing we know about random mutation and natural selection, it's
that the effects of these processes appear slowly. The life span of the Norns in
Creatures is really too long for the player to breed hundreds of generations. If you
want evolution to be a part of your game, you'll need to find ways to make it work
nonrandomly or you'll need to keep the life span of your creatures very short. Of
course, the shorter the life span, the less chance you give each creature to exhibit
an interesting behavior, so there's a balance to be struck.
Search WWH ::




Custom Search