Search Unity

Code that allows breeding?

Discussion in 'Scripting' started by Lolitiabear, Apr 1, 2015.

  1. Lolitiabear

    Lolitiabear

    Joined:
    Apr 1, 2015
    Posts:
    1
    I hope i posted this to the right thread...
    but any hoo, in wolf quest, a game made and/or in sponsor for the Minnesota zoo and Eduweb, allows the players to breed there wolves (after they found a mate) and the wolves have a littler of pups. I know that they had to use some kind code to allow it so does anyone know what they used??
     
  2. Tiki

    Tiki

    Joined:
    Mar 3, 2013
    Posts:
    299
    I don't know the game in question, but the answer is pretty vague: They could have used a lot of different approaches. Every game uses code, they all use different code. Even Halo will use different code to manipulate the first person view than Call of Duty, even though the effect is the same. Code for breeding two VI (Virtual Intelligence) is pretty simple, decide on how you want to divide the odds of trait separation (genetics are a great research base to mimic real life), and randomize new traits for a new entity based upon the odds split between the new entity's parents. If you're asking if they used someone else's code, or a licensed software - probably not, this kind of stuff is typically coded in-house.
     
  3. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    2,836
    That's not the kind of thing you could just copy-and-paste from someone else's game into yours. Even if the code was both designed and available to be re-used in other games (neither of which is likely to be true), you'd probably need to do a lot of work to make it fit together with your own code...enough work that it might be easier just to write it yourself from scratch.
     
  4. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    #sexycode