- Title: Critter DNA
- Description: Shows how to add DNA type structure to allow generational inheritance in game gritters.
- GM Version:
- Registered: Yes (Pro)
- File Type: .zip (6 Tutorial files)
- File Size: 107KB
- File Link: http://host-a.net/ic...42/genetics.zip
- Required Extensions: None
- Required DLLs: None
I decided to share my technique for making babies LOL.
Using a DNA type system, you can define how a character will look in the game. The DNA is simply a string that holds character properties in each byte of the string.
When the character is created, it's DNA string is setup and the character's look is defined based on the data in the string...
The string simply holds the genes for the character. During the game, right after the instance is created, the string data is read and a series of variables are set accordingly. That way we don't loop though the string character every step.
Creating babies is relatively simple.
You have a male and a female critter. Each hold both male and female dna. But when the critter is female, we use the female DNA and when it's male, we use the male DNA.
When the critters touch (mate) the exchange DNA for the baby. Passing on both male and female DNA from the 2 parents.
The effect is that the child now looks like both it's parents and contains the DNA for the next generation. A merging of both parent DNA.
Read the info in each of the files to gradually get introduced to the concept.
There are 3 body types, 3 eye types and an millions of possibilities for body and eye color.
You move the males as a group in the 3rd file onward. Touch a female to mate with and move away and see a baby get born. See the traits that are inherited...
The next file set will add behaviour inheritance if I am not too busy with something else.
Use the arrows in file 3 to move the males. Touch a femal and move away. *Careful, at one point, you may endup having a lot of males touching a lot of females when they get born... Resulting in a lot of instances being created... At that point, better end the simulation.
Edited by icuurd12b42, 11 August 2011 - 07:08 AM.